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
|
The unique ID of the Account responsible for this conversation. |
method
|
The HTTP method to be used when sending a webhook request. |
filters
|
The list of webhook event triggers that are enabled for this Service: |
pre_webhook_url
|
The absolute url the pre-event webhook request should be sent to. |
post_webhook_url
|
The absolute url the post-event webhook request should be sent to. |
target
|
The routing target of the webhook. Can be ordinary or route internally to Flex |
url
|
An absolute API resource API resource URL for this webhook. |
Fetch a ConfigurationWebhook resource
https://conversations.twilio.com/v1/Configuration/Webhooks
Example 1
Update a ConfigurationWebhook resource
https://conversations.twilio.com/v1/Configuration/Webhooks
Parameters
Parameters in REST API format | |
---|---|
method
Optional
|
The HTTP method to be used when sending a webhook request. |
filters
Optional
|
The list of webhook event triggers that are enabled for this Service: |
pre_webhook_url
Optional
|
The absolute url the pre-event webhook request should be sent to. |
post_webhook_url
Optional
|
The absolute url the post-event webhook request should be sent to. |
target
Optional
|
The routing target of the webhook. |
Example 1
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.