Obtain a bearer token
POST /api/auth/login
Authenticates with email and password and returns a bearer token plus user resource on success. Invalid credentials return a uniform 401; an organization requiring SSO returns 403; per-account lockout or route throttling can return 429.
This operation needs no authentication.
Request body
application/json object
emailstring (email) requiredpasswordstring required
Generated sample
{
"email": "user@example.com",
"password": "string"
}Responses
200 Authenticated; a token and user resource are returned.
application/json object
tokenstring requiredWrite onlyuserUserResource required
Generated sample
{
"token": "string",
"user": {
"created_at": "2026-01-01T00:00:00Z",
"email": "user@example.com",
"id": 0,
"name": "string",
"balance_micros": 0
}
}401 Invalid email/password combination.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
403 Password login is disallowed because the organization requires SSO.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
422 Email or password request field failed validation.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
429 Login rate limit or per-account lockout.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
text/html string