🌐 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
| Module | Prefix | Owns |
|---|---|---|
auth | /api/auth | registration, login, OAuth, JWT, password reset |
stations | /api/stations | claim, members, invites, identity sync |
devices | /api/devices | proxy to Station via peer.call() (no local data) |
Conventions
- All Zod schemas use
camelCasekeys - Error response:
ErrorSchemafromshared/schemas.ts→{ statusCode, error, message } Authorization: Bearer <accessToken>on protected routes- Refresh tokens via
POST /api/auth/refresh