Retrieve a list of short-codes belonging to the account used to make the request

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

Messaging short codes

Retrieve a list of short-codes belonging to the account used to make the request

Path parameters

  • AccountSid string Required

    The SID of the Account that created the ShortCode resource(s) to read.

Query parameters

  • The string that identifies the ShortCode resources to read.

  • Only show the ShortCode resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit.

  • 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

  • 200

    OK

    Hide response attributes Show response attributes object
    • end integer
    • first_page_uri string(uri)
    • next_page_uri string(uri)
    • page integer
    • page_size integer
    • short_codes array[object]
      Hide short_codes attributes Show short_codes attributes
      • account_sid string | null

        The SID of the Account that created this resource

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

      • api_version string | null

        The API version used to start a new TwiML session

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

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

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

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

      • friendly_name string | null

        A string that you assigned to describe this resource

      • short_code string | null

        The short code. e.g., 894546.

      • sid string | null

        The unique string that identifies this resource

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

      • sms_fallback_method string(http-method) | null

        HTTP method we use to call the sms_fallback_url

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

      • sms_fallback_url string(uri) | null

        URL Twilio will request if an error occurs in executing TwiML

      • sms_method string(http-method) | null

        HTTP method to use when requesting the sms url

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

      • sms_url string(uri) | null

        URL we call when receiving an incoming SMS message to this short code

      • uri string(uri) | null

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

    • start integer
    • uri string(uri)
GET /2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes.json
curl \
 -X GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes.json \
 --user "username:password"
Response examples (200)
{
  "end": 42,
  "first_page_uri": "https://example.com",
  "next_page_uri": "https://example.com",
  "page": 42,
  "page_size": 42,
  "previous_page_uri": "https://example.com",
  "short_codes": [
    {
      "account_sid": "string",
      "api_version": "string",
      "date_created": "string",
      "date_updated": "string",
      "friendly_name": "string",
      "short_code": "string",
      "sid": "string",
      "sms_fallback_method": "HEAD",
      "sms_fallback_url": "https://example.com",
      "sms_method": "HEAD",
      "sms_url": "https://example.com",
      "uri": "https://example.com"
    }
  ],
  "start": 42,
  "uri": "https://example.com"
}