Skip to content

Login

POST
/auth/login
curl --request POST \
--url https://example.com/auth/login \
--header 'Content-Type: application/json' \
--data '{ "email": "[email protected]", "password": "example" }'
Media typeapplication/json
UserLogin
object
email
required
Email
string format: email
password
required
Password
string
>= 1 characters <= 128 characters
Examplegenerated
{
"email": "[email protected]",
"password": "example"
}

Successful Response

Media typeapplication/json
LoginResponse

Login result. Without 2FA: api_token (same shape existing clients read). With 2FA enabled: no token yet — totp_required plus a short-lived pending_token the client sends back to /auth/totp/verify together with a code.

object
api_token
Any of:
string
pending_token
Any of:
string
totp_required
Totp Required
boolean
Example
{
"totp_required": false
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}