Event stream
GET /v1/events/stream tails your workspace's events as they
happen, over Server-Sent Events. Each frame carries the same JSON a
webhook endpoint is posted, plus
mode, so a handler written for production webhooks can be
pointed at the stream unchanged while you develop it.
Open a stream
curl -N https://signenvoystaging.fly.dev/v1/events/stream \
-H "Authorization: Bearer $SENV_API_KEY" \
-H "Accept: text/event-stream" retry: 3000
event: ready
data: {"cursor": 418, "mode": "test"}
id: 419
event: document.sent
data: {"id":"evt_outbox_419","type":"document.sent","created_at":"2026-08-22T12:00:00+00:00","document":"doc_...","data":{"seq":2,"engine_event_type":"sent","actor":{"type":"api"}},"mode":"test"}
: keep-alive
The ready frame tells you where the tail starts. A fresh stream
begins at the newest event, so you see what happens next rather than a
replay. The key's mode scopes the stream: a test key sees test documents
only, a live key live documents only.
Resume and filter
- Send
Last-Event-ID(the lastid:you saw) when reconnecting, or?after_id=N, to resume strictly after that event. Events older than the seven-day outbox retention are gone. ?events=document.completed,document.sealedlimits the stream to those types; unknown types answervalidation-failed.
Lifecycle frames
: keep-aliveevery 15 seconds while nothing happens.event: reconnectafter 15 minutes: the server closes the stream on purpose. Reconnect immediately withLast-Event-ID; this is a rotation, not a failure, so do not back off.event: errorwith a problem body, then the stream closes: reconnect afterretrymilliseconds with backoff.
Limits
Five concurrent streams per workspace; a sixth answers
rate-limited with
Retry-After: 5. The stream carries the usual
X-SignEnvoy-Envelopes-Remaining and rate-limit headers.