Get a user metric
/analytics/users/{id}Returns one named count over the token organisation's users, as a value or a series of {key, value} buckets; each slug is described under metric.
Counts the token's organisation, 404 when it has none; an entrepreneur gets 403 forbidden. Figures come from the analytics store, which trails live data. filter[created_at] bounds when a user was created, all time with none; logins and views take filter[occurred_at]. Use GET /analytics/users/{user_id}/activity for one user. An unknown metric is a 404. It only reads.
Path parameters
- One of:
What to count. Each value is described under x-enum-descriptions.
total,active-users,by-status,invites-accepted,investors,by-type,online,recently-active,invites-accepted-percent,active-vs-total,logins,views
Query parameters
Only users created in a range, written
filter[created_at][gte]=2026-10-01. Takes gt, gte, lt and lte. With none, all users count. Not taken by logins and views. For active-vs-total it sets the window of buckets; with none, the last 12 months, 12 weeks or 30 days ending now.Only events in a range, written
filter[occurred_at][gte]=2026-10-01. Takes gt, gte, lt and lte. Taken only by logins and views; with none, all time.- One of:
The bucket size of a time series: day, week (starting Monday) or month. Defaults to month. Taken only by active-vs-total; any other slug answers 422. A window of more than 366 buckets is 422
validation_failedonfilter.created_at.day,week,monthDefault:"month"
Responses
{
"data": {
"metric": "total",
"category": "users",
"filter": {},
"value": 1284
}
}Authorization failed. error.code is one of org_disabled,
ip_blocked, missing_scope, scope_disabled, user_disabled.
The request can't be processed (HTTP 422): validation_failed with one ErrorDetail per
problem, or a code documented on the operation.
Examples
curl https://your-org-domain/kong/core/api/v2/analytics/users/{id}\
-H "Authorization: Bearer $HELM_API_KEY"\
-H "Content-Type: application/json"