Hanzo
OpenapiWebhook

Registers a new webhook subscription for the caller's org and answers 201 with…

Registers a new webhook subscription for the caller's org and answers 201 with the endpoint INCLUDING its freshly minted signing secret.

POST /v1/webhook

Addresshttps://api.hanzo.ai/v1/webhook
MethodPOST
Operationpost_webhook
AuthAuthorization: Bearer $HANZO_API_KEY

Registers a new webhook subscription for the caller's org and answers 201 with the endpoint INCLUDING its freshly minted signing secret. This is one of only two responses that ever carry that secret (the other is rotate) — store it now, because no later read returns it. The org is stamped by the server from the validated principal, so a body can never register an endpoint in another tenant.

Request

4 fields, body application/json (required).

FieldInTypeRequiredDescription
descriptionbodystringDescription is a free-text label for the console.
eventsbodystring[]Events are NATS subject patterns to subscribe to (e.g. "commerce.order.>"). An empty or omitted list means EVERY event on the platform bus.
statusbodystringStatus is "active" or "disabled". Empty defaults to active.
urlbodystringURL is the https:// address each matching event is POSTed to.

Response

StatusBodyMeaning
201Endpointcreated

201 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 create

Webhook API · All Hanzo APIs · Interactive reference

How is this guide?

On this page