Stream Watcher Changes
Opens a Server-Sent Events stream that delivers a watcher’s change events as
its scheduled polls detect them. The stream emits exactly these events:
connected, change, heartbeat, reconnect, and stopped.
Delivery is decoupled from the watcher’s pollInterval: the watcher polls
upstream on its own schedule, while the stream drains whatever it has found
every 20 seconds, sending heartbeat on a tick with nothing new. If the
watcher is briefly unavailable, the stream stays open and heartbeats pause
until it recovers, so a missing heartbeat does not mean the connection has
dropped. A single
stream lasts at most 5 minutes and then sends reconnect; open a new one to
continue. stopped means the watcher is no longer active: paused,
deleted, stopped because the monthly quota ran out, or paused because the
account dropped below Business. If the stream closes without an event,
reconnect with your last id. Each stream connection, including every
reconnect after the 5-minute limit, counts as one request against your
quota: about 12 an hour, or about 8,640 per 30 days, for a stream kept
open continuously, on top of the polls.
Every change, heartbeat, reconnect and stopped event carries an
SSE id, a resume cursor; connected does not. Reconnect with the standard
Last-Event-ID header, or with since on a first connect where the client
cannot set headers.
Tier: Business+
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.
If the watcher is briefly unavailable, the stream stays open and heartbeats pause until
it recovers, for at most the rest of the stream’s 5-minute lifetime. The connection is
still alive, so don’t treat a missing heartbeat as a dropped stream or reconnect because
of one. The stream ends with reconnect or stopped, or when your client disconnects.
The stream requires Business or Internal tier, and returns 400 if the watcher is
paused.
Change events
TheeventType on a change event, and what listingId, oldValue and newValue
hold, depend on the watch type:
eventType and newValue.
While live fetching is held back for Borough’s scheduled updates, or paused, a listing
watcher skips its own polls, and skipped polls are not counted. Changes Borough’s
scheduled refresh detects for the listing can still arrive; otherwise the stream sends
only heartbeat events. No separate signal is sent.
Resuming
Everychange, heartbeat, reconnect, and stopped 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 browserEventSourceand 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.
connected event carries no id.
See the streaming guide
for worked examples and the retention caveats.Authorizations
Polar.sh license key. Format: BOROUGH-<uuid>
Path Parameters
Watcher ID (UUID)
Query Parameters
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.
x >= 0Response
Server-Sent Events stream
The response is of type string.