Update a webhook

View as Markdown
Update a webhook's endpoint URL, description, or custom headers. At least one of the three fields must be present in the request body. **Event subscriptions cannot be changed here.** To add or remove an agent's subscription to this webhook, use `POST /agent/{agentId}/webhook-subscriptions` and `DELETE /agent/{agentId}/webhook-subscriptions`. **Custom `headers` behavior** - Send a non-empty object to replace all custom headers on the webhook. - Send an empty object (`{}`) to clear all custom headers. - Omit the field to leave existing custom headers untouched. Custom header limits: at most 10 headers per webhook, values up to 1024 characters, header names must match RFC 7230 token syntax. The following names are reserved and rejected: `x-signature`, `host`, `content-length`, `content-type`, `connection`, `transfer-encoding`.

Authentication

AuthorizationBearer

API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.

Path parameters

idstringRequired
The ID of the webhook to update.

Request

This endpoint expects an object.
endpointstringOptionalformat: "uri"
New endpoint URL. Must be a valid URL.
descriptionstringOptional

New human-readable label.

headersmap from strings to stringsOptional

Map of custom header names to values. Non-empty object replaces all existing headers; empty object clears them.

Response

Webhook updated successfully.
statusboolean
datastring
The ID of the updated webhook.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
500
Internal Server Error