Update a specific Webhook

POST /v1/Services/{ChatServiceSid}/Configuration/Webhooks

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

application/x-www-form-urlencoded

Body

  • Filters array[string]

    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, onMessageUpdate or onConversationStateUpdated.

  • Method string

    The HTTP method to be used when sending a webhook request. One of GET or POST.

  • PostWebhookUrl string(uri)

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

  • PreWebhookUrl string(uri)

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

Responses

  • 200

    OK

    Hide response attributes Show response attributes object
    • account_sid string | null

      The unique ID of the Account responsible for this service.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • chat_service_sid string | null

      The unique ID of the Conversation Service this conversation belongs to.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^IS[0-9a-fA-F]{32}$.

    • filters array[string] | null

      The list of events that your configured webhook targets will receive. Events not configured here will not fire.

    • method string | null

      The HTTP method to be used when sending a webhook request

      Values are GET or POST.

    • post_webhook_url string(uri) | null

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

    • pre_webhook_url string(uri) | null

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

    • url string(uri) | null

      An absolute URL for this webhook.

POST /v1/Services/{ChatServiceSid}/Configuration/Webhooks
curl \
 -X POST https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Configuration/Webhooks \
 --user "username:password" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -d 'Filters=string&Method=string&PostWebhookUrl=https%3A%2F%2Fexample.com&PreWebhookUrl=https%3A%2F%2Fexample.com'
Request example
{
  "Filters": [
    "string"
  ],
  "Method": "string",
  "PostWebhookUrl": "https://example.com",
  "PreWebhookUrl": "https://example.com"
}
Response examples (200)
{
  "account_sid": "string",
  "chat_service_sid": "string",
  "filters": [
    "string"
  ],
  "method": "GET",
  "post_webhook_url": "https://example.com",
  "pre_webhook_url": "https://example.com",
  "url": "https://example.com"
}