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 Webhook Resource

The Conversation Webhook resource allows you to precisely control the effects of account-scoped webhooks. Sending a POST request to the Webhooks endpoint is equivalent to configuring session webhooks in the console.

Good applications of Conversation Webhooks include:

  • Implementing an archival system for all Conversations
  • Feeding messages into Elasticsearch
  • Implementing a profanity filter across all Conversations


Note: You can send pre-hooks and post-hooks to different targets.

ConversationWebhook properties

Resource Properties in REST API format
account_sid
sid<AC> Not PII

The unique id of the Account responsible for this conversation.

method
enum:method Not PII

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

filters
string[] Not PII

The list of webhook event triggers that are enabled for this Service: onMessageAdded, onMessageUpdated, onMessageRemoved, onConversationUpdated, onConversationRemoved, onParticipantAdded, onParticipantUpdated, onParticipantRemoved

pre_webhook_url
string Not PII

The absolute url the pre-event webhook request should be sent to.

post_webhook_url
string Not PII

The absolute url the post-event webhook request should be sent to.

target
enum:target Not PII

The routing target of the webhook. Can be ordinary or route internally to Flex

url
url Not PII

An absolute URL for this webhook.

Fetch a ConversationWebhook resource

get
https://conversations.twilio.com/v1/Conversations/Webhooks
Example 1
        
        
        
        

        Update a ConversationWebhook resource

        post
        https://conversations.twilio.com/v1/Conversations/Webhooks
        Parameters
        Parameters in REST API format
        method
        Optional
        post string Not PII

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

        filters
        Optional
        post string[] Not PII

        The list of webhook event triggers that are enabled for this Service: onMessageAdded, onMessageUpdated, onMessageRemoved, onConversationUpdated, onConversationRemoved, onParticipantAdded, onParticipantUpdated, onParticipantRemoved

        pre_webhook_url
        Optional
        post string Not PII

        The absolute url the pre-event webhook request should be sent to.

        post_webhook_url
        Optional
        post string Not PII

        The absolute url the post-event webhook request should be sent to.

        target
        Optional
        post ienum:target Not PII

        The routing target of the webhook. Can be ordinary or route internally to Flex

        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.