curl --request GET \
--url https://api.example.com/api/admin/analytics \
--header 'Authorization: <authorization>'{
"message": "<string>",
"data": {
"totalUsers": 123,
"activeUsers": 123,
"inactiveUsers": 123,
"paidUsers": 123,
"monthlyGrowth": 123,
"topPlan": "<string>"
}
}Retrieve platform-wide usage statistics and subscription distribution. Admin role required.
curl --request GET \
--url https://api.example.com/api/admin/analytics \
--header 'Authorization: <authorization>'{
"message": "<string>",
"data": {
"totalUsers": 123,
"activeUsers": 123,
"inactiveUsers": 123,
"paidUsers": 123,
"monthlyGrowth": 123,
"topPlan": "<string>"
}
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/devxtra-community/hayon/llms.txt
Use this file to discover all available pages before exploring further.
admin role. Non-admin requests return 403 Forbidden.authenticate — validates the Bearer JWT and attaches the user to the request.isAdmin — checks that req.auth.role === "admin". Requests from regular user accounts are rejected.Bearer <token>.Hide analytics fields
isDisabled is false.isDisabled is true.pro plan."Professional" or "Free".curl --request GET \
--url https://api.hayon.app/api/admin/analytics \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
{
"message": "Analytics retrieved successfully",
"data": {
"totalUsers": 1482,
"activeUsers": 1391,
"inactiveUsers": 91,
"paidUsers": 347,
"monthlyGrowth": 25.5,
"topPlan": "Free"
}
}
{
"message": "Unauthorized"
}
{
"message": "Forbidden - Admin only"
}
{
"message": "Failed to retrieve analytics"
}
monthlyGrowth
getUsersAnalytics() in the user repository.topPlan
topPlan reflects the plan that the majority of accounts are currently assigned to. The raw database value (free or pro) is mapped to a display label (Free or Professional) before being returned.activeUsers vs inactiveUsers
isDisabled flag set via the update user activity endpoint. A user who has never logged in is still counted as active unless explicitly disabled.