Exchange credentials for a JWT pair
POST
/api/v1/auth/login
const url = 'https://example.com/api/v1/auth/login';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"admin@aigov.example.com","password":"ChangeMe123!"}'};
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/api/v1/auth/login \ --header 'Content-Type: application/json' \ --data '{ "email": "admin@aigov.example.com", "password": "ChangeMe123!" }'Issue an access/refresh pair.
Rate limited per client to blunt credential stuffing. Failed attempts are written to the audit trail and committed before the error propagates, so a rolled-back request still leaves the evidence behind.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
LoginRequest
object
email
required
Email
string format: email
password
required
Password
string
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
object
success
required
boolean
data
required
TokenResponse
object
access_token
required
Access Token
string
refresh_token
required
Refresh Token
string
token_type
Token Type
string
expires_in
required
Expires In
Access token lifetime in seconds
integer
Example
{ "success": true, "data": { "token_type": "bearer", "expires_in": 28800 }}Unauthorized
Media typeapplication/json
ErrorResponse
object
Example
{ "error": { "code": "not_found", "correlation_id": "0f4b9a2e-6c2b-4f0e-9a4a-1c2b3d4e5f60", "message": "AI system not found." }}Forbidden
Media typeapplication/json
ErrorResponse
object
Example
{ "error": { "code": "not_found", "correlation_id": "0f4b9a2e-6c2b-4f0e-9a4a-1c2b3d4e5f60", "message": "AI system not found." }}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
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}Too Many Requests
Media typeapplication/json
ErrorResponse
object
Example
{ "error": { "code": "not_found", "correlation_id": "0f4b9a2e-6c2b-4f0e-9a4a-1c2b3d4e5f60", "message": "AI system not found." }}