Skip to main content
GET
Stream monitor events live over server-sent events
Free. Streaming does not consume credits.
Open 1 connection and read your monitor events as they arrive. You need no public endpoint and no signature check. Use it beside webhooks or instead of them.

How the stream works

  • Each event arrives as a server-sent event. event is its type, id is its event ID, and data is 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-alive comment 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 429 with too_many_streams to a 6th.
These examples print 1 line per event and keep the last event ID for the next connection. Store that ID if your process restarts, so its first connection replays what it missed.

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

A text/event-stream body. Each event’s data line holds the event object that List events documents, as 1 line of JSON.

401 Unauthenticated

Missing or invalid API key. Check the 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.