curl --request PATCH \
--url https://api.useanima.sh/v1/agents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"metadata": {},
"voiceId": "<string>"
}
'import requests
url = "https://api.useanima.sh/v1/agents/{id}"
payload = {
"name": "<string>",
"slug": "<string>",
"metadata": {},
"voiceId": "<string>"
}
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({name: '<string>', slug: '<string>', metadata: {}, voiceId: '<string>'})
};
fetch('https://api.useanima.sh/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_URL => "https://api.useanima.sh/v1/agents/{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([
'name' => '<string>',
'slug' => '<string>',
'metadata' => [
],
'voiceId' => '<string>'
]),
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.useanima.sh/v1/agents/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"metadata\": {},\n \"voiceId\": \"<string>\"\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.useanima.sh/v1/agents/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"metadata\": {},\n \"voiceId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useanima.sh/v1/agents/{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 \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"metadata\": {},\n \"voiceId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"orgId": "<string>",
"name": "<string>",
"slug": "<string>",
"status": "ACTIVE",
"apiKeyPrefix": "<string>",
"keyRotatedAt": "2023-11-07T05:31:56Z",
"metadata": {},
"voiceId": "<string>",
"emailIdentities": [
{
"id": "<string>",
"email": "jsmith@example.com",
"domain": "<string>",
"localPart": "<string>",
"isPrimary": true,
"verified": true,
"createdAt": "2023-11-07T05:31:56Z"
}
],
"phoneIdentities": [
{
"id": "<string>",
"phoneNumber": "<string>",
"providerId": "<string>",
"capabilities": {
"sms": false,
"mms": false,
"voice": false
},
"tenDlcStatus": "PENDING",
"isPrimary": true,
"voiceId": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"readiness": {
"canSendEmail": true,
"canReceiveEmail": true,
"canSendSms": true,
"canPlaceVoiceCall": true,
"blockers": [
{
"code": "IDENTITY_NOT_VERIFIED",
"field": "<string>",
"hint": "<string>",
"remediationUrl": "<string>"
}
]
}
}Patch agents
curl --request PATCH \
--url https://api.useanima.sh/v1/agents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"metadata": {},
"voiceId": "<string>"
}
'import requests
url = "https://api.useanima.sh/v1/agents/{id}"
payload = {
"name": "<string>",
"slug": "<string>",
"metadata": {},
"voiceId": "<string>"
}
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({name: '<string>', slug: '<string>', metadata: {}, voiceId: '<string>'})
};
fetch('https://api.useanima.sh/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_URL => "https://api.useanima.sh/v1/agents/{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([
'name' => '<string>',
'slug' => '<string>',
'metadata' => [
],
'voiceId' => '<string>'
]),
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.useanima.sh/v1/agents/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"metadata\": {},\n \"voiceId\": \"<string>\"\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.useanima.sh/v1/agents/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"metadata\": {},\n \"voiceId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useanima.sh/v1/agents/{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 \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"metadata\": {},\n \"voiceId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"orgId": "<string>",
"name": "<string>",
"slug": "<string>",
"status": "ACTIVE",
"apiKeyPrefix": "<string>",
"keyRotatedAt": "2023-11-07T05:31:56Z",
"metadata": {},
"voiceId": "<string>",
"emailIdentities": [
{
"id": "<string>",
"email": "jsmith@example.com",
"domain": "<string>",
"localPart": "<string>",
"isPrimary": true,
"verified": true,
"createdAt": "2023-11-07T05:31:56Z"
}
],
"phoneIdentities": [
{
"id": "<string>",
"phoneNumber": "<string>",
"providerId": "<string>",
"capabilities": {
"sms": false,
"mms": false,
"voice": false
},
"tenDlcStatus": "PENDING",
"isPrimary": true,
"voiceId": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"readiness": {
"canSendEmail": true,
"canReceiveEmail": true,
"canSendSms": true,
"canPlaceVoiceCall": true,
"blockers": [
{
"code": "IDENTITY_NOT_VERIFIED",
"field": "<string>",
"hint": "<string>",
"remediationUrl": "<string>"
}
]
}
}Authorizations
JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer
Path Parameters
Unique identifier of the agent to update
^[cC][^\s-]{8,}$Body
Request body for updating an existing agent
Updated display name for the agent
2 - 100Updated URL-friendly unique identifier
2 - 64^[a-z0-9-]+$Updated lifecycle status
ACTIVE, SUSPENDED, DELETED Updated key-value metadata (replaces existing metadata)
Show child attributes
Show child attributes
Updated voice id (from GET /voice/catalog), or null to reset to the system default.
Response
OK
Full agent resource representation
Unique identifier of the agent
^[cC][^\s-]{8,}$Organization ID that owns this agent
^[cC][^\s-]{8,}$Human-readable display name
URL-friendly unique identifier
Current lifecycle status
ACTIVE, SUSPENDED, DELETED Prefix of the agent's API key for identification, or null if no key is set
ISO 8601 timestamp of the last API-key rotation, null if never rotated
Arbitrary key-value metadata
Show child attributes
Show child attributes
The agent's chosen voice id, or null for the system default.
Email identities associated with this agent
Show child attributes
Show child attributes
Phone identities associated with this agent
Show child attributes
Show child attributes
Timestamp when the agent was created
Timestamp when the agent was last updated
Per-capability readiness summary. Optional for backward compatibility — clients without readiness handling continue to work; clients that branch on it get the delayed-verification gap closed.
Show child attributes
Show child attributes
