Skip to main content
GET
Stream watcher changes (SSE)

SSE Events

The stream emits exactly five event types: heartbeat is a connection keep-alive on the stream’s own short drain cadence. It is not tied to the watcher’s pollInterval and does not mean an upstream poll just completed. The stream requires Business or Internal tier, and returns 400 if the watcher is paused.

Resuming

Every change, heartbeat, and reconnect event carries an SSE id: a cursor into the watcher’s change buffer, which retains the last 50 detected changes. Send that cursor back and the server resumes from it rather than from the current tip.
  • Last-Event-ID: <id> header — what browser EventSource and the Borough SDK replay automatically on reconnect. Wins if both are supplied.
  • ?since=<id> query parameter — for a first connect from a client that cannot set request headers.
A connection with no cursor starts at the buffer tip, so it delivers only changes detected from that point on. The connected event carries no id. See the streaming guide for worked examples and the retention caveats.

Authorizations

Authorization
string
header
required

Polar.sh license key. Format: BOROUGH-<uuid>

Path Parameters

id
string
required

Watcher ID (UUID)

Query Parameters

since
integer

Resume cursor — the SSE id of the last event you processed. Changes recorded after it are replayed, bounded by how many the watcher retains. Ignored when Last-Event-ID is present, which takes precedence. A connect with neither starts at the current tip instead of replaying.

Required range: x >= 0

Response

Server-Sent Events stream

The response is of type string.