Live streaming
Watch events as they arrive — over Server-Sent Events or a WebSocket. Use it for live dashboards, tailing, and dev feedback.
Best-effort & lossy by design — the durable delivery guarantee is signed outbound webhooks. Use the stream to observe, not to guarantee receipt.
Server-Sent Events
# Server-Sent Events — key in the Authorization header
curl -N https://hookie.ai/v1/stream \
-H "Authorization: Bearer ik_live_xxx" Each event is an SSE frame; a control frame signals a gap if you resumed past the buffer:
id: 4217
data: {"seq":4217,"id":"9d3f…","dataset":"leads","received_at":"2026-07-10T12:00:00.000Z","data":{"email":"ada@example.com"}}
event: stream-gap
data: {"missed_from":4000,"resume_from":4180} In the browser
// Browsers can't set headers on EventSource, so pass the key as ?key=
const es = new EventSource("https://hookie.ai/v1/stream?key=ik_live_xxx");
es.onmessage = (e) => {
const event = JSON.parse(e.data); // { seq, id, dataset, received_at, data }
console.log(event.dataset, event.data);
};
// The browser auto-resends Last-Event-ID on reconnect; a gap surfaces here:
es.addEventListener("stream-gap", (e) => {
const gap = JSON.parse(e.data); // { missed_from, resume_from }
console.warn("missed events", gap.missed_from, "→", gap.resume_from);
}); Resume
The buffer holds roughly the last 1,000 events (up to ~5 minutes). Resume from where you left
off with the Last-Event-ID header (SSE sends it automatically on reconnect) or the
?after_seq= query parameter. If your resume point has already aged out, Hookie emits
a stream-gap event with the range you missed, then continues live.
WebSocket
# WebSocket — same endpoint, Upgrade header (resume with ?after_seq=)
wscat -c "wss://hookie.ai/v1/stream?key=ik_live_xxx&after_seq=4180" From the console
Signed-in users can open the Live view in the console — it streams the current
tenant's events over the session-authenticated /admin/api/stream endpoint, no key
required.
Limits
- Concurrent connections are capped per plan (Free: 1, Standard: 5).
- Authenticate with any active ingest key for the tenant (read-only tail; it never exposes stored data).