POST
POST /v1/convai/phone-numbers — ElevenLabs API
ElevenLabs APIImport Phone Number
- 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
→ 218 tokens · Vary: Accept
→ 218 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 POST 'https://api.elevenlabs.io/v1/convai/phone-numbers' \ -H "xi-api-key: $ELEVENLABS_API_KEY" \ -H 'Content-Type: application/json' \ -d '{ "phone_number": "example-phone-number", "label": "example-label", "supports_inbound": true, "supports_outbound": true, "provider": "twilio", "agent_id": "agent-id", "sid": "example-sid", "token": "example-token", "account_auth_token": "example-account-auth-token", "region_config": { "region_id": "us1", "token": "example-token", "edge_location": "ashburn" }, "enable_sms": true}'
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| phone_number | body | string | Yes | Phone number |
| label | body | string | Yes | Label for the phone number |
| supports_inbound | body | boolean | No | This field is deprecated and will be removed in the future. Whether this phone number supports inbound calls |
| supports_outbound | body | boolean | No | This field is deprecated and will be removed in the future. Whether this phone number supports outbound calls |
| provider | body | string | No | Request body field provider. |
| agent_id | body | string | No | Agent ID to assign the phone number to |
| sid | body | string | Yes | Twilio Account SID (starts with `AC`) or API Key SID (starts with `SK`) |
| token | body | string | Yes | Secret paired with `sid`: the Account Auth Token for an Account SID, or the API Key Secret for an API Key SID |
| account_auth_token | body | string | No | Twilio Account Auth Token, required for API Key imports to validate inbound webhook signatures |
| region_config | body | object | No | Twilio Additional Region Configuration |
| enable_sms | body | boolean | No | Route inbound SMS to ElevenLabs. On by default; set to false to skip SMS configuration for numbers that don't support it. |
Response 200 OK
{
"phone_number_id": "string"
} Get a free ElevenLabs API key → sponsored Affiliate link - we may earn a commission, at no extra cost to you.