Update a specific Webhook.
A service webhook configuration resource manages a service-level set of callback URLs and their configuration for receiving all the corresponding service events.
Update a specific Webhook.
Path parameters
-
The unique ID of the Conversation Service this conversation belongs to.
Minimum length is
34, maximum length is34. Format should match the following pattern:^IS[0-9a-fA-F]{32}$.
Body
-
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 list of events that your configured webhook targets will receive. Events not configured here will not fire. Possible values are
onParticipantAdd,onParticipantAdded,onDeliveryUpdated,onConversationUpdated,onConversationRemove,onParticipantRemove,onConversationUpdate,onMessageAdd,onMessageRemoved,onParticipantUpdated,onConversationAdded,onMessageAdded,onConversationAdd,onConversationRemoved,onParticipantUpdate,onMessageRemove,onMessageUpdated,onParticipantRemoved,onMessageUpdateoronConversationStateUpdated. -
The HTTP method to be used when sending a webhook request. One of
GETorPOST.
curl \
--request POST 'https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Configuration/Webhooks' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Method=GET&Filters=onMessageRemoved&Filters=onParticipantAdded&PreWebhookUrl=https%3A%2F%2Fwww.example.com%2Fpre&PostWebhookUrl=https%3A%2F%2Fwww.example.com%2Fpost'
{"Method" => "GET", "Filters" => ["onMessageRemoved", "onParticipantAdded"], "PreWebhookUrl" => "https://www.example.com/pre", "PostWebhookUrl" => "https://www.example.com/post"}
{
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Webhooks",
"method": "GET",
"filters": [
"onMessageRemoved",
"onParticipantAdded"
],
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"pre_webhook_url": "https://www.example.com/pre",
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"post_webhook_url": "https://www.example.com/post"
}