Stream
Server-Sent Events for real-time updates.
Mint a short-lived SSE ticket
Returns a 60s single-use ticket scoped to one tenant and one discussion. Use it as `?ticket=<value>` on the SSE stream URL. Consumed atomically via `GETDEL`; reusing the same ticket returns 401.
Mint an SSE ticket for a poll embed
Resolves an embed code to its underlying poll, then mints a 60s single-use ticket scoped to `(tenant, poll)`. Returns `{ ticket, pollId, expiresAt }`. Draft polls also yield a ticket (admin preview flow); revoked / deleted / not_found return 404.
Mint an SSE ticket by publisher external id
Resolves the tenant-scoped `external_id` to an internal discussion UUID and mints a 60s single-use ticket scoped to it. 404 when no discussion exists yet. Returns `{ ticket, discussionId, expiresAt }` — use `discussionId` on the SSE attach URL.
Subscribe to real-time events for a discussion
Server-Sent Events stream. Auth via `X-API-Key` header, `?ticket=` (preferred for browsers; mint via `POST /api/v1/stream/ticket`), or `?token=` (deprecated — emits `Deprecation: true` and `Sunset` response headers). Supports `Last-Event-ID` for replay after reconnect. See `components.schemas.SseEvent` for the per-event `data` payload shapes. Event names: `comment_created`, `comment_edited`, `comment_deleted`, `comment_approved`, `comment_rejected`, `comment_pinned`, `comment_unpinned`, `reaction_toggled`, `discussion_locked`, `discussion_unlocked`, `discussion_archived`, `notification_reply`, `poll_vote`, `poll_status_changed`. Framing events (no domain payload): `connected`, `connection-timeout`.