Skip to main content

🌐 REST API

The Cloud HTTP API. Documented inline via OpenAPI β€” every route declares a Zod schema block consumed by @fastify/swagger + fastify-type-provider-zod.

Live Documentation​

  • Scalar UI: <cloud-host>/api/reference
  • OpenAPI JSON: <cloud-host>/documentation/json

Endpoint Groups​

ModulePrefixOwns
auth/api/authregistration, login, OAuth, JWT, password reset
stations/api/stationsclaim, members, invites, identity sync
devices/api/devicesproxy to Station via peer.call() (no local data)

Conventions​

  • All Zod schemas use camelCase keys
  • Error response: ErrorSchema from shared/schemas.ts β†’ { statusCode, error, message }
  • Authorization: Bearer <accessToken> on protected routes
  • Refresh tokens via POST /api/auth/refresh

Reference​