Skip to main content
GET https://xquik.com/api/v1/events/stream
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, and id is its event ID. 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. It then sends 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 200 streams open per account. Xquik may answer 429 with too_many_streams to a 201st.
These examples print 1 line per event. They keep the last event ID for the next connection. Store that ID if your process restarts. With it, the first connection after a restart replays what it missed.

Headers

Query parameters

Response

200 OK

A text/event-stream body. Each event’s data line holds the event object that List events documents. It is 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 200 streams open. Close 1, then connect again. rate_limit_exceeded means too many requests. Wait for the Retry-After header before you retry.

Response examples

  • 400 { "error": "invalid_input", "message": "Invalid input. Check the request body." }
  • 401 { "error": "unauthenticated", "message": "Authentication required. Provide a valid API key or bearer token." }
  • 403 { "error": "api_key_paused", "message": "This API key is paused. Resume it at dashboard.xquik.com/api-keys to use it again." }
  • 429 { "error": "too_many_streams", "message": "Close a stream first. Keep up to 200 open per account." }