Update Agent
curl --request PUT \
--url http://localhost:8080/api/v1/agents/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"email": "jsmith@example.com",
"roles": [
"<string>"
],
"last_name": "<string>",
"send_welcome_email": true,
"teams": [
"<string>"
],
"enabled": true,
"new_password": "<string>"
}
'import requests
url = "http://localhost:8080/api/v1/agents/{id}"
payload = {
"first_name": "<string>",
"email": "jsmith@example.com",
"roles": ["<string>"],
"last_name": "<string>",
"send_welcome_email": True,
"teams": ["<string>"],
"enabled": True,
"new_password": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: '<string>',
email: 'jsmith@example.com',
roles: ['<string>'],
last_name: '<string>',
send_welcome_email: true,
teams: ['<string>'],
enabled: true,
new_password: '<string>'
})
};
fetch('http://localhost:8080/api/v1/agents/{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_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/agents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => '<string>',
'email' => 'jsmith@example.com',
'roles' => [
'<string>'
],
'last_name' => '<string>',
'send_welcome_email' => true,
'teams' => [
'<string>'
],
'enabled' => true,
'new_password' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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 := "http://localhost:8080/api/v1/agents/{id}"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"roles\": [\n \"<string>\"\n ],\n \"last_name\": \"<string>\",\n \"send_welcome_email\": true,\n \"teams\": [\n \"<string>\"\n ],\n \"enabled\": true,\n \"new_password\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.put("http://localhost:8080/api/v1/agents/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"roles\": [\n \"<string>\"\n ],\n \"last_name\": \"<string>\",\n \"send_welcome_email\": true,\n \"teams\": [\n \"<string>\"\n ],\n \"enabled\": true,\n \"new_password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/agents/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"roles\": [\n \"<string>\"\n ],\n \"last_name\": \"<string>\",\n \"send_welcome_email\": true,\n \"teams\": [\n \"<string>\"\n ],\n \"enabled\": true,\n \"new_password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": 1,
"created_at": "2025-08-28T10:00:00Z",
"updated_at": "2025-08-28T10:00:00Z",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"type": "agent",
"availability_status": "online",
"phone_number_country_code": "US",
"phone_number": "1234567890",
"avatar_url": "/avatars/agent1.jpg",
"enabled": true,
"last_active_at": "2025-08-28T10:00:00Z",
"last_login_at": "2025-08-28T10:00:00Z",
"roles": [
"admin"
],
"permissions": [
"conversations:read"
],
"custom_attributes": {},
"teams": [
{
"id": 1,
"name": "Support Team",
"emoji": "🛠️"
}
],
"api_key": "<string>",
"api_key_last_used_at": "2023-11-07T05:31:56Z",
"country": "US",
"meta": {},
"external_user_id": "<string>"
}
}{
"status": "error",
"message": "Invalid request",
"data": "<unknown>",
"error_type": "GeneralException"
}{
"status": "error",
"message": "Invalid request",
"data": "<unknown>",
"error_type": "GeneralException"
}{
"status": "error",
"message": "Invalid request",
"data": "<unknown>",
"error_type": "GeneralException"
}{
"status": "error",
"message": "Invalid request",
"data": "<unknown>",
"error_type": "GeneralException"
}{
"status": "error",
"message": "Invalid request",
"data": "<unknown>",
"error_type": "GeneralException"
}Agents & Teams
Update Agent
Changing the password or disabling the agent signs them out of all sessions. Requires the users:manage permission.
PUT
/
api
/
v1
/
agents
/
{id}
Update Agent
curl --request PUT \
--url http://localhost:8080/api/v1/agents/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"email": "jsmith@example.com",
"roles": [
"<string>"
],
"last_name": "<string>",
"send_welcome_email": true,
"teams": [
"<string>"
],
"enabled": true,
"new_password": "<string>"
}
'import requests
url = "http://localhost:8080/api/v1/agents/{id}"
payload = {
"first_name": "<string>",
"email": "jsmith@example.com",
"roles": ["<string>"],
"last_name": "<string>",
"send_welcome_email": True,
"teams": ["<string>"],
"enabled": True,
"new_password": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: '<string>',
email: 'jsmith@example.com',
roles: ['<string>'],
last_name: '<string>',
send_welcome_email: true,
teams: ['<string>'],
enabled: true,
new_password: '<string>'
})
};
fetch('http://localhost:8080/api/v1/agents/{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_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/agents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => '<string>',
'email' => 'jsmith@example.com',
'roles' => [
'<string>'
],
'last_name' => '<string>',
'send_welcome_email' => true,
'teams' => [
'<string>'
],
'enabled' => true,
'new_password' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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 := "http://localhost:8080/api/v1/agents/{id}"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"roles\": [\n \"<string>\"\n ],\n \"last_name\": \"<string>\",\n \"send_welcome_email\": true,\n \"teams\": [\n \"<string>\"\n ],\n \"enabled\": true,\n \"new_password\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.put("http://localhost:8080/api/v1/agents/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"roles\": [\n \"<string>\"\n ],\n \"last_name\": \"<string>\",\n \"send_welcome_email\": true,\n \"teams\": [\n \"<string>\"\n ],\n \"enabled\": true,\n \"new_password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/agents/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"roles\": [\n \"<string>\"\n ],\n \"last_name\": \"<string>\",\n \"send_welcome_email\": true,\n \"teams\": [\n \"<string>\"\n ],\n \"enabled\": true,\n \"new_password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": 1,
"created_at": "2025-08-28T10:00:00Z",
"updated_at": "2025-08-28T10:00:00Z",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"type": "agent",
"availability_status": "online",
"phone_number_country_code": "US",
"phone_number": "1234567890",
"avatar_url": "/avatars/agent1.jpg",
"enabled": true,
"last_active_at": "2025-08-28T10:00:00Z",
"last_login_at": "2025-08-28T10:00:00Z",
"roles": [
"admin"
],
"permissions": [
"conversations:read"
],
"custom_attributes": {},
"teams": [
{
"id": 1,
"name": "Support Team",
"emoji": "🛠️"
}
],
"api_key": "<string>",
"api_key_last_used_at": "2023-11-07T05:31:56Z",
"country": "US",
"meta": {},
"external_user_id": "<string>"
}
}{
"status": "error",
"message": "Invalid request",
"data": "<unknown>",
"error_type": "GeneralException"
}{
"status": "error",
"message": "Invalid request",
"data": "<unknown>",
"error_type": "GeneralException"
}{
"status": "error",
"message": "Invalid request",
"data": "<unknown>",
"error_type": "GeneralException"
}{
"status": "error",
"message": "Invalid request",
"data": "<unknown>",
"error_type": "GeneralException"
}{
"status": "error",
"message": "Invalid request",
"data": "<unknown>",
"error_type": "GeneralException"
}Authorizations
basicAuthtokenAuth
Basic authentication using base64 encoded API key and secret. Format: Authorization: Basic <base64(api_key:api_secret)>
Path Parameters
Body
application/json
Agent update details
Agent's first name
Agent's email address
Names of the roles assigned to the agent
Agent's last name
Only used during agent creation to send welcome email
Names of the teams to assign the agent to. On update, the agent is removed from teams not listed.
Whether agent is enabled. Used only on update.
Agent's availability status. Used only on update.
Available options:
online, away, away_manual, offline, away_and_reassigning Agent's new password. Optional, used only on update.
Was this page helpful?

