Update a short code with the following parameters

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://twilio.demo.bump-doc.com/doc/api/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
"Api MCP server": {
  "url": "https://twilio.demo.bump-doc.com/doc/api/mcp"
}
Close
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.

    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 update

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

application/x-www-form-urlencoded

Body

  • FriendlyName string

    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.

  • ApiVersion string

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

  • SmsUrl string(uri)

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

  • SmsMethod string(http-method)

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

    Values are GET or POST.

  • SmsFallbackUrl string(uri)

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

  • SmsFallbackMethod string(http-method)

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

    Values are GET or POST.

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.

POST /2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json
curl \
 --request POST 'https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json' \
 --user "username:password" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --data 'ApiVersion=2010-04-01&FriendlyName=friendly_name&SmsFallbackMethod=POST&SmsFallbackUrl=https%3A%2F%2Fexample.com&SmsMethod=POST&SmsUrl=https%3A%2F%2Fexample.com'
Request example
{"ApiVersion" => "2010-04-01", "FriendlyName" => "friendly_name", "SmsFallbackMethod" => "POST", "SmsFallbackUrl" => "https://example.com", "SmsMethod" => "POST", "SmsUrl" => "https://example.com"}
Response examples (200)
{
  "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",
  "short_code": "99990",
  "sid": "SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "sms_fallback_method": "POST",
  "sms_fallback_url": null,
  "sms_method": "POST",
  "sms_url": null,
  "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SMS/ShortCodes/SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
}