GET /controls/stream (SSE)
AvailableLive channel for controls. Server-Sent Events; poll or delta as fallback.
GET
https://ctrlapp.krdcode.com/api/public/sdk/v1/controls/streamAuth:
Bearer <PUBLISHABLE_KEY>Query
device_uid— required.since— ISO cursor for the initial snapshot.
The response is text/event-stream. Frames observed on the wire:
event: hello—{ "cursor": "<iso>" }once at connect.event: update— a full per-device snapshot whenever the app cursor advances past this device's cursor. Payload shape:{ "changed": <controls-map>, "deleted": ["<key>", ...], "cursor": "<iso>", "snapshot": true }. Replace the local map withchangedand remove any keys indeleted.: heartbeatcomment every ~25 s.event: bye—{ "reason": "max-duration" }after the 5-minute cap; reconnect with the last cursor.
Fallback
If SSE is blocked by a proxy or the client cannot hold an open connection, poll /controls/delta at your chosen interval. The delta payload uses { snapshot, controls, deleted } — same "replace the local map" contract, different field name for the map.
Errors
400— missingdevice_uid.401— bad key.