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

# Import numbers from your own carrier account

> Imports only the selected numbers owned by the supplied phone connected service account. The number records are added to this workspace; inbound, outbound, and transfer routing use automatic outbound setup; incoming routing changes only when an inbound_agent_id is supplied. Inspect setup_errors and capability_readiness for partial failures. Requires a Sendora API key with write access. This operation can change workspace data or trigger an external side effect; review the request before sending it and do not retry blindly after a timeout.



## OpenAPI

````yaml /openapi.json post /api/v1/public/phone-numbers/import/confirm
openapi: 3.1.0
info:
  description: >-
    Customer-facing API for managing outreach, leads, conversations, voice
    agents, knowledge bases, analytics, and webhooks.
  title: Sendora Public API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.sendora.ai
security: []
tags:
  - description: Build, launch, pause and stop campaigns, and enroll leads.
    name: Campaigns
  - description: Create, update, tag, enrich and import leads.
    name: Leads
  - description: Group leads into reusable lists.
    name: Lead lists
  - description: Find new prospects and research existing leads.
    name: Prospecting
  - description: Read conversations and send messages to leads.
    name: Inbox
  - description: Manage workspace-wide suppressions.
    name: Do not contact
  - description: Manage the content your agents answer from.
    name: Knowledge bases
  - description: Create, configure, test and publish voice agents.
    name: Voice agents
  - description: Give agents actions such as booking, lookups and transfers.
    name: Agent tools
  - description: Embed a voice agent on your website.
    name: Voice widgets
  - description: Start voice calls and read call results.
    name: Calls
  - description: Browse and preview the voices an agent can use.
    name: Voices
  - description: List numbers, bring your own, and route calls.
    name: Phone numbers
  - description: List the channel accounts connected to the workspace.
    name: Connected accounts
  - description: Register endpoints and review deliveries.
    name: Webhooks
  - description: Drive the workspace assistant programmatically.
    name: Copilot
  - description: Read workspace and campaign performance.
    name: Analytics
  - description: Track asynchronous operations.
    name: Jobs
  - description: Manage client workspaces, plans and branding.
    name: Agency
paths:
  /api/v1/public/phone-numbers/import/confirm:
    post:
      tags:
        - Phone numbers
      summary: Import numbers from your own carrier account
      description: >-
        Imports only the selected numbers owned by the supplied phone connected
        service account. The number records are added to this workspace;
        inbound, outbound, and transfer routing use automatic outbound setup;
        incoming routing changes only when an inbound_agent_id is supplied.
        Inspect setup_errors and capability_readiness for partial failures.
        Requires a Sendora API key with write access. This operation can change
        workspace data or trigger an external side effect; review the request
        before sending it and do not retry blindly after a timeout.
      operationId: >-
        public_confirm_own_carrier_import_api_v1_public_phone_numbers_import_confirm_post
      parameters:
        - in: header
          name: X-API-Key
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
        - in: header
          name: Authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicPhoneProviderImportIn'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicPhoneProviderImportOut'
          description: Successful Response
        '401':
          description: The X-API-Key header is missing, invalid, expired, or revoked.
        '402':
          description: >-
            The workspace is suspended for billing, or the request would exceed
            a plan or usage limit.
        '403':
          description: >-
            The key is valid but lacks the required scope, or the workspace has
            no active plan, lacks the entitlement, or has this feature turned
            off or view-only.
        '410':
          description: The workspace behind this key has been deleted.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '500':
          description: >-
            An unexpected Sendora error occurred. Retry only if the operation is
            safe to repeat.
        '503':
          description: >-
            An entitlement or billing check is temporarily unavailable. Retry
            after the Retry-After interval.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - label: cURL
          lang: bash
          source: >-
            curl -X POST
            'https://api.sendora.ai/api/v1/public/phone-numbers/import/confirm'
            -H "X-API-Key: $SENDORA_API_KEY" -H "Content-Type: application/json"
            \
              -d '{"api_key":"example","number_ids":["example"]}'
        - label: Python
          lang: python
          source: >-
            import requests


            url =
            'https://api.sendora.ai/api/v1/public/phone-numbers/import/confirm'

            headers = {'X-API-Key': '$SENDORA_API_KEY'}

            response = requests.post(url, headers=headers, json={'api_key':
            'example', 'number_ids': ['example']})

            response.raise_for_status()

            print(response.json())
        - label: JavaScript
          lang: javascript
          source: >-
            const response = await
            fetch("https://api.sendora.ai/api/v1/public/phone-numbers/import/confirm",
            {
              method: "POST",
              headers: { 'X-API-Key': process.env.SENDORA_API_KEY, 'Content-Type': 'application/json' },
              body: JSON.stringify({"api_key": "example", "number_ids": ["example"]}),
            });

            if (!response.ok) throw new Error(await response.text());

            console.log(await response.json());
        - label: Go
          lang: go
          source: >-
            req, err := http.NewRequest("POST",
            "https://api.sendora.ai/api/v1/public/phone-numbers/import/confirm",
            bytes.NewBufferString(`{"api_key": "example", "number_ids":
            ["example"]}`))

            if err != nil { log.Fatal(err) }

            req.Header.Set("X-API-Key", os.Getenv("SENDORA_API_KEY"))

            req.Header.Set("Content-Type", "application/json")

            resp, err := http.DefaultClient.Do(req)

            if err != nil { log.Fatal(err) }

            defer resp.Body.Close()
