chat
Subscribe to new messages (SSE)
A long-lived text/event-stream carrying everything that reaches the conversation
without the client asking: scheduled messages, the silence check-in, and messages or
reactions from the student’s other devices.
event: message—datais aStreamMessageEvent.event: reaction—datais aStreamReactionEvent. The reactions on it changed.event: ping— an empty keep-alive, about every 25 seconds.
The stream also repeats messages this device produced through POST /api/chat/send, so
de-duplicate by message.id. Reconnect on close, then call GET /api/chat/messages
with after=<cursor of your newest message> to fill the gap.
GET
Subscribe to new messages (SSE)
Authorizations
Supabase access token: Authorization: Bearer <token>
Response
The event stream
The response is of type string.