Retrieve a list of incoming-phone-numbers belonging to the account used to make the request

GET /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json

Incoming phone numbers on a Twilio account/project

Retrieve a list of incoming-phone-numbers belonging to the account used to make the request.

Path parameters

  • AccountSid string Required

    The SID of the Account that created the IncomingPhoneNumber resources to read.

Query parameters

  • Beta boolean

    Whether to include phone numbers new to the Twilio platform. Can be: true or false and the default is true.

  • A string that identifies the IncomingPhoneNumber resources to read.

  • PhoneNumber string(phone-number)

    The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.

  • Origin string

    Whether to include phone numbers based on their origin. Can be: twilio or hosted. By default, phone numbers of all origin are included.

  • PageSize integer

    How many resources to return in each list page. The default is 50, and the maximum is 1000.

    Minimum value is 1, maximum value is 1000.

Responses

  • OK

    Hide response attributes Show response attributes object
    • end integer
    • first_page_uri string(uri)
    • Hide incoming_phone_numbers attributes Show incoming_phone_numbers attributes array[object]
      • account_sid string | null

        The SID of the Account that created the resource

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

      • Whether the phone number requires an Address registered with Twilio.

        Values are none, any, local, or foreign.

      • address_sid string | null

        The SID of the Address resource associated with the phone number

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AD[0-9a-fA-F]{32}$.

      • api_version string | null

        The API version used to start a new TwiML session

      • beta boolean | null

        Whether the phone number is new to the Twilio platform

      • bundle_sid string | null

        The SID of the Bundle resource associated with number

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^BU[0-9a-fA-F]{32}$.

      • capabilities object(phone-number-capabilities) | null

        Indicate if a phone can receive calls or messages

        Hide capabilities attributes Show capabilities attributes object(phone-number-capabilities) | null
      • date_created string(date-time-rfc-2822) | null

        The RFC 2822 date and time in GMT that the resource was created

      • date_updated string(date-time-rfc-2822) | null

        The RFC 2822 date and time in GMT that the resource was last updated

      • The emergency address configuration to use for emergency calling

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AD[0-9a-fA-F]{32}$.

      • State of the emergency address configuration for the phone number

        Values are registered, unregistered, pending-registration, registration-failure, pending-unregistration, or unregistration-failure.

      • emergency_status string | null

        Displays if emergency calling is enabled for this number.

        Values are Active or Inactive.

      • friendly_name string | null

        The string that you assigned to describe the resource

      • identity_sid string | null

        The SID of the Identity resource associated with number

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^RI[0-9a-fA-F]{32}$.

      • origin string | null

        The phone number's origin. Can be twilio or hosted.

      • phone_number string(phone-number) | null

        The phone number in E.164 format

      • sid string | null

        The unique string that identifies the resource

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^PN[0-9a-fA-F]{32}$.

      • sms_application_sid string | null

        The SID of the application that handles SMS messages sent to the phone number

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AP[0-9a-fA-F]{32}$.

      • sms_fallback_method string(http-method) | null

        The HTTP method used with sms_fallback_url

        Values are HEAD, GET, POST, PATCH, PUT, or DELETE.

      • sms_fallback_url string(uri) | null

        The URL that we call when an error occurs while retrieving or executing the TwiML

      • sms_method string(http-method) | null

        The HTTP method to use with sms_url

        Values are HEAD, GET, POST, PATCH, PUT, or DELETE.

      • sms_url string(uri) | null

        The URL we call when the phone number receives an incoming SMS message

      • status string | null
      • status_callback string(uri) | null

        The URL to send status information to your application

      • status_callback_method string(http-method) | null

        The HTTP method we use to call status_callback

        Values are HEAD, GET, POST, PATCH, PUT, or DELETE.

      • trunk_sid string | null

        The SID of the Trunk that handles calls to the phone number

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^TK[0-9a-fA-F]{32}$.

      • uri string(uri) | null

        The URI of the resource, relative to https://api.twilio.com

      • The SID of the application that handles calls to the phone number

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AP[0-9a-fA-F]{32}$.

      • Whether to lookup the caller's name

      • voice_fallback_method string(http-method) | null

        The HTTP method used with voice_fallback_url

        Values are HEAD, GET, POST, PATCH, PUT, or DELETE.

      • voice_fallback_url string(uri) | null

        The URL we call when an error occurs in TwiML

      • voice_method string(http-method) | null

        The HTTP method used with the voice_url

        Values are HEAD, GET, POST, PATCH, PUT, or DELETE.

      • voice_receive_mode string | null

        Values are voice or fax.

      • voice_url string(uri) | null

        The URL we call when the phone number receives a call

    • next_page_uri string(uri)
    • page integer
    • page_size integer
    • start integer
    • uri string(uri)
