Flowion Docs

Webhooks

Third-party integrator subscriptions — see specs/005-api-external-webhooks/. User reads, Admin creates/deletes (FR-019). This service only owns the subscription resource and recent delivery outcomes; webhook-dispatcher is the only writer of a delivery, running as its own deployable service so a slow receiver never touches this API's runtime (FR-008/FR-009).

4 endpoints

Lists an environment's webhook subscriptions. Never another environment's — the read-side of FR-016.

get/v1/environments/{environment_id}/webhooksRequires a bearer token

Parameters

NameInTypeDescription
environment_id*pathstring<uuid>Environment id

Responses

StatusBodyDescription
200ListWebhooksResponseThe environment's webhook subscriptions
401ErrorBodyMissing, invalid, or expired bearer token
404ErrorBodyNo environment with this id exists, or the caller cannot access it

Registers a webhook subscription. Requires the caller to be an Admin (or above) in the environment.

post/v1/environments/{environment_id}/webhooksRequires a bearer token

Parameters

NameInTypeDescription
environment_id*pathstring<uuid>Environment id

Request bodyCreateWebhookRequest

FieldTypeDescription
event_types*array<string>Non-empty, and every member must be a recognized event type (FR-018).
signing_secret*stringCaller-supplied, at least [MIN_SIGNING_SECRET_LEN] characters, never echoed back (FR-012).
target_url*string

Responses

StatusBodyDescription
201SubscriptionSummaryThe newly registered subscription
401ErrorBodyMissing, invalid, or expired bearer token
403ErrorBodyThe caller is a member but below Admin
404ErrorBodyNo environment with this id exists, or the caller cannot access it
422ErrorBodyevent_types is empty or names an unrecognized type, signing_secret is too short, or target_url fails the SSRF policy

Removes a webhook subscription and its queued deliveries. Requires the caller to be an Admin (or above) in the environment.

delete/v1/environments/{environment_id}/webhooks/{id}Requires a bearer token

Parameters

NameInTypeDescription
environment_id*pathstring<uuid>Environment id
id*pathstring<uuid>Webhook subscription id

Responses

StatusBodyDescription
204The subscription is removed
401ErrorBodyMissing, invalid, or expired bearer token
403ErrorBodyThe caller is a member but below Admin
404ErrorBodyNo environment or subscription with this id exists, or the caller cannot access it

Lists a subscription's recent delivery outcomes, newest first.

get/v1/environments/{environment_id}/webhooks/{id}/deliveriesRequires a bearer token

Parameters

NameInTypeDescription
environment_id*pathstring<uuid>Environment id
id*pathstring<uuid>Webhook subscription id
limitqueryinteger<int64>Deliveries per page, capped at 100. Defaults to 20.
cursorqueryinteger<int64>Opaque pagination cursor — pass back the previous page's next_cursor to fetch the next one. Omitted for the first page.

Responses

StatusBodyDescription
200ListDeliveriesResponseRecent delivery attempts, newest first
401ErrorBodyMissing, invalid, or expired bearer token
404ErrorBodyNo environment or subscription with this id exists, or the caller cannot access it