Update Webhook
PATCH {{BASE_HABITAT_URL}}/api/webhooks/:id
Required scope: webhooks:write
Partially updates a webhook. Only supplied fields change.
| Path parameter | Notes |
|---|---|
id |
Webhook UUID returned by Create Webhook or List Webhooks. |
All body fields are optional and use the same formats as Create Webhook: url, event_filter, active, description, and http_options.headers.
event_filterreplaces the complete filter list. Include every lifecycle status and event you want to retain.- Add
"ready_now"to opt into the Ready Now event. - Send
"event_filter": nullto receive every event; an empty array receives none. http_optionsreplaces all stored headers. Include every header you want to retain and never copy masked values from List Webhooks.- Send
"active": falseto pause delivery.
The response echoes changed fields. Call List Webhooks to verify the full stored configuration.
Request body
Section titled “Request body”{ "active": true, "event_filter": [ "ready_now", "completed", "cancelled" ]}Examples
Section titled “Examples”curl --request PATCH '${BASE_HABITAT_URL}/api/webhooks/:id' \ --data '{ "active": true, "event_filter": [ "ready_now", "completed", "cancelled" ]}'const response = await fetch("${BASE_HABITAT_URL}/api/webhooks/:id", { "method": "PATCH", "headers": {}, "body": "{\n \"active\": true,\n \"event_filter\": [\n \"ready_now\",\n \"completed\",\n \"cancelled\"\n ]\n}"})const data = await response.json()import requests
response = requests.request( "PATCH", "${BASE_HABITAT_URL}/api/webhooks/:id", headers={}, data="{\n \"active\": true,\n \"event_filter\": [\n \"ready_now\",\n \"completed\",\n \"cancelled\"\n ]\n}",)response.raise_for_status()Saved responses
Section titled “Saved responses”{ "type": "success", "webhook": { "active": true, "event_filter": ["completed", "cancelled"] }}
