ConversationsWebhook

Update Configuration Webhook

POST
/v1/Configuration/Webhooks

Authorization

accountSid_authToken
AuthorizationBasic <token>

In: header

Request Body

application/x-www-form-urlencoded

Method?string

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

Filters?array<string>

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

PreWebhookUrl?string

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

PostWebhookUrl?string

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

Target?ConfigurationWebhookTarget

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

Value in

  • "webhook"
  • "flex"

Response Body

application/json

curl -X POST "https://example.com/v1/Configuration/Webhooks" \  -H "Content-Type: application/x-www-form-urlencoded" \  -d 'PreWebhookUrl=https%3A%2F%2Fexample.com%2Fpre&PostWebhookUrl=https%3A%2F%2Fexample.com%2Fpost&Method=GET&Filters=onConversationUpdated&Target=webhook'
{  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "pre_webhook_url": "https://example.com/pre",  "post_webhook_url": "http://example.com/post",  "method": "GET",  "filters": [    "onConversationUpdated"  ],  "target": "webhook",  "url": "https://conversations.twilio.com/v1/Configuration/Webhooks"}