Skip to content

API Overview

Base URL: /api/

Authentication

All endpoints (except auth) require a valid JWT token via ts_session cookie. The session is issued at login and verified on every request.

Endpoints protected with requirePermission(perm) additionally check that the authenticated user has the named permission. Endpoints using requireAdmin require the admin role.

Common Patterns

  • IDs: UUID v4
  • Timestamps: ISO 8601
  • Error response: { "error": "message" }
  • All request/response bodies: JSON (Content-Type: application/json)
  • Auth cookie: ts_session (HttpOnly)

Resources