Update a short code with the following parameters

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

Messaging short codes

Update a short code with the following parameters

Path parameters

  • AccountSid string Required

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

  • Sid string Required

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

Body

  • The API version to use to start a new TwiML session. Can be: 2010-04-01 or 2008-08-01.

  • A descriptive string that you created to describe this resource. It can be up to 64 characters long. By default, the FriendlyName is the short code.

  • SmsFallbackMethod string(http-method)

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

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

  • SmsFallbackUrl string(uri)

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

  • SmsMethod string(http-method)

    The HTTP method we should use when calling the sms_url. Can be: GET or POST.

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

  • SmsUrl string(uri)

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

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

POST /2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json
curl \
 -X POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json \
 --user "username:password" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -d 'ApiVersion=string&FriendlyName=string&SmsFallbackMethod=HEAD&SmsFallbackUrl=https%3A%2F%2Fexample.com&SmsMethod=HEAD&SmsUrl=https%3A%2F%2Fexample.com'
Request example
{
  "ApiVersion": "string",
  "FriendlyName": "string",
  "SmsFallbackMethod": "HEAD",
  "SmsFallbackUrl": "https://example.com",
  "SmsMethod": "HEAD",
  "SmsUrl": "https://example.com"
}
Request examples
{
  "ApiVersion": "string",
  "FriendlyName": "string",
  "SmsFallbackMethod": "HEAD",
  "SmsFallbackUrl": "https://example.com",
  "SmsMethod": "HEAD",
  "SmsUrl": "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"
}
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"
}