cURL
curl -X PUT https://backend.talking-avatar.dev/api/talking-avatar/voice-agents/VOICE_AGENT_ID \
-H "Authorization: Bearer $TALKING_AVATAR_API_KEY" \
-H "API-Version: 1" \
-H "Content-Type: application/json" \
-d '{
"name": "Maya",
"access": "private",
"config": {
"avatar": "ava6",
"voice": "VOICE_ID",
"instructions": "You are Maya, a friendly support agent for Acme. Help callers track their orders and answer questions about returns.",
"greeting": "Hi, this is Maya from Acme. How can I help?",
"webhookUrl": "https://example.com/talking-avatar/call-ended"
}
}'import os, requests
response = requests.put(
"https://backend.talking-avatar.dev/api/talking-avatar/voice-agents/VOICE_AGENT_ID",
headers={
"Authorization": f"Bearer {os.environ['TALKING_AVATAR_API_KEY']}",
"API-Version": "1",
},
json={
"name": "Maya",
"access": "private",
"config": {
"avatar": "ava6",
"voice": "VOICE_ID",
"instructions": "You are Maya, a friendly support agent for Acme. Help callers track their orders and answer questions about returns.",
"greeting": "Hi, this is Maya from Acme. How can I help?",
"webhookUrl": "https://example.com/talking-avatar/call-ended",
},
},
)
response.raise_for_status()
data = response.json()["data"]const response = await fetch("https://backend.talking-avatar.dev/api/talking-avatar/voice-agents/VOICE_AGENT_ID", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.TALKING_AVATAR_API_KEY}`,
"API-Version": "1",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Maya",
"access": "private",
"config": {
"avatar": "ava6",
"voice": "VOICE_ID",
"instructions": "You are Maya, a friendly support agent for Acme. Help callers track their orders and answer questions about returns.",
"greeting": "Hi, this is Maya from Acme. How can I help?",
"webhookUrl": "https://example.com/talking-avatar/call-ended"
}
}),
});
const { data } = await response.json();{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"enabled": true,
"access": "public",
"config": {
"avatar": "<string>",
"voice": "<string>",
"instructions": "<string>",
"greeting": "",
"vad": "semantic",
"eagerness": "auto",
"vadThreshold": 0.5,
"prefixPaddingMs": 300,
"silenceDurationMs": 500,
"interruptible": true,
"noiseReduction": "near_field",
"reasoningEffort": "low",
"speed": 1,
"maxDurationMinutes": 10,
"endCall": true,
"tools": [],
"knowledgeBaseIds": [],
"webhookUrl": ""
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"code": 200,
"message": "<string>"
}{
"code": 123,
"message": "<string>",
"data": null
}{
"code": 123,
"message": "<string>",
"data": null
}Voice agents
Update a voice agent
Send the whole agent: settings you leave out of config go back to their defaults. Leave out access to keep it.
PUT
/
voice-agents
/
{id}
cURL
curl -X PUT https://backend.talking-avatar.dev/api/talking-avatar/voice-agents/VOICE_AGENT_ID \
-H "Authorization: Bearer $TALKING_AVATAR_API_KEY" \
-H "API-Version: 1" \
-H "Content-Type: application/json" \
-d '{
"name": "Maya",
"access": "private",
"config": {
"avatar": "ava6",
"voice": "VOICE_ID",
"instructions": "You are Maya, a friendly support agent for Acme. Help callers track their orders and answer questions about returns.",
"greeting": "Hi, this is Maya from Acme. How can I help?",
"webhookUrl": "https://example.com/talking-avatar/call-ended"
}
}'import os, requests
response = requests.put(
"https://backend.talking-avatar.dev/api/talking-avatar/voice-agents/VOICE_AGENT_ID",
headers={
"Authorization": f"Bearer {os.environ['TALKING_AVATAR_API_KEY']}",
"API-Version": "1",
},
json={
"name": "Maya",
"access": "private",
"config": {
"avatar": "ava6",
"voice": "VOICE_ID",
"instructions": "You are Maya, a friendly support agent for Acme. Help callers track their orders and answer questions about returns.",
"greeting": "Hi, this is Maya from Acme. How can I help?",
"webhookUrl": "https://example.com/talking-avatar/call-ended",
},
},
)
response.raise_for_status()
data = response.json()["data"]const response = await fetch("https://backend.talking-avatar.dev/api/talking-avatar/voice-agents/VOICE_AGENT_ID", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.TALKING_AVATAR_API_KEY}`,
"API-Version": "1",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Maya",
"access": "private",
"config": {
"avatar": "ava6",
"voice": "VOICE_ID",
"instructions": "You are Maya, a friendly support agent for Acme. Help callers track their orders and answer questions about returns.",
"greeting": "Hi, this is Maya from Acme. How can I help?",
"webhookUrl": "https://example.com/talking-avatar/call-ended"
}
}),
});
const { data } = await response.json();{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"enabled": true,
"access": "public",
"config": {
"avatar": "<string>",
"voice": "<string>",
"instructions": "<string>",
"greeting": "",
"vad": "semantic",
"eagerness": "auto",
"vadThreshold": 0.5,
"prefixPaddingMs": 300,
"silenceDurationMs": 500,
"interruptible": true,
"noiseReduction": "near_field",
"reasoningEffort": "low",
"speed": 1,
"maxDurationMinutes": 10,
"endCall": true,
"tools": [],
"knowledgeBaseIds": [],
"webhookUrl": ""
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"code": 200,
"message": "<string>"
}{
"code": 123,
"message": "<string>",
"data": null
}{
"code": 123,
"message": "<string>",
"data": null
}Body
application/json