Auth API reference

Auth API · End-User-Insights

get/v1/apps/{app_id}/end-user-insights/users/{user_id}Auth

One end-user's recorded activity: their audit trail, their sessions with device/IP, and their enrolled factors. `noActivityRecorded` distinguishes "nothing happened" from "no data".

Path parameters

app_id*string · uuid

Id of the app.

user_id*string · uuid

Id of the user.

Response · 200 Per-user activity, sessions and factors.

user_id*string · uuid

The end user (account) the end user detail insights is about.

no_activity_recorded*boolean

True when the user has no audit row at all ("nothing recorded"), as opposed to an empty page.

first_seen_at*string · date-time

First recorded activity of the user (ISO 8601), or `null`.

last_seen_at*string · date-time

Most recent recorded activity of the user (ISO 8601), or `null`.

activity*array

Most recent audit entries, newest first (capped).

activity_truncated*boolean

True when `activity` hit its cap and older rows exist.

action_counts*array

Whole history by action, most frequent first.

sessions*array

The user's sessions, newest first.

factors*array

The user's MFA factors.

Example

Request

GET https://api.auth.productcraft.co/v1/apps/{app_id}/end-user-insights/users/{user_id}
Authorization: Bearer YOUR_TOKEN

Response

{
  "user_id": "00000000-0000-0000-0000-000000000000",
  "no_activity_recorded": false,
  "first_seen_at": "2026-01-01T00:00:00.000Z",
  "last_seen_at": "2026-01-01T00:00:00.000Z",
  "activity": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "action": "auth.signin.succeeded",
      "resource": "session",
      "resource_id": "string",
      "ip": "203.0.113.7",
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "activity_truncated": false,
  "action_counts": [
    {
      "action": "auth.signin.succeeded",
      "count": 42
    }
  ],
  "sessions": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "ip": "203.0.113.7",
      "user_agent": "string",
      "auth_methods": [
        "password",
        "totp"
      ],
      "mfa_at": "2026-01-01T00:00:00.000Z",
      "created_at": "2026-01-01T00:00:00.000Z",
      "last_used_at": "2026-01-01T00:00:00.000Z",
      "expires_at": "2026-01-01T00:00:00.000Z",
      "revoked_at": "2026-01-01T00:00:00.000Z",
      "step_up_failed_attempts": 0,
      "step_up_locked_until": "2026-01-01T00:00:00.000Z"
    }
  ],
  "factors": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "type": "totp",
      "label": "string",
      "created_at": "2026-01-01T00:00:00.000Z",
      "enabled_at": "2026-01-01T00:00:00.000Z",
      "disabled_at": "2026-01-01T00:00:00.000Z"
    }
  ]
}