apicheats.dev elevenlabs/llms.txt Raw .md
PATCH

PATCH /v1/convai/agents/{agent_id}/branches/{branch_id} — ElevenLabs API

ElevenLabs API

Update Agent Branch

Base URL
https://api.elevenlabs.io
Auth
xi-api-key: <ELEVENLABS_API_KEY>
Last verified
2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 223 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": "example-name",  "description": "example-description",  "is_archived": true,  "protection_status": "writer_perms_required",  "auto_rebase": true}'

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.
description body string No New description for the branch. Pass an empty string to clear it.
is_archived body boolean No Whether the branch should be archived
protection_status body string No The protection level for the branch
auto_rebase body boolean No When true, rebase this branch onto main automatically after each new main version. Cannot be enabled on the main 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",
  "auto_rebase": false,
  "access_info": {
    "access_source": "creator",
    "creator_email": "[email protected]",
    "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": "[email protected]",
        "creator_name": "John Doe",
        "is_creator": true,
        "role": "admin"
      },
      "merged_authors": [
        {
          "access_source": "creator",
          "creator_email": "[email protected]",
          "creator_name": "John Doe",
          "is_creator": true,
          "role": "admin"
        }
      ]
    }
  ]
}
Get a free ElevenLabs API key → sponsored

Affiliate link - we may earn a commission, at no extra cost to you.