Skip to content

User login

POST
/auth/login

Authenticates using email and password. If the user belongs to a single tenant, returns a JWT immediately. If the user has multiple tenants, returns the tenant list (no token). Provide tenant_id to select a specific tenant.

Request to authenticate (login).

object
email
required

User email address.

string
password
required

User password.

string
tenant_id

Optional tenant_id to select when user has multiple memberships.

string | null format: uuid

Login response

Login response - either a token (single/selected tenant) or a tenant list.

object
access_token

The JWT access token (null if tenant selection required).

string | null
expires_in

Token lifetime in seconds (when access_token is present).

integer | null format: int64
tenants
required

List of tenants the user belongs to.

Array<object>

Summary of a tenant the user belongs to.

object
role
required
string
short_name
required
string
tenant_id
required
string format: uuid
token_type

Token type (always “Bearer” when access_token is present).

string | null

Invalid credentials

Generic error response for OpenAPI documentation.

object
error
required

Error message.

string

Server error