Skip to main content

User Summary

GET /clients/{client_id}/users/summary

Returns a point-in-time breakdown of active vs stale users for a client organization. Use this endpoint to power the user health indicator on the dashboard -- a quick count of how many users are currently active and how many have gone quiet.

A user is considered stale if their last activity is older than stale_threshold (default: 48 hours) or if they have never reported activity.

For historical activity trends, see User Activity.

Path Parameters

ParameterTypeDescription
client_idstring (uuid)Unique identifier for the client organization

Query Parameters

ParameterTypeRequiredDefaultDescription
stale_thresholdintegerNo172800Threshold in seconds to consider a user stale. Default is 172800 (48 hours).

Response

Returns a UserSummary object.

Example Request

curl -X GET "https://api.example.com/v2/clients/aa7cf840-9ca9-46a3-9778-9015d6580d50/users/summary" \
-H "Authorization: Bearer YOUR_API_TOKEN"

With custom threshold (24 hours)

curl -X GET "https://api.example.com/v2/clients/aa7cf840-9ca9-46a3-9778-9015d6580d50/users/summary?stale_threshold=86400" \
-H "Authorization: Bearer YOUR_API_TOKEN"

Example Response

{
"active_users": 87,
"stale_users": 23,
"stale_threshold": 172800
}

UserSummary

FieldTypeDescription
active_usersnumberNumber of users whose last activity is within the stale threshold
stale_usersnumberNumber of users whose last activity is older than the threshold, or who have never reported activity
stale_thresholdnumberThe threshold in seconds that was used for the calculation

active_users + stale_users equals the total user count for the client.

Error Responses

StatusDescription
400Invalid stale_threshold value (must be a positive integer)
401Authentication required
403Insufficient permissions for this client
404Client not found
500Server error