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?

Services

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.

When messages are sent using a Messaging Service, enabled Copilot features assist to improve message performance.

Developers can associate phone numbers, short codes, and alpha sender IDs to an instance of a Messaging Service. All inbound and outbound behaviors for the phone numbers and shortcodes are handled by the configuration of the Service.

Twilio Console

You can manage your Messaging Services through the Twilio Console when logged in.

Messaging Services Resource

The Services resource of Messaging represents a set of configurable behavior for sending and receiving Messages.

Subresources

The Services resource also has phone numbers, short codes, and alpha sender IDs subresources for managing the phone numbers, short codes, and alpha sender IDs associated with the Service.

Resource URI

All URLs in this documentation use the following base URL:

https://messaging.twilio.com/v1

Service properties

account_sid
sid<AC> Not PII

Unique 34 character ID of the Account that created this Service.

area_code_geomatch
boolean Not PII

Configuration to enable or disable Area Code Geomatch on your Service Instance. Possible values are true and false.

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.

fallback_method
http_method Not PII

The HTTP method Twilio will use when making requests to the Fallback URL. Possible values include GET or POST.

fallback_to_long_code
boolean Not PII

Configuration to enable or disable Fallback to Long Code for messages sent through your Service instance. Possible values are true and false.

fallback_url
url Not PII

The URL that Twilio will request if an error occurs when retrieving or executing the TwiML from your Inbound Request URL.

friendly_name
string Not PII

A human readable descriptive text for this resource, up to 64 characters.

inbound_method
http_method Not PII

The HTTP method Twilio will use when making requests to the Inbound Request URL. Possible values are GET or POST.

inbound_request_url
url Not PII

The URL Twilio will make a webhook request to when a message is received by any phone number or short code in your Service. When this property is null receiving inbound messages is disabled. All messages sent to your Twilio phone number or short code will not be logged and received on your Account.

mms_converter
boolean Not PII

Configuration to enable or disable MMS Converter for messages sent through your Service instance. Possible values are true and false.

sid
sid<MG> Not PII

Unique 34 character ID of the Service.

smart_encoding
boolean Not PII

Configuration to enable or disable Smart Encoding for messages sent through your Service instance. Possible values are true and false.

status_callback
url Not PII

The URL Twilio will make a webhook request to when passing you status updates about the delivery of your messages.

sticky_sender
boolean Not PII

Configuration to enable or disable Sticky Sender on your Service instance. Possible values are true and false.

validity_period
integer Not PII

The number of seconds all messages sent from your Service are valid for. Acceptable integers range from 1 to 14,400.

Create a Service resource

post
https://messaging.twilio.com/v1/Services
Parameters
FriendlyName
Required
post string Not PII

A human readable descriptive text for this resource, up to 64 characters.

AreaCodeGeomatch
Optional
post boolean Not PII

Configuration to enable or disable Area Code Geomatch. Possible values are true and false. Default value is false.

FallbackMethod
Optional
post http_method Not PII

The HTTP method used when requesting the Fallback URL. Either GET or POST. Default value is POST.

FallbackToLongCode
Optional
post boolean Not PII

Configuration to enable or disable Fallback to Long Code. Possible values are true and false. Default value is false.

FallbackUrl
Optional
post url Not PII

A request is made to the Fallback URL if an error occurs with retrieving or executing the TwiML from you Inbound Request URL.

InboundMethod
Optional
post http_method Not PII

The HTTP method used when making requests to the Inbound Request URL. Either GET or POST. Default value is POST.

InboundRequestUrl
Optional
post url Not PII

A webhook request is made to the Inbound Request URL when a message is received by any phone number or shortcode associated to your Messaging Service. Set to null to disable inbound messaging.

MmsConverter
Optional
post boolean Not PII

Configuration to enable or disable MMS Converter on your Service Instance. Possible values are true and false. Default value is true.

SmartEncoding
Optional
post boolean Not PII

Configuration to enable or disable Smart Encoding. Possible values are true and false. Default value is true.

StatusCallback
Optional
post url Not PII

A webhook request is made to the Status Callback to pass status updates about your messages. These status updates let you know if your accepted message were successfully sent and delivered or if a delivery related error may have occurred.

StickySender
Optional
post boolean Not PII

Configuration to enable or disable Sticky Sender on your Service Instance. Possible values are true and false. Default value is true.

ValidityPeriod
Optional
post integer Not PII

Configuration to set the validity period of all messages sent from your Service, in seconds. Acceptable integers range from 1 to 14,400. Default value is 14,400.

Example
Loading Code Sample...
      
      
      
      

      Fetch a Service resource

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

          Read multiple Service resources

          get
          https://messaging.twilio.com/v1/Services
          Example
          Loading Code Sample...
              
              
              
              

              Update a Service resource

              post
              https://messaging.twilio.com/v1/Services/{Sid}

              You may specify one or more of the optional parameters above to update the Service's respective properties. Parameters not specified in your request are not updated.

              Example
              Loading Code Sample...
                  
                  
                  
                  

                  Delete a Service resource

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

                  When a Service is deleted, all phone numbers and short codes in the Service are returned to your Account.

                  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...