Discussions
Article/page discussion containers.
List discussions (paginated)
Cursor-paginated discussion list. `viewer_id` enriches each row with the caller's own reaction. Dual-auth: `/api/v1/discussions` (API-key) and `/api/v1/admin/discussions` (admin JWT).
Archive a discussion (soft retire)
Marks the discussion `archived` — hides it from default listings but preserves comments for audit. Admin-only. Emits a `discussion_archived` SSE event with `actor`, `at`, and (when supplied via the optional `{ reason }` body) `reason`.
Unlock a discussion
Reverses a prior lock. Requires admin API key or an admin JWT with the `moderate_discussion` capability. Emits a `discussion_unlocked` SSE event with `actor` and `at`.
Lock a discussion (admin moderation)
Locks new comments on a discussion. Requires admin API key or an admin JWT with the `moderate_discussion` capability. Emits a `discussion_locked` SSE event with `actor`, `at`, and (when supplied via the optional `{ reason }` body) `reason`.
Get reaction counts for a discussion
Aggregated reaction counts grouped by `reaction_type`. Read-only; dual-auth available to both widgets and the admin panel.
Fetch a discussion by publisher external id
Looks up a discussion by the tenant-scoped publisher `external_id`. Dual-auth: available under both the API-key and admin-JWT mounts.
List discussions (paginated)
Cursor-paginated discussion list. `viewer_id` enriches each row with the caller's own reaction. Dual-auth: `/api/v1/discussions` (API-key) and `/api/v1/admin/discussions` (admin JWT).
Upsert a discussion (deprecated — prefer by-external comment create)
Creates a discussion on first call and updates the title on subsequent calls with the same `external_id`. Still useful when a publisher wants to seed a title before any comment arrives. For the common 'comment on first visitor' flow, prefer `POST /api/v1/discussions/by-external/{externalId}/comments` — it materialises the discussion lazily so the widget avoids a write on every article view.
Archive a discussion (soft retire)
Marks the discussion `archived` — hides it from default listings but preserves comments for audit. Admin-only. Emits a `discussion_archived` SSE event with `actor`, `at`, and (when supplied via the optional `{ reason }` body) `reason`.
Unlock a discussion
Reverses a prior lock. Requires admin API key or an admin JWT with the `moderate_discussion` capability. Emits a `discussion_unlocked` SSE event with `actor` and `at`.
Lock a discussion (admin moderation)
Locks new comments on a discussion. Requires admin API key or an admin JWT with the `moderate_discussion` capability. Emits a `discussion_locked` SSE event with `actor`, `at`, and (when supplied via the optional `{ reason }` body) `reason`.
Get reaction counts for a discussion
Aggregated reaction counts grouped by `reaction_type`. Read-only; dual-auth available to both widgets and the admin panel.
Fetch a discussion by publisher external id
Looks up a discussion by the tenant-scoped publisher `external_id`. Dual-auth: available under both the API-key and admin-JWT mounts.