GET https://xquik.com/api/v1/events/stream
Free. Streaming does not consume credits.
How the stream works
- Each event arrives as a server-sent event.
eventis its type, andidis its event ID.datais 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-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 200 streams open per account. Xquik may answer
429withtoo_many_streamsto a 201st.
Headers
Query parameters
Response
200 OK
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 thex-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.Related. List Events · Get Event · Webhooks overview
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." }