TrieOH
IdentityXAPIAuthn

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`.

POST/auth/login

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.

Query Parameters

project_id?string

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"
}