API Reference
Initial user setup
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
requestobject2 properties
usernamestringrequiredpasswordstringrequiredSuccess 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
responseobject3 properties
totp_secretstringtotp_uristringsuccessbooleanError responses
400Validation error
Validation error
Content typeapplication/json
responseobject2 properties
errorstringmessagestringExample response
{
"error": "VALIDATION_ERROR",
"message": "Invalid input"
}