Log in a user
Logs in the specified credentials if they exist on the requested target (IdentityX itself, or the project identified by `project_id`). Returns an access/refresh token pair. The access token is an Ed25519-signed JWT; verify it against `/.well-known/jwks.json`.
/auth/loginLogs in the specified credentials if they exist on the requested
target (IdentityX itself, or the project identified by
project_id). Returns an access/refresh token pair. The access
token is an Ed25519-signed JWT; verify it against
/.well-known/jwks.json.
Query Parameters
Project to scope the operation to. Omit for IdentityX itself.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request body for /auth/setup, /auth/register, and
/auth/login. Mirrors models.IDXRegisterRequest /
models.IDXLoginRequest.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/auth/login" \ -H "Content-Type: application/json" \ -d '{ "email": "user@example.com", "password": "S3curePassw0rd!" }'{
"code": 200,
"message": "",
"data": {
"access_token": "eyJhbGciOiJFZERTQSIsImtpZCI6Ii4uLiJ9...",
"refresh_token": "eyJhbGciOiJFZERTQSIsImtpZCI6Ii4uLiJ9...",
"access_expires_at": "2026-01-01T13:00:00Z",
"refresh_expires_at": "2026-01-08T12:00:00Z",
"domain": "example.com"
},
"timestamp": "2026-01-01T12:00:00Z",
"module": "IdentityX"
}{
"code": 0,
"message": "string",
"error": {
"code": "BAD_REQUEST",
"message": "string",
"fields": [
{
"field": "string",
"message": "string"
}
],
"meta": {},
"debug": {
"raw_error": "string",
"stack_trace": "string"
}
},
"timestamp": "2019-08-24T14:15:22Z",
"module": "IdentityX"
}{
"code": 0,
"message": "string",
"error": {
"code": "BAD_REQUEST",
"message": "string",
"fields": [
{
"field": "string",
"message": "string"
}
],
"meta": {},
"debug": {
"raw_error": "string",
"stack_trace": "string"
}
},
"timestamp": "2019-08-24T14:15:22Z",
"module": "IdentityX"
}{
"code": 0,
"message": "string",
"error": {
"code": "BAD_REQUEST",
"message": "string",
"fields": [
{
"field": "string",
"message": "string"
}
],
"meta": {},
"debug": {
"raw_error": "string",
"stack_trace": "string"
}
},
"timestamp": "2019-08-24T14:15:22Z",
"module": "IdentityX"
}{
"code": 0,
"message": "string",
"error": {
"code": "BAD_REQUEST",
"message": "string",
"fields": [
{
"field": "string",
"message": "string"
}
],
"meta": {},
"debug": {
"raw_error": "string",
"stack_trace": "string"
}
},
"timestamp": "2019-08-24T14:15:22Z",
"module": "IdentityX"
}Set a new password with a reset link POST
Redeems the single-use JWT carried by a password-reset email and replaces the actor's password. The token is HMAC-signed, purpose-scoped, expires after a short TTL, and is consumed on first use — a consumed token is dead and a new link must be requested.
Log out a user POST
Logs out the current session, blacklisting the presented access and refresh tokens. Requires a valid bearer token; the tokens to blacklist are read from the request headers.