API
Users endpoints
These endpoints return the people behind the sessions. Reading needs users:read, and changing needs users:write. None of them is available through Public Analytics or a private link.
Last updated . This guide belongs to Sessions and user profiles.
GET /sites/:siteId/users
| Parameter | Meaning | Default |
|---|---|---|
page, page_size | Paging. Maximum 1,000 rows | 1, 100 |
sort_by | first_seen, last_seen, pageviews, sessions or events | last_seen |
sort_order | asc or desc | desc |
identified_only | true returns only identified users | |
search | Text to look for in profile traits. Returns identified users only | |
search_field | username, name, email or user_id | username |
It also takes the shared time parameters, filters and segment_id.
{ "data": [ { "effective_user_id": "user_42", "user_id": "9f8e7d6c", "identified_user_id": "user_42", "country": "NO", "sessions": 9, "pageviews": 58, "events": 12, "first_seen": "2026-10-02 08:41:55", "last_seen": "2026-11-18 10:14:02", "traits": { "name": "Mari" } } ], "totalCount": 1342, "page": 1, "pageSize": 100 }
effective_user_id is your own user ID when there is one, and the anonymous ID otherwise.
GET /sites/:siteId/users/:userId
Returns one profile. :userId can be your own user ID or an anonymous ID. Without time parameters you get the whole history.
The profile holds totals, location and device, the first and last source, traits, the devices linked to the user and Web Vitals at the 75th percentile.
POST /sites/:siteId/users/identify
Links an anonymous visitor to your user ID from your server.
| Field | Required | Limits |
|---|---|---|
anonymous_id | Yes | 1 to 255 characters |
user_id | Yes | 1 to 255 characters. Must differ from anonymous_id |
traits | No | Up to 2,048 bytes. Merged into the stored traits |
The link reaches the visitor's earlier events within a few minutes.
PUT /sites/:siteId/users/:userId/traits
Replaces all stored traits for the user with the traits object you send. Use identify when you want to merge.
DELETE /sites/:siteId/users/:userId
Deletes the user's events, replays, profile and device links. Use it for an erasure request. It needs an admin or an owner, or an organization key.
The response is { "success": true }, also when no data matched.
Which trait endpoints are there?
| Endpoint | Returns |
|---|---|
GET /sites/:siteId/user-traits/keys | Every trait key with the number of users that have it |
GET /sites/:siteId/user-traits/values | The values of one key. key is required. limit defaults to 1,000 |