Register a webhook trigger
const url = 'https://example.com/v1/webhooks';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"flowId":"example","flowVersion":"example","config":{"input":"example"},"hmacSecretName":"example","label":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/webhooks \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "flowId": "example", "flowVersion": "example", "config": { "input": "example" }, "hmacSecretName": "example", "label": "example" }'Registers a kind=webhook trigger. The route mints webhookId (a random UUID). Caller must have written the plaintext HMAC secret to /v1/secrets first and passes the resulting name as hmacSecretName — the trigger never stores the plaintext. Rotation flows through POST /v1/secrets/:name/rotate.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Caller-supplied idempotency key. Retries with the same key return the original response byte-identical (per docs/API-ROUTE-CONVENTIONS.md §3.1).
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Handle into the tenant secrets store. Caller writes plaintext to /v1/secrets first and passes the name here.
Examplegenerated
{ "flowId": "example", "flowVersion": "example", "config": { "input": "example" }, "hmacSecretName": "example", "label": "example"}Responses
Section titled “Responses”Webhook registered.
object
Routable identifier used in the external receiver URL. Route-minted; unique per tenant.
Override input; absent → the parsed request body is passed to the flow.
Handle into the tenant secrets store. Plaintext HMAC secrets never touch this row — the caller writes plaintext to /v1/secrets first, then passes the name here.
Lifecycle status. Only active triggers fire. Tombstoned rows are excluded from every read path.
Example
{ "status": "active"}Malformed request body.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Route-minted webhookId collided (astronomically rare).
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Server error (unmapped domain code or framework crash).
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}