PATCH
/v1/convai/agents/{agent_id}/branches/{branch_id}
ElevenLabs APIUpdate Agent Branch
- Base URL
- https://api.elevenlabs.io
- Auth
- xi-api-key: <ELEVENLABS_API_KEY>
- Last verified
- 2026-09-03 · upstream hash matched
Actions
Agents: curl -H "Accept: text/markdown" this URL
→ 215 tokens · Vary: Accept
→ 215 tokens · Vary: Accept
Critical gotchas
Authentication uses the non-standard xi-api-key header, not Authorization: Bearer. Sending a Bearer token returns HTTP 401.
Text-to-speech responses are raw binary audio, not JSON. Write the body to a file (--output speech.mp3) rather than parsing it.
cURL
curl -X PATCH 'https://api.elevenlabs.io/v1/convai/agents/agent-id/branches/branch-id' \ -H "xi-api-key: $ELEVENLABS_API_KEY" \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "is_archived": true, "protection_status": "writer_perms_required"}'Get a free ElevenLabs API key → sponsored
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| agent_id | path | string | Yes | The id of an agent. This is returned on agent creation. |
| branch_id | path | string | Yes | Unique identifier for the branch. |
| name | body | string | No | New name for the branch. Must be unique within the agent. |
| is_archived | body | boolean | No | Whether the branch should be archived |
| protection_status | body | string | No | The protection level for the branch |
Response 200 OK
{
"id": "string",
"name": "string",
"agent_id": "string",
"description": "string",
"created_at": 0,
"last_committed_at": 0,
"is_archived": true,
"protection_status": "writer_perms_required",
"access_info": {
"access_source": "creator",
"creator_email": "john.doe@example.com",
"creator_name": "John Doe",
"is_creator": true,
"role": "admin"
},
"current_live_percentage": 0,
"parent_branch": {
"id": "string",
"name": "string"
},
"most_recent_versions": [
{
"id": "string",
"agent_id": "string",
"branch_id": "string",
"version_description": "string",
"seq_no_in_branch": 0,
"time_committed_secs": 0,
"parents": {
"in_branch_parent_id": "string",
"out_of_branch_parent_id": "string",
"merged_into_branch_id": "string",
"merged_from_branch_id": "string",
"merged_from_version_id": "string",
"rebased_from_version_id": "string"
},
"access_info": {
"access_source": "creator",
"creator_email": "john.doe@example.com",
"creator_name": "John Doe",
"is_creator": true,
"role": "admin"
}
}
]
}