Service Resource
A Service is the top-level scope of all other resources in the REST API. It contains all the objects in a Sync application. Services allow you to:
- Create multiple environments (dev, stage, prod) under the same Twilio account with segregated data
- Scope access to resources through the REST API
- Configure behavior of those resources in the scope of a Service
Service properties
Resource Properties in REST API format | |
---|---|
sid
|
The unique string that we created to identify the Service resource. |
unique_name
|
An application-defined string that uniquely identifies the resource. It can be used in place of the resource's |
account_sid
|
The SID of the Account that created the Service resource. |
friendly_name
|
The string that you assigned to describe the resource. |
date_created
|
The date and time in GMT when the resource was created specified in ISO 8601 format. |
date_updated
|
The date and time in GMT when the resource was last updated specified in ISO 8601 format. |
url
|
The absolute URL of the Service resource. |
webhook_url
|
The URL we call when Sync objects are manipulated. |
webhooks_from_rest_enabled
|
Whether the Service instance should call |
reachability_webhooks_enabled
|
Whether the service instance calls |
acl_enabled
|
Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource. It is disabled (false) by default. |
reachability_debouncing_enabled
|
Whether every |
reachability_debouncing_window
|
The reachability event delay in milliseconds if |
links
|
The URLs of related resources. |
Create a Service resource
https://sync.twilio.com/v1/Services
Parameters
Parameters in REST API format | |
---|---|
friendly_name
Optional
|
A string that you assign to describe the resource. |
webhook_url
Optional
|
The URL we should call when Sync objects are manipulated. |
reachability_webhooks_enabled
Optional
|
Whether the service instance should call |
acl_enabled
Optional
|
Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource. |
reachability_debouncing_enabled
Optional
|
Whether every |
reachability_debouncing_window
Optional
|
The reachability event delay in milliseconds if |
webhooks_from_rest_enabled
Optional
|
Whether the Service instance should call |
Example 1
Example 2
Fetch a Service resource
https://sync.twilio.com/v1/Services/{Sid}
Parameters
Parameters in REST API format | |
---|---|
sid
Path
|
The SID of the Service resource to fetch. |
Example 1
Read multiple Service resources
https://sync.twilio.com/v1/Services
Example 1
Update a Service resource
https://sync.twilio.com/v1/Services/{Sid}
Parameters
Parameters in REST API format | |
---|---|
sid
Path
|
The SID of the Service resource to update. |
webhook_url
Optional
|
The URL we should call when Sync objects are manipulated. |
friendly_name
Optional
|
A string that you assign to describe the resource. |
reachability_webhooks_enabled
Optional
|
Whether the service instance should call |
acl_enabled
Optional
|
Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource. |
reachability_debouncing_enabled
Optional
|
Whether every |
reachability_debouncing_window
Optional
|
The reachability event delay in milliseconds if |
webhooks_from_rest_enabled
Optional
|
Whether the Service instance should call |
Example 1
Delete a Service resource
https://sync.twilio.com/v1/Services/{Sid}
Parameters
Parameters in REST API format | |
---|---|
sid
Path
|
The SID of the Service resource to delete. |
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.