Authenticate user
POST
/api/v1/auth/login
const url = 'https://api.ultimateteam.ai/api/v1/auth/login';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","password":"example"}'};
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://api.ultimateteam.ai/api/v1/auth/login \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "email": "hello@example.com", "password": "example" }'Authenticate with email and password, returns a token pair.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
LoginRequest
Request body for the login endpoint.
Attributes: email: The user’s email address. password: The user’s password.
object
email
required
Email
User email address
string format: email
password
required
Password
User password
string
Examplegenerated
{ "email": "hello@example.com", "password": "example"}Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
LoginResponse
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_methods
2Fa Methods
Array<string>
2fa_required
2Fa Required
Whether 2FA verification is required
boolean
access_token
Access Token
Short-lived JWT access token
string
refresh_token
Refresh Token
Long-lived JWT refresh token
string
token_type
Token Type
Token scheme, always ‘bearer’
string
Example
{ "2fa_methods": [ "totp" ], "2fa_required": false, "access_token": "", "refresh_token": "", "token_type": "bearer"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}