Stream live message changes with server-sent events
#Operation ID: streamEvents
relayToken/v1/eventsOne authenticated SSE stream. Event data contains stable resource IDs, not complete resources. Reconnect with Last-Event-ID for bounded in-process replay. Replay does not survive a restart. stream.reset can require a REST refetch or provide a safe replay cursor. Replayed events can be duplicated. The stream starts with retry: 3000 and sends keep-alive comments every 15 seconds. Comments are ignored by SSE parsing. Database and authentication failures before streaming starts use the normal JSON error shape.
Request
Request headers
Last-Event-IDstringOptionalLast received SSE event ID for replay.
Responses
200Parsed SSE frames. Each data field is a string containing a JSON payload.
Cache-ControlstringRequired- Value:
"no-cache" X-Accel-BufferingstringRequired- Value:
"no"
Content type text/event-stream
Stream frame
Exactly one of these8 variants
objectdataRequiredeventRequiredstringValue:"stream.ready"idOptionalstring
objectdataRequiredeventRequiredstringValue:"message.created"idOptionalstring
objectdataRequiredeventRequiredstringValue:"message.updated"idOptionalstring
objectdataRequiredeventRequiredstringValue:"reaction.added"idOptionalstring
objectdataRequiredeventRequiredstringValue:"reaction.removed"idOptionalstring
objectdataRequiredeventRequiredstringValue:"media.available"idOptionalstring
objectdataRequiredeventRequiredstringValue:"stream.reset"idOptionalstring
objectretryRequiredintegerValue:3000
Other fields are not accepted.
401, 500, 503Error responses
- 401
- Missing or invalid bearer token.
- 500
- The request failed.
- 503
- The database, sender, Messages access, or request store is unavailable.
Content type application/json
Headers on every response
X-Request-IDstringRequiredRequest correlation identifier.