Update configuration webhook
A Webhook resource manages a service-level set of callback URLs and their configuration for receiving all conversation events.
Body
-
The HTTP method to be used when sending a webhook request.
-
The list of webhook event triggers that are enabled for this Service:
onMessageAdded
,onMessageUpdated
,onMessageRemoved
,onMessageAdd
,onMessageUpdate
,onMessageRemove
,onConversationUpdated
,onConversationRemoved
,onConversationAdd
,onConversationAdded
,onConversationRemove
,onConversationUpdate
,onConversationStateUpdated
,onParticipantAdded
,onParticipantUpdated
,onParticipantRemoved
,onParticipantAdd
,onParticipantRemove
,onParticipantUpdate
,onDeliveryUpdated
,onUserAdded
,onUserUpdate
,onUserUpdated
-
The absolute url the pre-event webhook request should be sent to.
-
The absolute url the post-event webhook request should be sent to.
-
The routing target of the webhook. Can be ordinary or route internally to Flex
Values are
webhook
orflex
.
curl \
--request POST 'https://conversations.twilio.com/v1/Configuration/Webhooks' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Method=GET&Target=webhook&Filters=onConversationUpdated&PreWebhookUrl=https%3A%2F%2Fexample.com%2Fpre&PostWebhookUrl=https%3A%2F%2Fexample.com%2Fpost'
{"Method"=>"GET", "Target"=>"webhook", "Filters"=>["onConversationUpdated"], "PreWebhookUrl"=>"https://example.com/pre", "PostWebhookUrl"=>"https://example.com/post"}
{
"url": "https://conversations.twilio.com/v1/Configuration/Webhooks",
"method": "GET",
"target": "webhook",
"filters": [
"onConversationUpdated"
],
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"pre_webhook_url": "https://example.com/pre",
"post_webhook_url": "http://example.com/post"
}