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.

  • Sid string Required

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

Responses

  • OK

    Hide response attributes Show response attributes object
    • 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

GET /2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json
curl \
 -X GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json \
 --user "username:password"
Response examples (200)
{
  "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"
}
Response examples (200)
{
  "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"
}