Menu

Expand
Rate this page:

Service Binding Resource

A Binding resource in Twilio Conversations represents a Push notification subscription for a User within their Service instance. Bindings are unique per Service instance, User identity, device, and notification channel (such as APNS, GCM, FCM).

ServiceBinding properties

Each Binding resource has the following properties:

Resource Properties in REST API format
sid
sid<BS> Not PII

A 34 character string that uniquely identifies this resource.

account_sid
sid<AC> Not PII

The unique ID of the Account responsible for this binding.

chat_service_sid
sid<IS> Not PII

The SID of the Conversation Service the Binding resource is associated with.

credential_sid
sid<CR> Not PII

The SID of the Credential for the binding. See push notification configuration for more info.

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.

endpoint

The unique endpoint identifier for the Binding. The format of this value depends on the binding_type.

identity

The application-defined string that uniquely identifies the Conversation User within the Conversation Service. See access tokens for more info.

binding_type
enum:binding_type Not PII

The push technology to use for the Binding. Can be: apn, gcm, or fcm. See push notification configuration for more info.

message_types
string[] Not PII

The Conversation message types the binding is subscribed to.

url
url Not PII

An absolute API resource URL for this binding.

Fetch a ServiceBinding resource

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

The SID of the Conversation Service the Binding resource is associated with.

sid
Path
get sid<BS> Not PII

A 34 character string that uniquely identifies this resource.

Example 1
Loading Code Sample...
        
        

        Fetch Binding

        Read multiple ServiceBinding resources

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

        The SID of the Conversation Service the Binding resource is associated with.

        binding_type
        Optional
        get ienum:binding_type[] Not PII

        The push technology used by the Binding resources to read. Can be: apn, gcm, or fcm. See push notification configuration for more info.

        identity
        Optional
        get string[] PII MTL: 30 DAYS

        The identity of a Conversation User this binding belongs to. See access tokens for more details.

        Example 1
        Loading Code Sample...
              
              

              Read Binding

              Delete a ServiceBinding resource

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

              The SID of the Conversation Service to delete the Binding resource from.

              sid
              Path
              delete sid<BS> Not PII

              The SID of the Binding resource to delete.

              Example 1
              Loading Code Sample...
                    
                    

                    Delete Binding

                    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