Menu

Expand
Rate this page:

Conversation Service Resource

A Conversation Service is the top-level container for other resources in the Twilio Conversations REST API. All other Twilio Conversations resources, such as Conversations, Users, Messages, Bindings, and Credentials belong to a specific Service.

Services allow you to:

  • Create multiple, distinct environments (such as dev, stage, and prod) under a single Twilio account
  • Scope access to resources through both the REST and client APIs
  • Configure different Service instances with specific behaviors

A Service can also send HTTPS requests (webhooks) to URLs that you define to let you know of specific events. See what events you can subscribe to in our webhook reference.

Do not use Personally Identifiable Information (PII) for the friendlyName field.

Avoid using a person's name, home address, email, phone number, or other PII in the friendlyName field. Use some form of pseudonymized identifier, instead.

You can learn more about how we process your data in our privacy policy.

Service Defaults in the Twilio Console

You can use the REST API to configure your Conversation Service instances. (See the following examples.)

You can also find the default Conversation Service instance under Defaults in the Conversations Section of the Twilio Console.

You may have created non-default Conversation Service resources to separate messaging traffic, create development environments, etc. To access any non-default Conversation Service resources, the Service Sid (ISXXX) has to be a part of the url, as shown below:

https://conversations.twilio.com/v1/Services/ISXXX

https://conversations.twilio.com/v1/Services/ISXXX/Conversations

https://conversations.twilio.com/v1/Services/ISXXX/Conversations/CHXXX/Participants

https://conversations.twilio.com/v1/Services/ISXXX/Conversations/CHXXX/Messages

Service properties

The Service resource contains these properties:

Resource Properties in REST API format
account_sid
sid<AC> Not PII

The unique ID of the Account responsible for this service.

sid
sid<IS> Not PII

A 34 character string that uniquely identifies this resource.

friendly_name

The human-readable name of this service, limited to 256 characters. Optional.

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.

url
url Not PII

An absolute API resource URL for this service.

links
uri_map Not PII

Contains absolute API resource URLs to access conversations, users, roles, bindings and configuration of this service.

Create a Service resource

post
https://conversations.twilio.com/v1/Services
Parameters
Parameters in REST API format
friendly_name
Required
post string PII MTL: 30 DAYS

The human-readable name of this service, limited to 256 characters. Optional.

Example 1
Loading Code Sample...
        
        

        Create Service

        Fetch a Service resource

        get
        https://conversations.twilio.com/v1/Services/{Sid}
        Parameters
        Parameters in REST API format
        sid
        Path
        get sid<IS> Not PII

        A 34 character string that uniquely identifies this resource.

        Example 1
        Loading Code Sample...
              
              

              Fetch Service

              Read multiple Service resources

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

                    Read Service

                    Delete a Service resource

                    delete
                    https://conversations.twilio.com/v1/Services/{Sid}
                    Parameters
                    Parameters in REST API format
                    sid
                    Path
                    delete sid<IS> Not PII

                    A 34 character string that uniquely identifies this resource.

                    Example 1
                    Loading Code Sample...
                          
                          

                          Delete Service

                          Rate this page:

                          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 by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

                          Loading Code Sample...
                                
                                
                                

                                Thank you for your feedback!

                                Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                                Sending your feedback...
                                🎉 Thank you for your feedback!
                                Something went wrong. Please try again.

                                Thanks for your feedback!

                                thanks-feedback-gif