Menu

Expand
Rate this page:

Service-Scoped Conversation-Scoped Webhook Resource

Service-Scoped Conversation-Scoped Webhooks provide a way to attach a unique monitor, bot, or other integration to each service-scoped Conversation within a non-default Conversation Service.

Each individual service-scoped Conversation can have as many as five such webhooks, as needed for your use case.

Please see the API Reference for the Conversation-Scoped Webhook resource for creating and managing Conversation-Scoped Webhooks within the default Conversation Service.

API Base URL

All URLs in the reference documentation use the following base URL:

https://conversations.twilio.com/v1

For Conversations applications that build on more than one Conversation Service instance, you will need to specify the Conversation Service SID in the REST API call:

GET /v1/Services/ISxx/Conversations/CHxx/Messages

Service-Scoped Conversation-Scoped Webhook Properties

Resource Properties in REST API format
sid
sid<WH> 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 conversation.

chat_service_sid
sid<IS> Not PII

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

conversation_sid
sid<CH> Not PII

The unique ID of the Conversation for this webhook.

target
string Not PII

The target of this webhook: webhook, studio, trigger

url
url Not PII

An absolute API resource URL for this webhook.

configuration
object Not PII

The configuration of this webhook. Is defined based on target.

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.

Create a Service-Scoped Conversation-Scoped Webhook resource

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

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

conversation_sid
Path
post sid_like<CH> Not PII

The unique ID of the Conversation for this webhook.

target
Required
post ienum:target Not PII

The target of this webhook: webhook, studio, trigger

configuration.url
Optional
post string Not PII

The absolute url the webhook request should be sent to.

configuration.method
Optional
post ienum:method Not PII

The HTTP method to be used when sending a webhook request.

configuration.filters
Optional
post string[] Not PII

The list of events, firing webhook event for this Conversation.

configuration.triggers
Optional
post string[] Not PII

The list of keywords, firing webhook event for this Conversation.

configuration.flow_sid
Optional
post sid<FW> Not PII

The studio flow SID, where the webhook should be sent to.

configuration.replay_after
Optional
post integer Not PII

The message index for which and it's successors the webhook will be replayed. Not set by default

Example 1
Loading Code Sample...
        
        

        Create Webhook

        Fetch a Service-Scoped Conversation-Scoped Webhook resource

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

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

        conversation_sid
        Path
        get sid_like<CH> Not PII

        The unique ID of the Conversation for this webhook.

        sid
        Path
        get sid<WH> Not PII

        A 34 character string that uniquely identifies this resource.

        Example 1
        Loading Code Sample...
              
              

              Fetch Webhook

              Read multiple Service-Scoped Conversation-Scoped Webhook resources

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

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

              conversation_sid
              Path
              get sid_like<CH> Not PII

              The unique ID of the Conversation for this webhook.

              Example 1
              Loading Code Sample...
                    
                    

                    Read Webhook

                    Update a Service-Scoped Conversation-Scoped Webhook resources

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

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

                    conversation_sid
                    Path
                    post sid_like<CH> Not PII

                    The unique ID of the Conversation for this webhook.

                    sid
                    Path
                    post sid<WH> Not PII

                    A 34 character string that uniquely identifies this resource.

                    configuration.url
                    Optional
                    post string Not PII

                    The absolute url the webhook request should be sent to.

                    configuration.method
                    Optional
                    post ienum:method Not PII

                    The HTTP method to be used when sending a webhook request.

                    configuration.filters
                    Optional
                    post string[] Not PII

                    The list of events, firing webhook event for this Conversation.

                    configuration.triggers
                    Optional
                    post string[] Not PII

                    The list of keywords, firing webhook event for this Conversation.

                    configuration.flow_sid
                    Optional
                    post sid<FW> Not PII

                    The studio flow SID, where the webhook should be sent to.

                    Example 1
                    Loading Code Sample...
                          
                          

                          Update Webhook

                          Delete a Service-Scoped, Conversation-Scoped Webhook resource

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

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

                          conversation_sid
                          Path
                          delete sid_like<CH> Not PII

                          The unique ID of the Conversation for this webhook.

                          sid
                          Path
                          delete sid<WH> Not PII

                          A 34 character string that uniquely identifies this resource.

                          Example 1
                          Loading Code Sample...
                                
                                

                                Delete Webhook

                                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