components:
  schemas:
    PublicPhoneProviderImportIn:
      properties:
        api_key:
          description: API key for the phone connected service account being connected
          minLength: 10
          title: Api Key
          type: string
        inbound_agent_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The voice agent that answers incoming calls: an `id` from List voice
            agents.
          title: Inbound Agent Id
        number_ids:
          description: 'The numbers to import: `id` values from the import search results.'
          items:
            type: string
          minItems: 1
          title: Number Ids
          type: array
        outbound_voice_profile_id:
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            The outbound calling profile to use: an `id` from Get outbound
            calling setup options.
          title: Outbound Voice Profile Id
      required:
        - api_key
        - number_ids
      title: Publicconnected serviceImportIn
      type: object
    PublicPhoneProviderImportOut:
      properties:
        imported:
          description: Imported returned by the Sendora API.
          items:
            $ref: '#/components/schemas/PublicImportedNumber'
          title: Imported
          type: array
        note:
          description: Note returned by the Sendora API.
          title: Note
          type: string
        setup_errors:
          description: Setup errors returned by the Sendora API.
          items:
            $ref: '#/components/schemas/PhoneProviderSetupError'
          title: Setup Errors
          type: array
      required:
        - imported
        - note
      title: Publicconnected serviceImportOut
      type: object
    HTTPValidationError:
      properties:
        detail:
          description: Detail returned by the Sendora API.
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      required: []
      title: HTTPValidationError
      type: object
    PublicImportedNumber:
      properties:
        capability_readiness:
          additionalProperties:
            type: string
          description: Capability readiness returned by the Sendora API.
          title: Capability Readiness
          type: object
        created_at:
          description: Created at returned by the Sendora API.
          title: Created At
          type: string
        id:
          description: >-
            The imported number's id. Pass it to any endpoint that takes
            `number_id`.
          title: Id
          type: string
        number:
          description: Number returned by the Sendora API.
          title: Number
          type: string
        provisioning_state:
          anyOf:
            - type: string
            - type: 'null'
          description: Provisioning state returned by the Sendora API.
          title: Provisioning State
        source:
          anyOf:
            - type: string
            - type: 'null'
          description: Source returned by the Sendora API.
          title: Source
        status:
          description: Status returned by the Sendora API.
          title: Status
          type: string
        supports_mms:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Supports mms returned by the Sendora API.
          title: Supports Mms
        supports_sms:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Supports sms returned by the Sendora API.
          title: Supports Sms
        supports_voice:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Supports voice returned by the Sendora API.
          title: Supports Voice
      required:
        - id
        - number
        - status
        - created_at
      title: PublicImportedNumber
      type: object
    PhoneProviderSetupError:
      properties:
        message:
          description: Message returned by the Sendora API.
          title: Message
          type: string
        number_id:
          description: >-
            The phone number this refers to: an `id` from List connected phone
            numbers.
          title: Number Id
          type: string
      required:
        - number_id
        - message
      title: connected serviceSetupError
      type: object
    ValidationError:
      properties:
        loc:
          description: Loc returned by the Sendora API.
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          description: Msg returned by the Sendora API.
          title: Message
          type: string
        type:
          description: Type returned by the Sendora API.
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: Customer API key created in the Sendora dashboard.
      in: header
      name: X-API-Key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.