Events (server-sent events)

Stream live browser, sync, job and RPA events from the Quin Local API over server-sent events, filter them and resume after a disconnect.

Local APIApplies to Quin Camoufox 0.7Updated 2 November 2026

GET /api/v1/events is a server-sent events stream (text/event-stream). It tells your script what happens without polling: browsers starting and closing, navigations, actions, Quin Cloud saves, lease and proxy problems, job and RPA progress. There is no WebSocket endpoint.

Connect

Any valid token can connect; you receive only the events your token's scopes allow.

Shell
curl -N http://127.0.0.1:50380/api/v1/events?kinds=browser.*,job.updated \
  -H "Authorization: Bearer $QUIN_API_TOKEN" -H "Accept: text/event-stream"
Query / headerNotes
kindsComma-separated kinds. An entry matches the exact kind or any kind starting with it; a trailing * is allowed (browser.*)
last_event_id (query) or Last-Event-ID (header)Resume after this event id. Without either, the stream starts with new events only

Wire format

Text
: connected

id: 412
event: navigation
data: {"ts": "2026-11-02T09:21:03", "session_id": "s_3f9c1d2e8a7b6c5d", "profile_id": "AbCd1234", "cloud_id": null, "event": "navigation", "tab": "t1", "url": "https://example.com/"}

id: 413
event: job.updated
data: {"ts": "2026-11-02T09:21:05", "job_id": "job_8c41d0e2b9a3", "state": "COMPLETED"}

: keep-alive
  • id increases by one per event; event is the kind; data is one JSON object starting with ts.
  • A comment line : keep-alive is sent after 15 seconds without events.
  • Event data never contains tokens, passwords, cookie values or typed secret values.

Resuming and history

Quin keeps the last 1,000 events in memory. Reconnect with the last id you processed to receive what you missed. If you fell further behind than the history, the stream says so before continuing:

Text
event: reset
data: {"reason": "history_exceeded"}

History starts empty when Quin starts; event ids are not preserved across restarts.

Revocation

An open stream re-checks its token and the signed-in account every 30 seconds. When the token was revoked or expired, or the account is no longer allowed, the stream sends a final event and ends:

Text
event: account.revoked
data: {"code": "token_revoked"}

The stream also ends when the Local API is turned off or Quin closes. A connection without a valid token is refused with 401.

Event kinds

KindScope neededData (besides ts)
browser.startingbrowser:openSession fields; also sent while a Quin Cloud lease is acquired
browser.startedbrowser:openSession fields
browser.failedbrowser:openSession fields and error, or profile_id and state after a crash
browser.closedbrowser:openSession fields and final state
session.control_releasedbrowser:openSession fields and reason (for example taken_over, closing)
tab.opened, tab.closedbrowser:openSession fields and tab
navigationbrowser:openSession fields, tab, url
action.startedbrowser:controlSession fields, action_id, action
action.completedbrowser:controlSession fields, action_id, action, duration_ms
action.failedbrowser:controlSession fields, action_id, action, code
recorder.startedbrowser:controlSession fields
runtime.download_progressprofiles:readprofile_id, state, message, progress
sync.started, sync.completed, sync.failedprofiles:readprofile_id, state, message, progress
lease.lostprofiles:readprofile_id, state, message
proxy.failedprofiles:readprofile_id and state/message or reason
recovery.requiredprofiles:readprofile_id, state, message
job.updatedjobs:readjob_id, state
task.updated, task.finished, run.updated, step.updatedrpa:readTask, run or step progress
account.revokedany tokenreason or code

"Session fields" are session_id, profile_id (the local profile id), cloud_id and event. sync.completed means Quin Cloud committed the profile's revision (SYNCED).

With the SDKs

Both SDKs reconnect automatically with Last-Event-ID and filter by kind on the client as well.

Python
for ev in client.events(kinds=["browser.*", "job.updated"]):
    print(ev.id, ev.kind, ev.data)
TypeScript
for await (const ev of client.events({ kinds: ["sync.completed"] })) {
  console.log(ev.id, ev.kind, ev.data);
}
Shell
quin events --kind run.updated --kind task.finished

The Python generator reconnects after 75 seconds without data (read_timeout), with exponential backoff up to 30 seconds; authorization errors (401/403) are raised, not retried.