Hanzo
OpenapiWebhook

Replaces the editable fields of one of the caller org's endpoints — url,…

Replaces the editable fields of one of the caller org's endpoints — url, events, status and description — and answers the stored row with its secret…

PUT /v1/webhook/{id}

Addresshttps://api.hanzo.ai/v1/webhook/{id}
MethodPUT
Operationput_webhook_by_id
AuthAuthorization: Bearer $HANZO_API_KEY

Replaces the editable fields of one of the caller org's endpoints — url, events, status and description — and answers the stored row with its secret redacted. It is a full replace, not a patch: an omitted field is written as its empty value, and an omitted or empty events list resubscribes the endpoint to EVERY event. The signing secret and the creation time are immutable here; rotate the secret with POST /v1/webhook/{id}/secret.

Request

5 fields, body application/json (required).

FieldInTypeRequiredDescription
idpathstringyes
descriptionbodystringDescription is a free-text label for the console.
eventsbodystring[]Events are NATS subject patterns to subscribe to.
statusbodystringStatus is "active" or "disabled".
urlbodystringURL is the https:// address each matching event is POSTed to.

Response

StatusBodyMeaning
200Endpointok

200 body — 11 fields.

FieldInTypeAlwaysDescription
createdbodystringCreatedAt is when the endpoint was registered, RFC3339 in UTC — stored in that spelling because it sorts as a string.
deliveries7dbodyintegerDeliveries7d is how many deliveries SETTLED in the trailing 7 days — the attempts that ended ok or failed, so a delivery still retrying is in neither counter…
descriptionbodystringDescription is the operator's own label for the endpoint.
eventsbodystring[]Events are the subject patterns this endpoint subscribes to ("commerce.order.>").
failures7dbodyintegerFailures7d is how many of those settled as failed — the subscriber never accepted it and no further attempt will be made.
idbodystringID is the endpoint's handle, server-minted and stable for its life.
orgbodystringOrg is the tenant that owns the endpoint, taken from the validated principal rather than from any request field.
secretbodystringSecret is the HMAC-SHA256 signing key a subscriber recomputes the signature with.
statusbodystringStatus is "active" or "disabled" — nothing else is accepted.
updatedbodystringUpdatedAt is when its url, events, status or description last changed.
urlbodystringURL is where the POST goes.

Failure carries the platform error shape — see Errors.

Examples

hanzo webhooks set <id>

Webhook API · All Hanzo APIs · Interactive reference

How is this guide?

On this page