Skip to main content
Authentication lives under /api/v1/auth/. Every endpoint outside /auth/register and /auth/login requires Authorization: Bearer <api-key>. The route file is app/api/routes/auth.py.

POST /auth/register

Create a new user account and receive an API key. Request body (RegisterRequest):
Response (201 Created, RegisterResponse):
The api_key is shown once. Store it securely.

POST /auth/login

Exchange credentials for an API key. Request body (LoginRequest):
Response (LoginResponse): same shape as register.

POST /auth/rotate

Rotate the calling user’s API key. Old key is invalidated; new one is returned.
Response (RotateKeyResponse):

GET /auth/me

Return the current user.
Response (UserResponse):

Roles

The codebase recognises ADMIN, OPERATOR, APPROVER, AUDITOR, VIEWER, and POLICY_AUTHOR. Endpoints that require a specific role declare it via the require_role(...) dependency - see the per-endpoint docs.

See also

  • Tasks - first endpoint that needs an API key.
  • Configuration - the env vars that control key storage.