cURL
curl --request PATCH \
--url https://api.alpharun.com/api/v1/teammates/{TEAMMATE_ID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"manager_id": "<string>",
"teammate_groups": {
"add": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"remove": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"is_active": true
}
'import requests
url = "https://api.alpharun.com/api/v1/teammates/{TEAMMATE_ID}"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"manager_id": "<string>",
"teammate_groups": {
"add": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"remove": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
},
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: '<string>',
last_name: '<string>',
manager_id: '<string>',
teammate_groups: {
add: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
remove: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
},
is_active: true
})
};
fetch('https://api.alpharun.com/api/v1/teammates/{TEAMMATE_ID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.alpharun.com/api/v1/teammates/{TEAMMATE_ID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => '<string>',
'last_name' => '<string>',
'manager_id' => '<string>',
'teammate_groups' => [
'add' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'remove' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'is_active' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.alpharun.com/api/v1/teammates/{TEAMMATE_ID}"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"manager_id\": \"<string>\",\n \"teammate_groups\": {\n \"add\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"is_active\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.alpharun.com/api/v1/teammates/{TEAMMATE_ID}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"manager_id\": \"<string>\",\n \"teammate_groups\": {\n \"add\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alpharun.com/api/v1/teammates/{TEAMMATE_ID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"manager_id\": \"<string>\",\n \"teammate_groups\": {\n \"add\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"teammate": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"manager_id": "660e8400-e29b-41d4-a716-446655440001",
"teammate_group_ids": [
"770e8400-e29b-41d4-a716-446655440002",
"880e8400-e29b-41d4-a716-446655440003"
]
}
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Teammates
Update Teammate
Updates a teammate’s name, manager, group memberships, and/or activation status.
PATCH
/
teammates
/
{TEAMMATE_ID}
cURL
curl --request PATCH \
--url https://api.alpharun.com/api/v1/teammates/{TEAMMATE_ID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"manager_id": "<string>",
"teammate_groups": {
"add": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"remove": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"is_active": true
}
'import requests
url = "https://api.alpharun.com/api/v1/teammates/{TEAMMATE_ID}"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"manager_id": "<string>",
"teammate_groups": {
"add": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"remove": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
},
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: '<string>',
last_name: '<string>',
manager_id: '<string>',
teammate_groups: {
add: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
remove: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
},
is_active: true
})
};
fetch('https://api.alpharun.com/api/v1/teammates/{TEAMMATE_ID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.alpharun.com/api/v1/teammates/{TEAMMATE_ID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => '<string>',
'last_name' => '<string>',
'manager_id' => '<string>',
'teammate_groups' => [
'add' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'remove' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'is_active' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.alpharun.com/api/v1/teammates/{TEAMMATE_ID}"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"manager_id\": \"<string>\",\n \"teammate_groups\": {\n \"add\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"is_active\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.alpharun.com/api/v1/teammates/{TEAMMATE_ID}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"manager_id\": \"<string>\",\n \"teammate_groups\": {\n \"add\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alpharun.com/api/v1/teammates/{TEAMMATE_ID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"manager_id\": \"<string>\",\n \"teammate_groups\": {\n \"add\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"teammate": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"manager_id": "660e8400-e29b-41d4-a716-446655440001",
"teammate_group_ids": [
"770e8400-e29b-41d4-a716-446655440002",
"880e8400-e29b-41d4-a716-446655440003"
]
}
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The teammate identifier, which can be either its UUID or its email. When using an email, the format should be alt:email:<email>.
Body
application/json
First name of the teammate
Last name of the teammate
The manager identifier, which can be a UUID, an email using the format alt:email:<email>, or null to clear the manager
Object specifying group membership changes
Show child attributes
Show child attributes
Set to true to activate the teammate or false to deactivate them
Response
Teammate updated successfully
Show child attributes
Show child attributes
⌘I