/v1/apps/{app_id}/end-user-insights/users/{user_id}AuthOne 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 · uuidId of the app.
user_id*string · uuidId of the user.
Response · 200 Per-user activity, sessions and factors.
user_id*string · uuidThe end user (account) the end user detail insights is about.
no_activity_recorded*booleanTrue when the user has no audit row at all ("nothing recorded"), as opposed to an empty page.
first_seen_at*string · date-timeFirst recorded activity of the user (ISO 8601), or `null`.
last_seen_at*string · date-timeMost recent recorded activity of the user (ISO 8601), or `null`.
activity*arrayMost recent audit entries, newest first (capped).
activity_truncated*booleanTrue when `activity` hit its cap and older rows exist.
action_counts*arrayWhole history by action, most frequent first.
sessions*arrayThe user's sessions, newest first.
factors*arrayThe 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_TOKENimport { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const endUserDetailInsights = await auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").endUserInsights.users.retrieve("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");auth.admin.app(…).endUserInsights.users.retrieve(userId, options?): Auth.EndUserDetailInsights
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"
}
]
}