Register
POST /api/auth/registerRate limited to 10 requests per 60 seconds.
Request body
string
required
A valid email address.
string
required
Password - minimum 8 characters.
string
Optional display name for the user.
Example request
Example request
Response 201
Response 409
Returned when a verified user with this email already exists.
Verify email
POST /api/auth/verify-emailRate limited to 5 requests per 60 seconds.
Request body
string
required
The email address to verify.
string
required
The 6-digit verification code. Must be exactly 6 characters.
Example request
Example request
Response 200
Returns the user profile, tokens, and service access - identical to a login response.
Response 401
Resend verification
POST /api/auth/resend-verificationRate limited to 3 requests per 60 seconds.
Request body
string
required
The email address to resend the verification code to.
Response 200
Response 409
Login
POST /api/auth/loginrequires2FA flag - call login again with the verificationCode field.
Rate limited to 30 requests per 60 seconds.
Request body
string
required
User’s email address.
string
required
User’s password.
string
TOTP verification code. Required on the second call when 2FA is enabled.
Flow: standard login
Response 200
Flow: 2FA login (two-step)
Step 1 - Login without verification code:Response 401
Email not verified
Email not verified
If the user’s email is not verified, a new verification code is sent automatically.
Invalid credentials
Invalid credentials
Invalid 2FA code
Invalid 2FA code
Refresh tokens
POST /api/auth/refreshRefresh tokens are valid for 30 days. Each refresh token can only be used once - a new one is issued with each rotation.
Request body
string
required
The current refresh token.
Response 200
Response 401
Get current user
GET /api/auth/meThis endpoint requires authentication. You must provide a valid
Authorization: Bearer <token> header.Response 200
Logout
POST /api/auth/logoutRequires
Authorization: Bearer <token> header. The session ID is extracted from the JWT.Response 200
Delete account
POST /api/auth/delete-accountRequest body
string
Required if the account has a password (non-OAuth-only accounts).
string
Required if 2FA is enabled on the account.
Response 200
Toggle 2FA
POST /api/auth/2fa
