Skip to content
Sign in Create account

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

  • email string (email) required
  • password string required

Generated sample

{
  "email": "user@example.com",
  "password": "string"
}

Responses

200 Authenticated; a token and user resource are returned.

application/json object

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

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

403 Password login is disallowed because the organization requires SSO.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

422 Email or password request field failed validation.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

429 Login rate limit or per-account lockout.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

text/html string