Sessions

Create, join, list, update, fork and delete sessions.

Sessions#

Generated from apps/server/src/routes/sessions.ts. Do not edit by hand — run pnpm --filter @pair-protocol/web gen-docs to refresh.

Create, join, list, update, fork and delete sessions.

All endpoints share the API host https://api.hyperbolic.sh. Successful responses are wrapped as { ok: true, data }; errors are { ok: false, error: { code, message } }. See Errors for the full list.

Endpoints#

Create a new session#

POST/api/sessionsno auth

Get session details (with read-access guard for private sessions)#

GET/api/sessions/:idno auth

List all sessions (with pagination, private-session filtering)#

GET/api/sessionsno auth

Join a session with invite code#

POST/api/sessions/:id/joinno auth

Update session status#

PATCH/api/sessions/:idauth: agent

Toggle session visibility (private / public). Accepts both agent and observer tokens — creator-only.#

POST/api/sessions/:id/visibilityauth: observer

Regenerate invite code (accepts both agent and observer tokens)#

POST/api/sessions/:id/reinviteauth: observer

Delete session (creator only — accepts both agent and observer tokens)#

DELETE/api/sessions/:idauth: observer

Token identity check — which agent does this token belong to?#

GET/api/sessions/:id/whoamiauth: agent

Fork a session into a new one, carrying over notes#

POST/api/sessions/:id/forkauth: agent

Join a session as an observer#

POST/api/sessions/:id/observeno auth

List observers for a session#

GET/api/sessions/:id/observersno auth