> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cartesia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Import Phone Number



## OpenAPI

````yaml /latest.yml POST /agents/phone-numbers
openapi: 3.0.1
info:
  title: Cartesia API
  version: 0.0.1
servers:
  - url: https://api.cartesia.ai
    description: Production
security: []
paths:
  /agents/phone-numbers:
    post:
      tags:
        - Phone Numbers
      summary: Import Phone Number
      operationId: phone_numbers_import
      parameters:
        - $ref: '#/components/parameters/CartesiaVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportPhoneNumberBody'
      responses:
        '201':
          description: Phone number imported.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneNumberResponse'
        '400':
          description: >-
            Import failed. Possible reasons: phone number not found in the
            provider account, Twilio lookup failed, provider credentials
            incomplete, webhook configuration failed (number imported but agent
            not assigned — retry via PATCH), or unsupported provider type.
        '404':
          description: Provider or agent not found.
        '409':
          description: Phone number has already been imported.
      security:
        - APIKeyAuth: []
components:
  parameters:
    CartesiaVersionHeader:
      name: Cartesia-Version
      in: header
      description: API version header.
      required: true
      schema:
        type: string
        format: date
        example: '2026-03-01'
        enum:
          - '2026-03-01'
  schemas:
    ImportPhoneNumberBody:
      title: ImportPhoneNumberBody
      type: object
      description: >-
        Request body for importing a phone number from an existing provider.

        The number of Cartesia phone numbers is limited by your subscription
        plan.
      properties:
        label:
          type: string
          description: A human-readable name for the phone number.
        number:
          type: string
          description: The phone number in E.164 format.
        provider:
          description: >-
            Reference to the provider. Pass `{ "id": "..." }` for an existing
            provider, or `{ "type": "twilio", "account_sid": "...", "region":
            "..." }` to look up by account.
          oneOf:
            - type: object
              title: By ID
              properties:
                id:
                  type: string
              required:
                - id
            - type: object
              title: By Twilio Account
              properties:
                type:
                  type: string
                  enum:
                    - twilio
                account_sid:
                  type: string
                region:
                  $ref: '#/components/schemas/TelephonyRegion'
              required:
                - type
                - account_sid
        agent_id:
          type: string
          description: >-
            Optional agent ID to assign. Inbound calls to the number will be
            routed to this agent.
      required:
        - label
        - number
        - provider
    PhoneNumberResponse:
      title: PhoneNumberResponse
      description: A phone number with its provider and agent assignment details.
      allOf:
        - $ref: '#/components/schemas/PhoneNumberBaseResponse'
        - type: object
          properties:
            provider:
              $ref: '#/components/schemas/ProviderResponse'
          required:
            - provider
    TelephonyRegion:
      title: TelephonyRegion
      type: string
      enum:
        - us1
        - ie1
        - au1
      description: >-
        The Twilio region the phone number and API key are configured for. `us1`
        (US), `ie1` (Ireland), `au1` (Australia). Default is `us1`.
      default: us1
    PhoneNumberBaseResponse:
      title: PhoneNumberBaseResponse
      type: object
      description: Common phone number fields.
      properties:
        id:
          type: string
          description: Unique identifier for the phone number.
        label:
          type: string
          nullable: true
          description: A human-readable name for the phone number.
        number:
          type: string
          description: The phone number in E.164 format (e.g. +14155551234).
        agent:
          nullable: true
          description: The agent assigned to handle inbound calls, or null if unassigned.
          type: object
          properties:
            id:
              type: string
            name:
              type: string
          required:
            - id
            - name
        created_at:
          type: string
          format: date-time
          description: UTC timestamp when the phone number was created.
        updated_at:
          type: string
          format: date-time
          description: UTC timestamp when the phone number was last updated.
      required:
        - id
        - number
        - agent
        - created_at
        - updated_at
    ProviderResponse:
      title: Provider
      description: >-
        The telephony provider associated with a phone number. One of `Twilio`
        or `Cartesia`, determined by the `type` field.
      oneOf:
        - $ref: '#/components/schemas/TwilioProviderResponse'
        - $ref: '#/components/schemas/CartesiaProviderResponse'
      discriminator:
        propertyName: type
        mapping:
          twilio:
            $ref: '#/components/schemas/TwilioProviderResponse'
          cartesia:
            $ref: '#/components/schemas/CartesiaProviderResponse'
    TwilioProviderResponse:
      title: Twilio
      type: object
      description: >-
        A linked Twilio account. The `api_key_sid` field is partially masked in
        responses.
      properties:
        type:
          type: string
          enum:
            - twilio
          description: Always `"twilio"`.
        id:
          type: string
          description: Unique identifier for the provider.
        account_sid:
          type: string
          description: The Twilio account SID.
        api_key_sid:
          type: string
          description: The Twilio API key SID (partially masked).
        region:
          $ref: '#/components/schemas/TelephonyRegion'
      required:
        - type
        - id
        - account_sid
        - api_key_sid
        - region
    CartesiaProviderResponse:
      title: Cartesia
      type: object
      description: A Cartesia-managed provider. US phone numbers only.
      properties:
        type:
          type: string
          enum:
            - cartesia
          description: Always `"cartesia"`.
      required:
        - type
  securitySchemes:
    APIKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Cartesia API key (`sk_car_...`). Get one at
        [play.cartesia.ai/keys](https://play.cartesia.ai/keys).

````