Authentication
Register
Register a new account and user.
In multi-tenant mode (default):
- Creates a new account with the provided details
- Creates the first user as an admin
In single-tenant mode:
- Joins the pre-configured account
- Assigns ‘user’ role (not admin)
POST
Register
Body
application/json
Request body for account registration.
User's email address
User's password
Minimum string length:
1Display name for the account (required in multi-tenant mode)
Required string length:
1 - 255URL-friendly account identifier (auto-generated if not provided)
Required string length:
3 - 32Previous
LoginAuthenticate a user and return JWT tokens.
Validates the user's credentials against the specified account and returns
JWT tokens for authenticated access.
Flow:
1. Resolve account by slug or ID
2. Look up user by email in account
3. Check authentication provider (OAuth/SAML users must use their respective flows)
4. Verify password using timing-safe comparison
5. Check if user is active
6. Update last_login timestamp
7. Generate JWT tokens
8. Return response
Security:
- All authentication failures return the same generic 401 message
- Password verification is always performed (even with dummy hash) to prevent timing attacks
Next
Register