---
title: "Import Phone Number"
method: POST
path: "/v1/convai/phone-numbers"
tags: ["Agents Platform"]
---

# Import Phone Number

`POST /v1/convai/phone-numbers`

Import Phone Number from provider configuration (Twilio, Exotel, or SIP trunk)

## Headers

- `xi-api-key` string, nullable — Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

## Request body

- union — Create Phone Request Information
  - CreateTwilioPhoneNumberRequest
    - `phone_number` string, required — Phone number
    - `label` string, required — Label for the phone number
    - `supports_inbound` boolean — This field is deprecated and will be removed in the future. Whether this phone number supports inbound calls
    - `supports_outbound` boolean — This field is deprecated and will be removed in the future. Whether this phone number supports outbound calls
    - `provider` 'twilio'
    - `agent_id` string, nullable — Agent ID to assign the phone number to
    - `sid` string, required — Twilio Account SID
    - `token` string, required — Twilio Auth Token
    - `region_config` RegionConfigRequest
      - `region_id` 'us1' | 'ie1' | 'au1', required — Valid Twilio region IDs.
      - `token` string, required — Auth Token for this region
      - `edge_location` 'ashburn' | 'dublin' | 'frankfurt' | 'sao-paulo' | 'singapore' | 'sydney' | 'tokyo' | 'umatilla' | 'roaming', required — Valid Twilio edge locations.
    - `enable_sms` boolean — Route inbound SMS to ElevenLabs. On by default; set to false to skip SMS configuration for numbers that don't support it.
  - CreateExotelPhoneNumberRequest
    - `phone_number` string, required — Phone number
    - `label` string, required — Label for the phone number
    - `supports_inbound` boolean — This field is deprecated and will be removed in the future. Whether this phone number supports inbound calls
    - `supports_outbound` boolean — This field is deprecated and will be removed in the future. Whether this phone number supports outbound calls
    - `provider` 'exotel'
    - `agent_id` string, nullable — Agent ID to assign the phone number to
    - `account_sid` string, required — Exotel Account SID
    - `api_key` string, required — Exotel API Key
    - `api_token` string, required — Exotel API Token
    - `api_subdomain` 'api.in.exotel.com' | 'api.exotel.com', required
    - `app_id` string, required — Exotel applet identifier used in Calls/connect
    - `applet_url` string, nullable — Optional full applet URL override. Defaults to Exotel start_voice URL derived from account SID and app ID.
  - CreateSIPTrunkPhoneNumberRequestV2
    - `phone_number` string, required — Phone number
    - `label` string, required — Label for the phone number
    - `supports_inbound` boolean — This field is deprecated and will be removed in the future. Whether this phone number supports inbound calls
    - `supports_outbound` boolean — This field is deprecated and will be removed in the future. Whether this phone number supports outbound calls
    - `provider` 'sip_trunk'
    - `agent_id` string, nullable — Agent ID to assign the phone number to
    - `inbound_trunk_config` InboundSIPTrunkConfigRequestModel
      - `allowed_addresses` string[], nullable — List of IP addresses that are allowed to use the trunk. Each item in the list can be an individual IP address or a Classless Inter-Domain Routing notation representing a CIDR block.
      - `allowed_numbers` string[], nullable — List of phone numbers that are allowed to use the trunk.
      - `media_encryption` 'disabled' | 'allowed' | 'required'
      - `credentials` SIPTrunkCredentialsRequestModel
        - `username` string, required — SIP trunk username
        - `password` string, nullable — SIP trunk password - if not specified, then remain unchanged
      - `remote_domains` string[], nullable — Domains of remote SIP servers used to validate TLS certificates.
      - `attributes_to_headers` object — Map of dynamic variable name to header name for attributes_to_headers
    - `outbound_trunk_config` OutboundSIPTrunkConfigRequestModel
      - `address` string, required — Hostname or IP the SIP INVITE is sent to.
      - `transport` 'auto' | 'udp' | 'tcp' | 'tls'
      - `media_encryption` 'disabled' | 'allowed' | 'required'
      - `headers` object — SIP X-* headers for INVITE request. These headers are sent as-is and may help identify this call.
      - `attributes_to_headers` object — Map of dynamic variable name to header name for attributes_to_headers
      - `credentials` SIPTrunkCredentialsRequestModel
        - `username` string, required — SIP trunk username
        - `password` string, nullable — SIP trunk password - if not specified, then remain unchanged
      - `enabled_codecs` MediaCodec[] — Media codecs that should be offered in the SDP for outbound calls. If empty, all supported codecs are offered.

## Response `200`

Successful Response

- CreatePhoneNumberResponseModel
  - `phone_number_id` string, required — Phone entity ID

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/elevenlabs/apis/elevenlabs-api-documentation.md) · [All operations](https://skmtc.net/elevenlabs/apis/elevenlabs-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elevenlabs/elevenlabs-api-documentation/revisions/b96b80bcbb83/schema)
