Auth API reference

Auth API · End-User-Insights

get/v1/apps/{app_id}/end-user-insightsAuth

Auth health for this app over the last 30 days: verification completion, sign-in failure rate, MFA adoption, password-reset follow-through, and session counts. Rates are null when there is nothing to divide by.

Path parameters

app_id*string · uuid

Id of the app.

Response · 200 Aggregated auth health.

window_days*number

Window, in days, every in-window figure covers.

Example: 30

users*object
total*number

End users in the app.

Example: 257

new_in_window*number

End users created in the window.

Example: 31

active_in_window*number

End users who were the actor of at least one audit event in the window.

Example: 88

verification*object
requested*number

Verification requests in the window.

Example: 40

completed*number

Verifications completed in the window.

Example: 33

completion_rate*number

`completed / requested`, 0–1. Null when nothing was requested.

Example: 0.825

signin*object
success*number

Successful sign-ins in the window.

Example: 410

failed*number

Failed sign-ins in the window.

Example: 12

failure_rate*number

`failed / (success + failed)`, 0–1. Null when there were no attempts.

Example: 0.028

mfa*object
users_with_factor*number

End users with at least one enabled factor.

Example: 19

adoption_rate*number

`users_with_factor / users.total`, 0–1. Null when the app has no users.

Example: 0.074

by_type*object

End users with an enabled factor, by factor type (a user with two types counts in both).

Example: {"totp":12,"webauthn":9}

password_reset*object
requested*number

Password resets requested in the window.

Example: 7

completed*number

Password resets completed in the window.

Example: 5

sessions*object
active*number

Sessions that are neither revoked nor expired.

Example: 120

with_mfa*number

Sessions with a completed MFA step (`mfa_at` set), whether or not still active.

Example: 14

Example

Request

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

Response

{
  "window_days": 30,
  "users": {
    "total": 257,
    "new_in_window": 31,
    "active_in_window": 88
  },
  "verification": {
    "requested": 40,
    "completed": 33,
    "completion_rate": 0.825
  },
  "signin": {
    "success": 410,
    "failed": 12,
    "failure_rate": 0.028
  },
  "mfa": {
    "users_with_factor": 19,
    "adoption_rate": 0.074,
    "by_type": {
      "totp": 12,
      "webauthn": 9
    }
  },
  "password_reset": {
    "requested": 7,
    "completed": 5
  },
  "sessions": {
    "active": 120,
    "with_mfa": 14
  }
}