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
|
The unique ID of the Account responsible for this service. |
sid
|
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
|
The date that this resource was created. |
date_updated
|
The date that this resource was last updated. |
url
|
An absolute API resource URL for this service. |
links
|
Contains absolute API resource URLs to access conversations, users, roles, bindings and configuration of this service. |
Create a Service resource
https://conversations.twilio.com/v1/Services
Parameters
Parameters in REST API format | |
---|---|
friendly_name
Required
|
The human-readable name of this service, limited to 256 characters. Optional. |
Example 1
Fetch a Service resource
https://conversations.twilio.com/v1/Services/{Sid}
Parameters
Parameters in REST API format | |
---|---|
sid
Path
|
A 34 character string that uniquely identifies this resource. |
Example 1
Read multiple Service resources
https://conversations.twilio.com/v1/Services
Example 1
Delete a Service resource
https://conversations.twilio.com/v1/Services/{Sid}
Parameters
Parameters in REST API format | |
---|---|
sid
Path
|
A 34 character string that uniquely identifies this resource. |
Example 1
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.