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
        
        
        

        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
              
              
              

              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
                    
                    
                    
                    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 Community Forums or 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