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

# List Twilio Phone Numbers

> Lists the phone numbers of your own Twilio account that can be imported: its active numbers and its verified caller IDs. Send the credentials of that Twilio account in the body: `accountSid` and `authToken`, or `accountSid`, `apiKeySid` and the API Key Secret in `authToken`. They must have full access (Auth Token or Standard API Key, not a Restricted one) and are not stored. A number already imported in your account carries its `phoneNumberId`.



## OpenAPI

````yaml post /v2/PhoneNumber/Twilio/List
openapi: 3.0.1
info:
  title: NLPearl Client API
  description: A sample API that demonstrates features in the OpenAPI specification
  version: v2
servers:
  - url: https://api.nlpearl.ai
    description: Production Environement
security:
  - bearer_auth: []
  - oauth2_client_credentials: []
tags:
  - name: Pearl
    description: >-
      Manage your Pearls, the AI agents that handle your inbound and outbound
      calls. Create and configure Pearls, retrieve their details and settings,
      run or pause them, list and bulk-export their calls, monitor calls in
      progress, get analytics, and reset a customer's conversation memory.
paths:
  /v2/PhoneNumber/Twilio/List:
    post:
      tags:
        - PhoneNumber
      summary: List Twilio Phone Numbers
      description: >-
        Lists the phone numbers of your own Twilio account that can be imported:
        its active numbers and its verified caller IDs. Send the credentials of
        that Twilio account in the body: `accountSid` and `authToken`, or
        `accountSid`, `apiKeySid` and the API Key Secret in `authToken`. They
        must have full access (Auth Token or Standard API Key, not a Restricted
        one) and are not stored. A number already imported in your account
        carries its `phoneNumberId`.
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TwilioCredentialsApi'
              description: "The credentials of your own Twilio account, sent with each Twilio request: the Account SID with the Auth Token,\r\nor the Account SID with the SID of a Standard API Key and its secret.\r\nThey are not saved as the Twilio integration of your account: listing the numbers does not store them, and an imported number keeps them only for its own calls."
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TwilioCredentialsApi'
              description: "The credentials of your own Twilio account, sent with each Twilio request: the Account SID with the Auth Token,\r\nor the Account SID with the SID of a Standard API Key and its secret.\r\nThey are not saved as the Twilio integration of your account: listing the numbers does not store them, and an imported number keeps them only for its own calls."
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TwilioCredentialsApi'
              description: "The credentials of your own Twilio account, sent with each Twilio request: the Account SID with the Auth Token,\r\nor the Account SID with the SID of a Standard API Key and its secret.\r\nThey are not saved as the Twilio integration of your account: listing the numbers does not store them, and an imported number keeps them only for its own calls."
      responses:
        '200':
          description: The phone numbers of the Twilio account.
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TwilioPhoneNumberApiView'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TwilioPhoneNumberApiView'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TwilioPhoneNumberApiView'
        '400':
          description: Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
components:
  schemas:
    TwilioCredentialsApi:
      required:
        - accountSid
        - authToken
      type: object
      properties:
        accountSid:
          minLength: 1
          type: string
          description: The Account SID of your Twilio account (starts with `AC`).
        authToken:
          minLength: 1
          type: string
          description: >-
            The Auth Token of your Twilio account, or the API Key Secret when
            `apiKeySid` is provided. The credentials must have full access: a
            Restricted API Key is rejected.
        apiKeySid:
          type: string
          description: >-
            Optional SID of a Standard API Key of your Twilio account (starts
            with `SK`). Leave it empty to authenticate with the Auth Token.
          nullable: true
      additionalProperties: false
      description: "The credentials of your own Twilio account, sent with each Twilio request: the Account SID with the Auth Token,\r\nor the Account SID with the SID of a Standard API Key and its secret.\r\nThey are not saved as the Twilio integration of your account: listing the numbers does not store them, and an imported number keeps them only for its own calls."
    TwilioPhoneNumberApiView:
      type: object
      properties:
        number:
          type: string
          description: 'The phone number in E.164 format: the `number` to send to import it.'
          nullable: true
        sid:
          type: string
          description: The Twilio SID of the phone number, as shown in the Twilio console.
          nullable: true
        friendlyName:
          type: string
          description: The friendly name of the phone number in Twilio, if any.
          nullable: true
        isVerifiedCallerId:
          type: boolean
          description: >-
            Whether the number is a verified caller ID: a number hosted outside
            Twilio and only verified on it as a caller ID. Such a number is
            imported for outbound calls only.
        phoneNumberId:
          type: string
          description: >-
            The ID of the phone number in your account when this number is
            already imported. Omitted otherwise.
          nullable: true
      additionalProperties: false
      description: A phone number found in your own Twilio account, which can be imported.
    ValidationProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          nullable: true
      additionalProperties: {}
  securitySchemes:
    bearer_auth:
      type: http
      description: >-
        Specify the authorization token.


        For more information, check out the [Authorization
        Guide](/api-reference/authorization).
      scheme: bearer
    oauth2_client_credentials:
      type: oauth2
      description: >-
        OAuth2 client_credentials grant. Use the Id of an OAuth API key as
        `client_id` and its one-time secret as `client_secret`.
      flows:
        clientCredentials:
          tokenUrl: /oauth/token
          scopes:
            pearls:read: List and view Pearls
            pearls:write: >-
              Create and update Pearls (settings, conversation flows, voices);
              implies pearls:read
            pearls:moderate: Run/pause Pearls and reset customer memory; implies pearls:read
            pearls:analytics: Read Pearl analytics; implies pearls:read
            pearls:leads: Manage and read outbound leads; implies pearls:read
            pearls:calls: >-
              Read calls and recordings, make and delete calls; implies
              pearls:read
            account:phone_numbers: >-
              Read account phone numbers and text channels, manage custom VoIP
              numbers, import Twilio numbers and delete phone numbers
            account:users: Read account users
            account:advanced: Manage advanced account settings (blacklist)
            account:billing: Read account information and credit balance
            account:audit_log: Read the audit log
            tts: Synthesise speech and clone voices

````

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