Menu

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Short Codes Subresource

Public Beta
Twilio's Messaging Services API is currently available as a Public Beta product. Some features are not yet implemented and others may be changed before the product is declared as Generally Available.
Public Beta products are not covered by a Twilio SLA.

The Short Code subresource of a Service instance represents the short codes you have associated to the Service.

When a shortcode has been added to the Messaging Service, Copilot will always attempt to prioritize message delivery with your shortcode when possible. If the shortcode cannot be used to reach your user, Copilot's Shortcode Reroute will select a phone number in your Service instead.

Inbound messages received on any of short codes associated to a Messaging Service are passed to the inbound request URL of the Service. Twilio will make HTTP requests with the following parameters and values to the application you have hosted in this URL.

Short Code Properties

account_sid
sid<AC> Not PII

The 34 character unique sid of the Account.

capabilities
object[] Not PII

Any array of values that indicate whether the number can receive calls or messages. Possible capabilities are SMS and MMS.

country_code
string Not PII

The 2 character ISO Country Code of the number.

date_created
date_time<iso8601> Not PII

The date that this resource was created.

date_updated
date_time<iso8601> Not PII

The date that this resource was last updated.

service_sid
sid<MG> Not PII

The 34 character unique sid of the Service.

short_code
string Not PII

The E.164 format of the short code.

sid
sid<SC> Not PII

The 34 character unique sid of the Short Code

Add a Short Code in a Service

post
https://messaging.twilio.com/v1/Services/{ServiceSid}/ShortCodes
Parameters
ShortCodeSid
Required
post sid<SC> Not PII

ShortCodeSid for the Shortcode being added to the Service..

Example
Loading Code Sample...
      
      
      
      

      View a Short Code from a Service

      get
      https://messaging.twilio.com/v1/Services/{ServiceSid}/ShortCodes/{Sid}
      Example
      Loading Code Sample...
          
          
          
          

          List all Short Codes in a Service

          get
          https://messaging.twilio.com/v1/Services/{ServiceSid}/ShortCodes
          Example
          Loading Code Sample...
              
              
              
              

              Remove a Short Code from a Service

              delete
              https://messaging.twilio.com/v1/Services/{ServiceSid}/ShortCodes/{Sid}

              Removing a short code from the Messaging Service does not release the short code from your account. You must cancel the short code from your Account in order to disassociate and delete the short code from your Messaging Service.

              Returns a 204 NO CONTENT if the short code was successfully removed from the service.

              Example
              Loading Code Sample...
                  
                  
                  
                  

                  Need some help?

                  We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.

                  Loading Code Sample...