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.

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
        
        
        
        

        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
              
              
              
              

              Read multiple Service resources

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

                    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
                          
                          
                          
                          
                          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 browsing the Twilio tag on Stack Overflow.

                                
                                
                                

                                Thank you for your feedback!

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

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

                                Thanks for your feedback!

                                Refer us and get $10 in 3 simple steps!

                                Step 1

                                Get link

                                Get a free personal referral link here

                                Step 2

                                Give $10

                                Your user signs up and upgrade using link

                                Step 3

                                Get $10

                                1,250 free SMSes
                                OR 1,000 free voice mins
                                OR 12,000 chats
                                OR more