Menu

Expand
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?

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

Names in PHP format
sid
sid<IS> Not PII

A unique identifier for this service instance.

uniqueName
string Not PII

accountSid
sid<AC> Not PII

friendlyName

Human-readable name for this service instance

dateCreated
date_time<iso8601> Not PII

dateUpdated
date_time<iso8601> Not PII

url
url Not PII

webhookUrl
url Not PII

A URL that will receive event updates when objects are manipulated.

webhooksFromRestEnabled
boolean Not PII

true or false - controls whether this instance fires webhooks when Sync objects are updated through REST. Defaults to false.

reachabilityWebhooksEnabled
boolean Not PII

true or false - controls whether this instance fires webhooks when client endpoints connect to Sync Defaults to false.

aclEnabled
boolean Not PII

true or false - determines whether token identities must be granted access to Sync objects via the Permissions API in this Service.

reachabilityDebouncingEnabled
boolean Not PII

true or false - If false, every endpoint disconnection immediately yields a reachability webhook (if enabled). If true, then 'disconnection' webhook events will only be fired after a configurable delay. Intervening reconnections would effectively cancel that webhook. Defaults to false.

reachabilityDebouncingWindow
integer Not PII

Reachability webhook delay period in milliseconds. Determines the delay after which a Sync identity is declared actually offline, measured from the moment the last running client disconnects. If all endpoints remain offline throughout this delay, then reachability webhooks will be fired (if enabled). A reconnection by any endpoint during this window — from the same identity — means no reachability webhook would be fired. Must be between 1000 and 30000. Defaults to 5000.

links
uri_map Not PII

Create a Service resource

post
https://sync.twilio.com/v1/Services
Parameters
Names in None format
friendly_name
Optional
post string PII MTL: 7 DAYS

Human-readable name for this service instance

webhook_url
Optional
post url Not PII

A URL that will receive event updates when objects are manipulated.

reachability_webhooks_enabled
Optional
post boolean Not PII

true or false - controls whether this instance fires webhooks when client endpoints connect to Sync Defaults to false.

acl_enabled
Optional
post boolean Not PII

true or false - determines whether token identities must be granted access to Sync objects via the Permissions API in this Service.

reachability_debouncing_enabled
Optional
post boolean Not PII

true or false - If false, every endpoint disconnection immediately yields a reachability webhook (if enabled). If true, then 'disconnection' webhook events will only be fired after a configurable delay. Intervening reconnections would effectively cancel that webhook. Defaults to false.

reachability_debouncing_window
Optional
post integer Not PII

Reachability webhook delay period in milliseconds. Determines the delay after which a Sync identity is declared actually offline, measured from the moment the last running client disconnects. If all endpoints remain offline throughout this delay, then reachability webhooks will be fired (if enabled). A reconnection by any endpoint during this window — from the same identity — means no reachability webhook would be fired. Must be between 1000 and 30000. Defaults to 5000.

webhooks_from_rest_enabled
Optional
post boolean Not PII

true or false - controls whether this instance fires webhooks when Sync objects are updated through REST. Defaults to false.

Example 1
        
        
        
        
        Example 2
              
              
              
              

              Fetch a Service resource

              get
              https://sync.twilio.com/v1/Services/{Sid}
              Parameters
              Names in None format
              sid
              Required
              get sid_like<IS> Not PII

              A unique identifier for this service instance.

              Example
                    
                    
                    
                    

                    Read multiple Service resources

                    get
                    https://sync.twilio.com/v1/Services
                    Example
                          
                          
                          
                          

                          Update a Service resource

                          post
                          https://sync.twilio.com/v1/Services/{Sid}
                          Parameters
                          Names in None format
                          sid
                          Required
                          post sid_like<IS> Not PII

                          A unique identifier for this service instance.

                          webhook_url
                          Optional
                          post url Not PII

                          A URL that will receive event updates when objects are manipulated.

                          friendly_name
                          Optional
                          post string PII MTL: 7 DAYS

                          Human-readable name for this service instance

                          reachability_webhooks_enabled
                          Optional
                          post boolean Not PII

                          True or false - controls whether this instance fires webhooks when client endpoints connect to Sync Defaults to false.

                          acl_enabled
                          Optional
                          post boolean Not PII

                          true or false - determines whether token identities must be granted access to Sync objects via the Permissions API in this Service.

                          reachability_debouncing_enabled
                          Optional
                          post boolean Not PII

                          true or false - If false, every endpoint disconnection immediately yields a reachability webhook (if enabled). If true, then 'disconnection' webhook events will only be fired after a configurable delay. Intervening reconnections would effectively cancel that webhook. Defaults to false.

                          reachability_debouncing_window
                          Optional
                          post integer Not PII

                          Reachability webhook delay period in milliseconds. Determines the delay after which a Sync identity is declared actually offline, measured from the moment the last running client disconnects. If all endpoints remain offline throughout this delay, then reachability webhooks will be fired (if enabled). A reconnection by any endpoint during this window — from the same identity — means no reachability webhook would be fired. Must be between 1000 and 30000. Defaults to 5000.

                          webhooks_from_rest_enabled
                          Optional
                          post boolean Not PII

                          true or false - controls whether this instance fires webhooks when Sync objects are updated through REST. Defaults to false.

                          Example
                                
                                
                                
                                

                                Delete a Service resource

                                delete
                                https://sync.twilio.com/v1/Services/{Sid}
                                Parameters
                                Names in None format
                                sid
                                Required
                                delete sid_like<IS> Not PII

                                A unique identifier for this service instance.

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