API reference
POSTPublic
Login
/api/v1/login
Exchange email and password for a Sanctum access token. Only active company admin and user accounts may use this gateway; other roles receive 403.
If the account has a usable MFA method (enrolled ∩ company policy), no token is issued. The response contains mfa_required, a challenge_token, the allowed methods (email, totp, webauthn), and an email_hint. Complete the challenge with POST /api/v1/login/mfa/verify (or WebAuthn). Wrong credentials always return 401 with the same message (no user enumeration).
When company policy requires MFA but nothing is enrolled, login still succeeds and mfa_setup_required is true.
Path parameters
This endpoint has no path parameters.
Query parameters
This endpoint has no query parameters.
Request body
| Field | Type | Description |
|---|---|---|
email Required | string | Account email. e.g. "user@acme.test" |
password Required | string | Account password. e.g. "P@ssw0rd!" |
Responses
| Status | Meaning |
|---|---|
| 200 | See the example response. |
| 401 | See the example response. |
| 403 | See the example response. |