Start typing to search.

API Reference

Initial user setup

View Markdown
POST /api/auth/setup

Creates the first superadmin user. Only works when no users exist.

Operation IDsetupAuth

Authentication

No authentication is required.

Request body

This request body is required.

Content typeapplication/json

requestobject
2 properties
usernamestringrequired
passwordstringrequired

Success response body

200User created. When TOTP is required, returns TOTP enrollment data (`totp_secret`, `totp_uri`). When TOTP is disabled (`auth.totp_required: false`), returns `{ success: true }` and the caller proceeds to log in with the password only.

User created. When TOTP is required, returns TOTP enrollment data (totp_secret, totp_uri). When TOTP is disabled (auth.totp_required: false), returns { success: true } and the caller proceeds to log in with the password only.

Content typeapplication/json

responseobject
3 properties
totp_secretstring
totp_uristring
successboolean

Error responses

400Validation error

Validation error

Content typeapplication/json

responseobject
2 properties
errorstring
messagestring
Example response
{
  "error": "VALIDATION_ERROR",
  "message": "Invalid input"
}