Stream webhook events for an org over Server-Sent Events
Opens a Server-Sent Events stream that emits webhook events delivered to the org in near-real-time. Requires the webhook_notifications feature flag and owner/admin role on the target org. The cursor is resolved from the since query parameter, falling back to the Last-Event-ID header when since is absent — clients reconnecting after a drop should send the last event id they observed. The stream caps at 5 minutes per connection, polls the underlying queue every 1 second, and emits a keepalive comment every 15 seconds. Frame types emitted on the stream:
ready— sent immediately after the stream opens, carries the resolved cursor.webhook.event— one frame per webhook event, payload mirrors the event record.- keepalive — SSE comment line (
:keepalive) every 15s to keep intermediaries from idling the connection. close— sent when the 5-minute cap is reached, before the server closes the socket.error— sent on unrecoverable stream errors before the socket closes.
Authorizations
Supabase JWT token in Authorization: Bearer header
Headers
Standard SSE reconnection header. Used as the cursor when the since query parameter is not supplied.
Path Parameters
Organization identifier (e.g. org-abc12345)
Query Parameters
Cursor (event id) to resume from. When omitted, the server falls back to the Last-Event-ID request header; when neither is supplied, the stream starts at the current tail.
Response
Server-Sent Events stream of webhook events. The connection is capped at 5 minutes; clients should reconnect and resume via Last-Event-ID or since.
Sequence of SSE frames. Each non-keepalive frame has an event: line naming the frame type (ready, webhook.event, close, error), an id: line carrying the event cursor (for webhook.event frames), and a data: line containing a JSON payload. Keepalive frames are SSE comments (:keepalive).