--- openapi: 3.1.0 info: title: API description: Backend API. version: 0.1.0 license: name: proprietary servers: - url: http://localhost:8080 description: Local development paths: /livez: get: summary: Liveness check description: | Returns 200 if the process can handle HTTP requests. No dependency checks — fast and side-effect-free. Kubernetes uses this to decide whether to restart the container. operationId: health_liveness tags: - health responses: "200": description: Service is alive. content: application/json: schema: $ref: "#/components/schemas/HealthResponse" example: status: ok /readyz: get: summary: Readiness check description: | Returns 200 if the service can serve requests (critical dependencies are available). Returns 503 if a critical dependency is down. Checks catalog database connectivity only. operationId: health_readiness tags: - health responses: "200": description: Service is ready to serve requests. content: application/json: schema: $ref: "#/components/schemas/HealthResponse" example: status: ok "503": description: Service is not ready. content: application/json: schema: $ref: "#/components/schemas/HealthResponse" example: status: unavailable /auth/signup: post: summary: Sign up a new user description: | Proxies the sign-up request to GoTrue. Returns a session with access and refresh tokens on success. Email confirmation is skipped when `GOTRUE_MAILER_AUTOCONFIRM=true`. operationId: auth_signup tags: - auth requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AuthRequest" responses: "200": description: User created and session returned. content: application/json: schema: $ref: "#/components/schemas/SessionResponse" "422": description: Validation error (e.g. user already registered). /auth/token: post: summary: Sign in with email and password description: | Proxies `POST /token?grant_type=password` to GoTrue. Returns a session with access and refresh tokens. operationId: auth_token tags: - auth requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AuthRequest" responses: "200": description: Authenticated session returned. content: application/json: schema: $ref: "#/components/schemas/SessionResponse" "400": description: Invalid credentials. /auth/refresh: post: summary: Refresh access token description: | Proxies `POST /token?grant_type=refresh_token` to GoTrue. Returns a new session with a fresh access token. operationId: auth_refresh tags: - auth requestBody: required: true content: application/json: schema: type: object required: - refresh_token properties: refresh_token: type: string responses: "200": description: New session returned. content: application/json: schema: $ref: "#/components/schemas/SessionResponse" "400": description: Invalid or expired refresh token. /auth/logout: post: summary: Sign out description: Proxies `POST /logout` to GoTrue, invalidating the session. operationId: auth_logout tags: - auth security: - BearerAuth: [] responses: "204": description: Signed out successfully. /api/me: get: summary: Get current user description: | Returns the identity of the authenticated user extracted from the Supabase JWT. Requires a valid Bearer token issued by GoTrue. operationId: auth_me tags: - auth security: - BearerAuth: [] responses: "200": description: Authenticated user identity. content: application/json: schema: $ref: "#/components/schemas/UserResponse" example: id: "550e8400-e29b-41d4-a716-446655440000" email: "user@example.com" role: "authenticated" "401": description: Missing or invalid Bearer token. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" example: error: "missing Authorization header" components: securitySchemes: BearerAuth: type: http scheme: bearer bearerFormat: JWT description: Supabase GoTrue JWT signed with GOTRUE_JWT_SECRET. schemas: HealthResponse: type: object required: - status properties: status: type: string description: Health status indicator. examples: - ok UserResponse: type: object required: - id - email - role properties: id: type: string format: uuid description: User UUID (JWT `sub` claim). email: type: string format: email description: User email address. role: type: string description: User role (JWT `role` claim). ErrorResponse: type: object required: - error properties: error: type: string description: Human-readable error message. AuthRequest: type: object required: - email - password properties: email: type: string format: email password: type: string format: password SessionResponse: type: object required: - access_token - refresh_token - token_type - expires_in - user properties: access_token: type: string description: Short-lived JWT for API calls. refresh_token: type: string description: Long-lived token for obtaining new access tokens. token_type: type: string example: bearer expires_in: type: integer description: Seconds until the access token expires. user: type: object description: Authenticated user data from GoTrue.