API ReferenceAnalytics

Aggregate events by property

POST
/projects/{project_id}/analytics/aggregate

Group events by a built-in field (e.g. browser, location_country) or a custom metadata_field. start_date is required. Pass sum_metadata_field to also add up a numeric metadata key per group; each row then carries total, summed (events whose value was a JSON number) and count (all events in the group), ordered by total. Not available with field acquisition_channel or entry_url.

Authorization

AuthorizationBearer <token>

Organization API Token (prefixed sk_) sent as Authorization: Bearer sk_.... Create one in Settings and grant it scopes. Server-side only.

In: header

Path Parameters

project_id*string

The project this request addresses. It must belong to the token's organization, or be the project of a project-scoped credential.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/projects/string/analytics/aggregate" \  -H "Content-Type: application/json" \  -d '{    "start_date": "string"  }'
Empty