Menu

Expand
Rate this page:

Webhook Configuration Resource

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

Good applications of the configured webhooks in Conversations 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.

Our guide to Conversations Webhooks includes the specific pre- and post-event webhooks that fire, as well as the webhook payloads.

ConfigurationWebhook 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 API resource API resource URL for this webhook.

Fetch a ConfigurationWebhook resource

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

        Update a ConfigurationWebhook resource

        post
        https://conversations.twilio.com/v1/Configuration/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.

        Example 1
              
              
              
              Enable for "onConversationUpdated" & "onMessageRemoved" events

              UPDATE: Enable all Webhooks with filters

              Enable for "onConversationUpdated" & "onMessageRemoved" events
              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