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

# Import phone numbers

> Import phone numbers with your own SIP termination.



## OpenAPI

````yaml api-reference/telephony/openapi.json POST /v1/telephony/phone-numbers/import/manual
openapi: 3.0.3
info:
  title: Persistence Telephony API
  version: '1.0'
  description: Manage the phone numbers your agents call from and answer on.
servers:
  - url: https://api.persistence.dev
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Telephony
    description: Phone number management.
paths:
  /v1/telephony/phone-numbers/import/manual:
    post:
      tags:
        - Telephony
      summary: Import phone numbers
      description: >-
        Import one or more owned phone numbers with optional agent bindings,
        country policies, and SIP termination.
      operationId: importPhoneNumbers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportPhoneNumbersRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneNumberListEnvelope'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ImportPhoneNumbersRequest:
      type: object
      required:
        - phoneNumbers
      properties:
        phoneNumbers:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/ImportPhoneNumber'
    PhoneNumberListEnvelope:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: array
          items:
            $ref: '#/components/schemas/PhoneNumber'
    Error:
      type: object
      properties:
        code:
          type: string
        error:
          type: string
    ImportPhoneNumber:
      type: object
      required:
        - phoneNumber
      properties:
        phoneNumber:
          type: string
        country:
          type: string
        providerAccountId:
          type: string
          nullable: true
        friendlyName:
          type: string
        inboundAgentId:
          type: string
          nullable: true
        outboundAgentId:
          type: string
          nullable: true
        allowedInboundCountries:
          type: array
          items:
            type: string
        allowedOutboundCountries:
          type: array
          items:
            type: string
        outboundTermination:
          $ref: '#/components/schemas/SIPTermination'
    PhoneNumber:
      type: object
      properties:
        allowedInboundCountries:
          type: array
          items:
            type: string
        allowedOutboundCountries:
          type: array
          items:
            type: string
        country:
          type: string
        createdAt:
          type: string
        friendlyName:
          type: string
        id:
          type: string
        inboundAgentName:
          type: string
        inboundAgentPublicId:
          type: string
        inboundWebhookUrl:
          type: string
        isCustomerManaged:
          type: boolean
        isInboundReady:
          type: boolean
        isOutboundReady:
          type: boolean
        label:
          type: string
        outboundAgentName:
          type: string
        outboundAgentPublicId:
          type: string
        phoneNumber:
          type: string
        provider:
          type: string
        providerCurrency:
          type: string
        providerMonthlyCost:
          type: number
        sipConfig:
          $ref: '#/components/schemas/SipConfig'
        spaceId:
          type: string
        status:
          type: string
        updatedAt:
          type: string
    SIPTermination:
      type: object
      required:
        - terminationUrl
      properties:
        terminationUrl:
          type: string
        transport:
          type: string
        username:
          type: string
        password:
          type: string
          format: password
    SipConfig:
      type: object
      properties:
        ipAllowlist:
          type: array
          items:
            type: string
        password:
          type: string
        terminationUrl:
          type: string
        transport:
          type: string
        username:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key issued for your workspace.

````