Skip to content

Authenticate user

POST
/api/v1/auth/login

Authenticate with email and password, returns a token pair.

Authorizations

Request Body required

Request body for the login endpoint.

Attributes: email: The user’s email address. password: The user’s password.

object
email
required

User email address

string format: email
<= 255 characters
password
required

User password

string
>= 1 characters

Responses

200

Successful Response

Response body for the login endpoint.

Attributes: access_token: A short-lived JWT access token. refresh_token: A long-lived JWT refresh token. token_type: Always ‘bearer’. two_fa_required: Whether a second factor is needed. two_fa_token: Short-lived token for 2FA verification.

object
2fa_required

Whether 2FA verification is required

boolean
2fa_token
Any of:
string
access_token

Short-lived JWT access token

string
""
refresh_token

Long-lived JWT refresh token

string
""
token_type

Token scheme, always ‘bearer’

string
default: bearer

422

Validation Error

object
detail
Array<object>
object
ctx
object
input
loc
required
Array
msg
required
string
type
required
string