Fetch an instance of a short code

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

Messaging short codes

Fetch an instance of a short code

Path parameters

  • AccountSid string Required

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

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

  • Sid string Required

    The Twilio-provided string that uniquely identifies the ShortCode resource to fetch

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

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • account_sid string | null

      The SID of the Account that created this ShortCode 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 when an SMS message is sent to this short code.

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

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

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

      The date and time in GMT that this resource was last updated, specified in RFC 2822 format.

    • friendly_name string | null

      A string that you assigned to describe this resource. By default, the FriendlyName is the short code.

    • short_code string | null

      The short code. e.g., 894546.

    • sid string | null

      The unique string that that we created to identify this ShortCode 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

      The HTTP method we use to call the sms_fallback_url. Can be: GET or POST.

      Values are GET or POST.

    • sms_fallback_url string(uri) | null

      The URL that we call if an error occurs while retrieving or executing the TwiML from sms_url.

    • sms_method string(http-method) | null

      The HTTP method we use to call the sms_url. Can be: GET or POST.

      Values are GET or POST.

    • sms_url string(uri) | null

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

    • uri string | null

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

GET /2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json
curl \
 --request GET 'https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json' \
 --user "username:password"
Response examples (200)
{
  "sid": "SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SMS/ShortCodes/SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
  "sms_url": null,
  "short_code": "99990",
  "sms_method": "POST",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "api_version": "2010-04-01",
  "date_created": "Thu, 01 Apr 2010 00:00:00 +0000",
  "date_updated": "Thu, 01 Apr 2010 00:00:00 +0000",
  "friendly_name": "API_CLUSTER_TEST_SHORT_CODE",
  "sms_fallback_url": null,
  "sms_fallback_method": "POST"
}