GET /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json
curl \
 -X GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json \
 --user "username:password"
Response examples (200)
{
  "end": 42,
  "first_page_uri": "https://example.com",
  "incoming_phone_numbers": [
    {
      "account_sid": "string",
      "address_requirements": "none",
      "address_sid": "string",
      "api_version": "string",
      "beta": true,
      "bundle_sid": "string",
      "capabilities": {
        "fax": true,
        "mms": true,
        "sms": true,
        "voice": true
      },
      "date_created": "string",
      "date_updated": "string",
      "emergency_address_sid": "string",
      "emergency_address_status": "registered",
      "emergency_status": "Active",
      "friendly_name": "string",
      "identity_sid": "string",
      "origin": "string",
      "phone_number": "string",
      "sid": "string",
      "sms_application_sid": "string",
      "sms_fallback_method": "HEAD",
      "sms_fallback_url": "https://example.com",
      "sms_method": "HEAD",
      "sms_url": "https://example.com",
      "status": "string",
      "status_callback": "https://example.com",
      "status_callback_method": "HEAD",
      "trunk_sid": "string",
      "uri": "https://example.com",
      "voice_application_sid": "string",
      "voice_caller_id_lookup": true,
      "voice_fallback_method": "HEAD",
      "voice_fallback_url": "https://example.com",
      "voice_method": "HEAD",
      "voice_receive_mode": "voice",
      "voice_url": "https://example.com"
    }
  ],
  "next_page_uri": "https://example.com",
  "page": 42,
  "page_size": 42,
  "previous_page_uri": "https://example.com",
  "start": 42,
  "uri": "https://example.com"
}
Response examples (200)
{
  "end": 42,
  "first_page_uri": "https://example.com",
  "incoming_phone_numbers": [
    {
      "account_sid": "string",
      "address_requirements": "none",
      "address_sid": "string",
      "api_version": "string",
      "beta": true,
      "bundle_sid": "string",
      "capabilities": {
        "fax": true,
        "mms": true,
        "sms": true,
        "voice": true
      },
      "date_created": "string",
      "date_updated": "string",
      "emergency_address_sid": "string",
      "emergency_address_status": "registered",
      "emergency_status": "Active",
      "friendly_name": "string",
      "identity_sid": "string",
      "origin": "string",
      "phone_number": "string",
      "sid": "string",
      "sms_application_sid": "string",
      "sms_fallback_method": "HEAD",
      "sms_fallback_url": "https://example.com",
      "sms_method": "HEAD",
      "sms_url": "https://example.com",
      "status": "string",
      "status_callback": "https://example.com",
      "status_callback_method": "HEAD",
      "trunk_sid": "string",
      "uri": "https://example.com",
      "voice_application_sid": "string",
      "voice_caller_id_lookup": true,
      "voice_fallback_method": "HEAD",
      "voice_fallback_url": "https://example.com",
      "voice_method": "HEAD",
      "voice_receive_mode": "voice",
      "voice_url": "https://example.com"
    }
  ],
  "next_page_uri": "https://example.com",
  "page": 42,
  "page_size": 42,
  "previous_page_uri": "https://example.com",
  "start": 42,
  "uri": "https://example.com"
}