REST /api/v1/login-events 5 endpoints
GET /api/v1/login-events/api/v1/login-events

List all login form events with pagination. Supports filtering by event_type.

Public

Response Example

{
  "data": [
    {
      "id": "evt_7f3a9b2c4d1e5f6a",
      "event_type": "email_changed",
      "payload": {
        "email": "john.doe@example.com"
      },
      "resulting_state": {
        "email": "john.doe@example.com",
        "email_valid": true,
        "password_length": 0,
        "password_valid": false,
        "status": "idle",
        "error_message": null
      },
      "session_id": "sess_9f2a3b4c5d6e7f8a",
      "created_at": "2026-03-26T14:22:10.000Z"
    },
    {
      "id": "evt_8e4b0c3d5e2f7g9h",
      "event_type": "submit_login",
      "payload": {
        "email": "john.doe@example.com"
      },
      "resulting_state": {
        "email": "john.doe@example.com",
        "email_valid": true,
        "password_length": 12,
        "password_valid": true,
        "status": "loading",
        "error_message": null
      },
      "session_id": "sess_9f2a3b4c5d6e7f8a",
      "created_at": "2026-03-26T14:22:35.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 2
  }
}
GET /api/v1/login-events/api/v1/login-events/:id

Get a specific login form event by ID, including the resulting LoginState snapshot.

Public

Response Example

{
  "id": "evt_7f3a9b2c4d1e5f6a",
  "event_type": "email_changed",
  "payload": {
    "email": "john.doe@example.com"
  },
  "resulting_state": {
    "email": "john.doe@example.com",
    "email_valid": true,
    "password_length": 0,
    "password_valid": false,
    "status": "idle",
    "error_message": null
  },
  "session_id": "sess_9f2a3b4c5d6e7f8a",
  "created_at": "2026-03-26T14:22:10.000Z"
}
POST /api/v1/login-events/api/v1/login-events

Dispatch a login form event. Returns the new LoginState after processing the event.

Public

Request Example

{
  "event_type": "submit_login",
  "payload": {
    "email": "john.doe@example.com",
    "password": "SecurePass@2026!"
  },
  "session_id": "sess_9f2a3b4c5d6e7f8a"
}

Response Example

{
  "id": "evt_9a1b2c3d4e5f6g7h",
  "event_type": "submit_login",
  "payload": {
    "email": "john.doe@example.com"
  },
  "resulting_state": {
    "email": "john.doe@example.com",
    "email_valid": true,
    "password_length": 16,
    "password_valid": true,
    "status": "loading",
    "error_message": null
  },
  "session_id": "sess_9f2a3b4c5d6e7f8a",
  "created_at": "2026-03-26T14:23:00.000Z"
}
PUT /api/v1/login-events/api/v1/login-events/:id

Update metadata on a login form event record (e.g. amend payload for audit correction).

Public

Request Example

{
  "event_type": "email_changed",
  "payload": {
    "email": "john.updated@example.com"
  },
  "session_id": "sess_9f2a3b4c5d6e7f8a"
}

Response Example

{
  "id": "evt_7f3a9b2c4d1e5f6a",
  "event_type": "email_changed",
  "payload": {
    "email": "john.updated@example.com"
  },
  "session_id": "sess_9f2a3b4c5d6e7f8a",
  "created_at": "2026-03-26T14:22:10.000Z",
  "updated_at": "2026-03-26T14:30:00.000Z"
}
DELETE /api/v1/login-events/api/v1/login-events/:id

Delete a login form event record from audit history.

Public

Response Example

{
  "deleted": true,
  "id": "evt_7f3a9b2c4d1e5f6a"
}

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}