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

# Import Number

> Import number from provider. Please add provider credentials in the provider credentials section before you import an phone number.



## OpenAPI

````yaml https://api-prod.interactly.ai/api-docs/common/api.json post /assistants/v1/numbers/{provider}
openapi: 3.1.0
info:
  title: Interactly API
  description: API for building interactly.ai services
  version: 1.1.0
  contact:
    name: Interactly
    url: https://interactly.ai
    email: developers@interactly.ai
servers:
  - url: https://api-prod.interactly.ai
    description: API Server
security: []
paths:
  /assistants/v1/numbers/{provider}:
    post:
      tags:
        - Phone Numbers
      summary: Import Number
      description: >-
        Import number from provider. Please add provider credentials in the
        provider credentials section before you import an phone number.
      operationId: importNumber
      parameters:
        - name: provider
          in: path
          description: 'Give your provider name. Ex: twilio, Available providers: twilio'
          required: true
          schema:
            type: string
          example: twilio
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                number:
                  type: string
                  description: >-
                    Phone number to import. Please provide in E.164 format, Ex:
                    +1234567890
                  example: '+1234567890'
                label:
                  type: string
                  description: Label for the number
                  example: friendly-name-1
                credentials:
                  type: object
                  description: >-
                    Credentials for the provider. If credentials are not
                    provided, the default credentials from the provider
                    credentials section will be used.
                  example:
                    accountSid: AC1234567890
                    authToken: '1234567890'
                  oneOf:
                    - $ref: '#/components/schemas/TwilioCredentials'
                      title: Twilio Credentials
              required:
                - number
      responses:
        '200':
          description: Successfully imported the number.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Number'
        '404':
          description: Number not found at provider
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Number not found at Twilio account
        '406':
          description: Provider credentials missing
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Twilio credits are missing in Provider credentials
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Failed to purchase number
                  error:
                    type: string
                    example: INTERNAL_ERROR
      security:
        - bearer: []
components:
  schemas:
    TwilioCredentials:
      type: object
      description: >-
        The credentials for the Twilio account. You can get these from the
        Twilio console. If you don't have an `authToken`, you can use the
        `apiKeySid` and `apiSecret` instead.
      properties:
        accountSid:
          type: string
          description: This is the account sid of the Twilio account.
        authToken:
          type: string
          description: >-
            This is the auth token of the Twilio account. If you don't have an
            `authToken`, you can use the `apiKeySid` and `apiSecret` instead.
        apiKeySid:
          type: string
          description: This is the api key sid of the Twilio account.
        apiSecret:
          type: string
          description: This is the api secret of the Twilio account.
    Number:
      type: object
      required:
        - _id
        - teamId
        - number
        - provider
      properties:
        _id:
          type: string
          format: objectId
          description: Unique identifier of the number
          example: a12f9c88-c155-461f-9771-4d240cdc9a04
        teamId:
          type: string
          format: objectId
          description: This is unique identifier of the team.
          example: 1f7b1b1b1b1b1b1b1b1b1b1b
        number:
          type: string
          description: Phone number associated with the team
          example: '+1234567890'
        provider:
          type: object
          properties:
            name:
              type: string
              description: Name of the provider
              example: twilio
        assistantId:
          type: string
          description: ID of the associated assistant (if any)
          example: a12f9c88-c155-461f-9771-4d240cdc9a04
        inboundEnabled:
          type: boolean
          description: >-
            If true, inbound call is enabled. If false, inbound call is
            disabled.
          example: true
        outboundEnabled:
          type: boolean
          description: >-
            If true, outbound call is enabled. If false, outbound call is
            disabled.
          example: true
        label:
          type: string
          description: Label for the number
          example: friendly-name-1
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: Bearer
      type: http
      description: >-
        Retrieve your API Key from [Dashboard API Keys
        Section](https://dashboard.interactly.ai/api-keys).

````