Events
Stream monitor events live over server-sent events
Get each monitor event over 1 open HTTP connection as Xquik stores it. Reconnect with Last-Event-ID to replay what you missed. Streaming costs no credits.
- 200
- 401
- 429
GET
Stream monitor events live over server-sent events
Free. Streaming does not consume credits.
How the stream works
- Each event arrives as a server-sent event.
eventis its type,idis its event ID, anddatais the event object List events returns. - A new connection gets each event stored after it opens.
- To catch up after a drop, reconnect with
Last-Event-ID. The stream first sends every event after that ID, oldest first, then the new ones. - Events expire 30 days after Xquik creates them, so a replay reaches back 30 days at most. An ID Xquik no longer keeps replays every event it still keeps.
- The first frame is
retry: 3000, so a client waits 3 s before it reconnects. - An idle stream sends a
: keep-alivecomment every 15 s. - A connection ends after 30 minutes. Reconnect with the last ID you got. SSE libraries do this for you.
- Keep up to 5 streams open per account. Xquik may answer
429withtoo_many_streamsto a 6th.
Headers
string
required
Your API key.
string
The last event ID your client got. The stream first sends every event after
it. SSE libraries send it on their own when they reconnect.
Response
200 OK
text/event-stream body. Each event’s data line holds the event object
that List events documents, as 1 line of JSON.
401 Unauthenticated
x-api-key header value.
429 Too many streams or requests
too_many_streams means the account has 5 streams open. Close 1, then
connect again. rate_limit_exceeded means too many requests. Wait for the
Retry-After header before you retry.
Related. List Events · Get Event · Webhooks overview