Auth
Login with password or impersonation token
Authenticate a user with email + password or with an impersonation token issued by /api/auth/impersonate/{userId}. On success returns an access token, a refresh token, the user payload, and the resolved session config.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Provide either password or impersonationToken with email.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/auth/login" \ -H "Content-Type: application/json" \ -d '{ "email": "ops@acme.example", "password": "CorrectHorseBatteryStaple!" }'{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI1Zjdi...", "refreshToken": "rt_64d2f9c5e8a1d4e001a0b1c2e6f7a8b9", "sessionConfig": { "enabled": true, "idleTimeoutMinutes": 30, "tokenExpiryHours": 8, "warningTimeMinutes": 2 }, "user": { "id": "5f7b1c2e8a1d4e0012c3b4a5", "email": "admin@acme.example", "fullName": "Acme Admin", "organizationId": "64a1b2c3d4e5f60012345678", "accessRole": "ADMIN" }}