/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):
201 Created, RegisterResponse):
api_key is shown once. Store it securely.
POST /auth/login
Exchange credentials for an API key.
Request body (LoginRequest):
LoginResponse): same shape as register.
POST /auth/rotate
Rotate the calling user’s API key. Old key is invalidated; new one is returned.
RotateKeyResponse):
GET /auth/me
Return the current user.
UserResponse):
Roles
The codebase recognisesADMIN, 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.
DELETE /auth/users/{user_id}
Admin-only. Deletes a user. Requires the calling user’s role to include ADMIN.
See also
- Tasks - first endpoint that needs an API key.
- Configuration - the env vars that control key storage.