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?

Conversation Scoped Webhook Resource

Conversation Scoped Webhooks provide a way to attach a unique monitor, bot, or other integration to each conversation.

Each individual Conversation can have as many as five such webhooks, as needed for your use case. This is your go-to tool for adding:

For bot integrations, in particular, pay specific attention to the ReplayAfter parameter to ensure that you don't miss any messages that arrive while you're configuring the integration.

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

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 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 ConversationScopedWebhook resource

post
https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Webhooks
Parameters
Parameters in REST API format
conversation_sid
Path
post sid<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
        
        
        
        

        Fetch a ConversationScopedWebhook resource

        get
        https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Webhooks/{Sid}
        Parameters
        Parameters in REST API format
        conversation_sid
        Path
        get sid<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
              
              
              
              

              Read multiple ConversationScopedWebhook resources

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

              The unique id of the Conversation for this webhook.

              Example 1
                    
                    
                    
                    

                    Update a ConversationScopedWebhook resource

                    post
                    https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Webhooks/{Sid}
                    Parameters
                    Parameters in REST API format
                    conversation_sid
                    Path
                    post sid<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
                          
                          
                          
                          

                          Delete a ConversationScopedWebhook resource

                          delete
                          https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Webhooks/{Sid}
                          Parameters
                          Parameters in REST API format
                          conversation_sid
                          Path
                          delete sid<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
                                
                                
                                
                                
                                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.