Login
POST
/auth/login
const url = 'https://example.com/auth/login';const options = { method: 'POST', headers: {'Content-Type': 'application/json'},};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/auth/login \ --header 'Content-Type: application/json' \Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
UserLogin
object
email
required
Email
string format: email
password
required
Password
string
Examplegenerated
{ "password": "example"}Responses
Section titled “Responses”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
Example
{ "totp_required": false}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}