Skip to content

Open the event stream

GET
/stream

A Server-Sent Events stream that tells when a device of the account changes. Keep it open and do not poll the devices at a short interval.

See Event Stream for the events and the rules for clients.

Authorizations

Parameters

Header Parameters

X-Api-Key
string

The API key. Use this header and not the apiKey query parameter, so that the key is not in the URL

Accept-Encoding
string

gzip gives one compressed stream, in which each event is sent immediately

Responses

200

The stream is open. Events arrive until the API closes the stream.

Server-Sent Events: hello, measurements, changed and resync. The data of each event is a JSON object.

string
Example
event: hello
data: {"version":1,"heartbeatSeconds":120,"pods":2}
event: measurements
data: {"id":"AbCd1234","measurements":{"time":{"time":"2026-11-17T09:58:12.123456Z","secondsAgo":0},"temperature":23.4,"humidity":51.2,"feelsLike":23.4,"rssi":-58}}
event: changed
data: {"id":"AbCd1234","fields":["acState"]}
event: resync
data: {}

401

The API key is not valid

429

The account has too many open streams (the limit is 10). Wait at least the seconds of the Retry-After header

Headers

Retry-After
integer

Seconds to wait before the next attempt

503

The stream is not available now. Wait at least the seconds of the Retry-After header and get the devices at your usual interval until then

Headers

Retry-After
integer

Seconds to wait before the next attempt