PATCH
/v1/convai/phone-numbers/{phone_number_id}
ElevenLabs APIUpdate Phone Number
- 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
→ 232 tokens · Vary: Accept
→ 232 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/phone-numbers/phone-number-id' \ -H "xi-api-key: $ELEVENLABS_API_KEY" \ -H 'Content-Type: application/json' \ -d '{ "agent_id": "string", "label": "string", "inbound_trunk_config": { "allowed_addresses": [ "string" ], "allowed_numbers": [ "string" ], "media_encryption": "allowed", "credentials": { "username": "string", "password": "string" }, "remote_domains": [ "string" ], "attributes_to_headers": {} }, "outbound_trunk_config": { "address": "string", "transport": "auto", "media_encryption": "allowed", "headers": {}, "attributes_to_headers": {}, "credentials": { "username": "string", "password": "string" }, "enabled_codecs": [ "G722/8000" ] }, "livekit_stack": "standard", "store_sip_messages": true, "environment": "string", "branch_id": "string"}'Get a free ElevenLabs API key → sponsored
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| phone_number_id | path | string | Yes | The phone number ID. This is returned when a phone number is imported. |
| agent_id | body | string | No | Request body field agent_id. |
| label | body | string | No | Request body field label. |
| inbound_trunk_config | body | object | No | Request body field inbound_trunk_config. |
| outbound_trunk_config | body | object | No | Request body field outbound_trunk_config. |
| livekit_stack | body | string | No | Request body field livekit_stack. |
| store_sip_messages | body | boolean | No | Request body field store_sip_messages. |
| environment | body | string | No | Environment to use for resolving environment variables on calls to this number. |
| branch_id | body | string | No | Agent branch to use for calls to this number. |
Response 200 OK
{
"label": "Customer Support",
"phone_number": "+1234567890",
"phone_number_id": "phone_123",
"provider": "twilio"
}