Authenticate with local username/password
const url = 'https://example.com/v1/auth/login';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","password":"example","tenant_slug":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/auth/login \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "password": "example", "tenant_slug": "example" }'Request Body required
Section titled “Request Body required ”object
Optional tenant slug for login when domain-based resolution is unavailable.
Example generated
{ "email": "hello@example.com", "password": "example", "tenant_slug": "example"}Responses
Section titled “ Responses ”Credentials valid. Returns signed system JWT.
object
Signed system JWT. Present only when MFA is not required.
Token expiration. Present only when token is present.
If true, MFA verification is needed before a token is issued.
MFA challenge ID to use with POST /v1/auth/mfa/challenge.
Available MFA methods for this user.
If true, user must enroll MFA before accessing the app.
Example
{ "methods": [ "totp" ]}Malformed request body.
object
Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).
Human-readable description of the error.
Optional additional context about the error.
object
Policy notices from determining Cedar rules, if applicable.
Example generated
{ "code": "example", "message": "example", "details": {}, "notices": [ "example" ]}Invalid email or password.
object
Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).
Human-readable description of the error.
Optional additional context about the error.
object
Policy notices from determining Cedar rules, if applicable.
Example generated
{ "code": "example", "message": "example", "details": {}, "notices": [ "example" ]}Email not verified.
object
Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).
Human-readable description of the error.
Optional additional context about the error.
object
Policy notices from determining Cedar rules, if applicable.
Example generated
{ "code": "example", "message": "example", "details": {}, "notices": [ "example" ]}