Update an agent
curl --request PATCH \
--url https://api.inbox.adraa.ai/api/v1/agents/{agentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nickname": "sara"
}
'import requests
url = "https://api.inbox.adraa.ai/api/v1/agents/{agentId}"
payload = { "nickname": "sara" }
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({nickname: 'sara'})
};
fetch('https://api.inbox.adraa.ai/api/v1/agents/{agentId}', 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.inbox.adraa.ai/api/v1/agents/{agentId}",
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([
'nickname' => 'sara'
]),
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.inbox.adraa.ai/api/v1/agents/{agentId}"
payload := strings.NewReader("{\n \"nickname\": \"sara\"\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.inbox.adraa.ai/api/v1/agents/{agentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nickname\": \"sara\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.inbox.adraa.ai/api/v1/agents/{agentId}")
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 \"nickname\": \"sara\"\n}"
response = http.request(request)
puts response.read_body{
"agent": {
"id": "cmbxgwq1e0000ph01i0j1k2l3",
"email": "[email protected]",
"nickname": "sara",
"role": "agent",
"isOnline": true,
"lastSeen": "2026-06-12T10:25:00.000Z",
"createdAt": "2026-05-02T08:14:00.000Z"
}
}{
"error": {
"code": "LAST_ADMIN",
"message": "The workspace must keep at least one admin"
}
}{
"error": {
"code": "INVALID_API_TOKEN",
"message": "Invalid or revoked API token"
}
}{
"error": {
"code": "AGENT_NOT_FOUND",
"message": "Agent not found in this workspace"
}
}{
"error": {
"code": "NICKNAME_TAKEN",
"message": "That display name is already in use"
}
}Agents
Update an agent
Updates an agent’s workspace role and/or display name. The role is scoped to this workspace; the display name is the agent’s global name across Adraa Inbox. At least one field is required.
The workspace must keep at least one admin, and platform-managed agents (the AI agent) cannot be modified.
Rate limit: 30 requests per minute.
PATCH
/
api
/
v1
/
agents
/
{agentId}
Update an agent
curl --request PATCH \
--url https://api.inbox.adraa.ai/api/v1/agents/{agentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nickname": "sara"
}
'import requests
url = "https://api.inbox.adraa.ai/api/v1/agents/{agentId}"
payload = { "nickname": "sara" }
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({nickname: 'sara'})
};
fetch('https://api.inbox.adraa.ai/api/v1/agents/{agentId}', 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.inbox.adraa.ai/api/v1/agents/{agentId}",
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([
'nickname' => 'sara'
]),
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.inbox.adraa.ai/api/v1/agents/{agentId}"
payload := strings.NewReader("{\n \"nickname\": \"sara\"\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.inbox.adraa.ai/api/v1/agents/{agentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nickname\": \"sara\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.inbox.adraa.ai/api/v1/agents/{agentId}")
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 \"nickname\": \"sara\"\n}"
response = http.request(request)
puts response.read_body{
"agent": {
"id": "cmbxgwq1e0000ph01i0j1k2l3",
"email": "[email protected]",
"nickname": "sara",
"role": "agent",
"isOnline": true,
"lastSeen": "2026-06-12T10:25:00.000Z",
"createdAt": "2026-05-02T08:14:00.000Z"
}
}{
"error": {
"code": "LAST_ADMIN",
"message": "The workspace must keep at least one admin"
}
}{
"error": {
"code": "INVALID_API_TOKEN",
"message": "Invalid or revoked API token"
}
}{
"error": {
"code": "AGENT_NOT_FOUND",
"message": "Agent not found in this workspace"
}
}{
"error": {
"code": "NICKNAME_TAKEN",
"message": "That display name is already in use"
}
}Authorizations
Workspace API token created in Settings → API. Tokens start with adraa_.
Path Parameters
ID of the agent. List agents with GET /api/v1/agents to find it.
Example:
"cmbxgwq1e0000ph01i0j1k2l3"
Body
application/json
Response
The updated agent
Show child attributes
Show child attributes
⌘I