Update a webhook
Update a webhook, including status transitions (pause/resume/re-enable).
Update a webhook, including status transitions (pause/resume/re-enable).
ApiKeyAuthAuthorizationBearer <token>Bearer token authentication. Send an API key (a saai_api_-prefixed token) as Authorization: Bearer <token>.
Required permission
manage_webhookswebhook_id*stringuuidapplication/json- body
PATCH body. status covers pause/resume/re-enable (only active and
paused are accepted; disabled is set by the system). Re-enabling clears
disabled_reason and the failure streak.
name?string1 <= length <= 255url?stringA new endpoint URL. Omit to keep the current one.
length <= 2048events?array<string>1 <= itemsstatus?WebhookStatusUpdateStatus values a client may PATCH. disabled is system-only.
"active""paused"headers?Custom request headers. Omit to keep the current set; an empty map clears them. A blank value keeps that header's stored value; to remove a header, send the map without its name.
format?WebhookFormatHow events are encoded in the request body.
"single""array""ndjson"max_events?integerint321 <= value <= 100template?stringGo text/template for the delivered body; empty clears it, back to the
default envelope. It must render valid JSON against vars.
length <= 8192condition?stringCEL expression an event must satisfy to be delivered; empty clears it, back to delivering every subscribed event.
length <= 1024destination?stringThe destination this webhook is set up for, such as slack; empty clears
it. A label for display only.
length <= 64vars?Template variables. Omit to keep the current set; an empty map clears them. A blank value keeps that variable's stored value; to remove a variable, send the map without its name.
The request has succeeded.
application/json- response
A configured webhook. The signing secret, the endpoint URL, custom header values, and variable values are never returned.
id*uuiduuidname*string1 <= length <= 255url_hint*stringThe endpoint as its origin and last four characters, such as
https://hooks.slack.com/…7cJa. Many receivers put their credential in the
URL, so the URL itself is never returned.
events*array<string>Audit actions this webhook subscribes to, or ["*"] for all of them.
status*WebhookStatusWhether a webhook is currently delivering events.
"active""paused""disabled"disabled_reason?WebhookDisabledReasonWhy a webhook was turned off automatically.
"circuit_breaker""gone""template_error"failing_since?stringWhen deliveries started failing continuously; cleared once a delivery succeeds.
date-timelast_delivery_status?WebhookDeliveryStatusDelivery outcome for a single message.
"pending""retrying""succeeded""failed"last_delivery_at?stringWhen the most recent delivery was attempted; absent until the first delivery.
date-timeformat*WebhookFormatHow events are encoded in the request body.
"single""array""ndjson"max_events*integerint32has_custom_headers*booleanWhether custom request headers are configured. The values themselves are never returned.
header_keys*array<string>Names of the configured custom headers. Values are never returned. Empty
for webhooks saved before header names were recorded, even when
has_custom_headers is true.
template?stringGo text/template rendering each event into the delivered body; empty means the default Standard Webhooks envelope.
length <= 8192condition?stringCEL expression an event must satisfy to be delivered; empty means every subscribed event is delivered.
length <= 1024destination?stringThe destination this webhook was set up for, such as slack. A label for
display; it does not change how events are delivered.
length <= 64var_keys*array<string>Names of the configured template variables. Values are never returned.
created_at*stringdate-timeupdated_at*stringdate-timecurl -X PATCH "https://example.com/webhooks/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "url_hint": "string", "events": [ "string" ], "status": "active", "disabled_reason": "circuit_breaker", "failing_since": "2019-08-24T14:15:22Z", "last_delivery_status": "pending", "last_delivery_at": "2019-08-24T14:15:22Z", "format": "single", "max_events": 0, "has_custom_headers": true, "header_keys": [ "string" ], "template": "string", "condition": "string", "destination": "string", "var_keys": [ "string" ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}