User Profiles - Counts
Endpoint
/o?method=user_counts
Ⓔ Enterprise Only
This API is available exclusively in Countly Enterprise.
Overview
Returns total user count and unidentified user count.
Authentication
Authentication methods:
- API Key (parameter):
api_key=YOUR_API_KEY - Auth Token (parameter):
auth_token=YOUR_AUTH_TOKEN - Auth Token (header):
countly-token: YOUR_AUTH_TOKEN
Permissions
- User Profiles:
Readpermission.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | String | Yes (or auth_token) | API key authentication |
auth_token | String | Yes (or api_key) | Auth token authentication |
app_id | String | Yes | App ID |
method | String | Yes | Must be user_counts |
Response
Success Response
{
"unidentified": 3,
"total": 245
}
Response Fields
| Field | Type | Description |
|---|---|---|
unidentified | Number | Users without profile info (hasInfo != true) |
total | Number | Total estimated users in app users collection |
Error Responses
- HTTP 401 - Invalid auth:
{
"result": "User does not exist"
}
Behavior/Processing
- Requires
Readpermission on the User Profiles feature. - Reads from
app_users{app_id}. totalis returned from MongoDBestimatedDocumentCount(), so it is intended as a fast estimate of total user documents.unidentifiedis returned fromcount({"hasInfo": {"$ne": true}}), so it counts users wherehasInfois missing or not exactlytrue.- The endpoint does not apply query, segment, cohort, or date filters.
- The handler returns only
{unidentified, total}.
Database Collections
| Collection | Used for | Data touched by this endpoint |
|---|---|---|
countly.app_users{appId} | Per-app user profiles | Stores user-level properties and profile fields affected by this endpoint. |
Examples
/o?api_key=YOUR_API_KEY&app_id=YOUR_APP_ID&method=user_counts
Related Endpoints
Ⓔ Enterprise
This feature is part of Countly Enterprise.
Get Access:
Already a Customer? Use support portal if you have any questions.
Last Updated
2026-04-18