Update a webhook
PATCH/v1/webhooks/{webhook_id}
- Scope
webhooks:manage
Changes its URL, events, lines or description, or pauses it with active: false.
Parameters
Path
webhook_idstringrequiredThe webhook (
whk_…).
Request body
urlstringA public
https://URL. No credentials, private or local addresses; redirects aren't followed.eventsarray of "message.received" | "message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.fallback" | "message.reaction" | "draft.created" | "draft.approved" | "draft.rejected" | "chat.updated" | "profile.online" | "profile.offline" | "call.ringing" | "call.answered" | "call.transferred" | "call.ended" | "call.voicemail" | "call.transcription" | "calling.cap_warning"The event types to send, such as
message.received.profile_idsarray of string or nullOnly events from these lines. Leave it out (or null) for every line. A key limited to some lines must list them.
descriptionstring or nullA note for people.
activebooleanfalsepauses deliveries.
Response
200 OKThe webhook.
idstringrequiredwhk_…object"webhook"requiredurlstringrequiredeventsarray of "message.received" | "message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.fallback" | "message.reaction" | "draft.created" | "draft.approved" | "draft.rejected" | "chat.updated" | "profile.online" | "profile.offline" | "call.ringing" | "call.answered" | "call.transferred" | "call.ended" | "call.voicemail" | "call.transcription" | "calling.cap_warning"requiredprofile_idsarray of string or nullrequiredOnly events from these lines; null = every line the team has.
descriptionstring or nullrequiredactivebooleanrequiredcreated_attimestamprequiredupdated_attimestamprequired
Errors
| Status | Code | Means |
|---|---|---|
| 400 | validation_failed | A field is missing or invalid. |
| 401 | unauthorized | The API key is missing, unknown or revoked. |
| 403 | insufficient_scope | The API key lacks the scope this needs. |
| 404 | not_found | No such object, or the key can't see it. |
Every error is { "error": { "code", "message" } }. All error codes.