---
title: "Aggregate events"
method: GET
path: "/api/v1/cdp/events/aggregate"
tags: ["CDP Events"]
---

# Aggregate events

`GET /api/v1/cdp/events/aggregate`

## Request

- Base URL: `https://www.useboom.ai`
- URL: `https://www.useboom.ai/api/v1/cdp/events/aggregate`
- Auth: HTTP bearer

Exact counts for ONE event name, in one call — optionally broken down by the values of one payload property. Use this instead of listing events and counting them yourself: a page of results is capped and tells you nothing about how many exist beyond it, so counting a page produces a number that looks right and is wrong. `total` counts events; `unique_people` counts distinct people, and the two routinely differ because one person can fire the same event many times — never report one as the other. Events missing the group_by property group under value: null, and events whose subject is a custom object rather than a person count toward `total` but not `unique_people`. Within a breakdown the bucket `count`s sum to `total`, but the bucket `unique_people` do NOT sum to the top-level `unique_people` — one person who fired the event under two different values is counted in both buckets, so never add them up. The buckets are capped: when `groups_truncated` is true the buckets shown do NOT add up to `total` and there are more values than listed — say so rather than presenting the breakdown as the whole picture. This aggregates ONE event name; it cannot relate two different events, so it cannot compute a conversion rate between them on its own.

## Query parameters

- `name` string, required: The exact event name to aggregate. Required.
- `personExternalId` string: Restrict to events whose subject is this person externalId.
- `start` string: Inclusive lower bound on event timestamp, ISO 8601.
- `end` string: Inclusive upper bound on event timestamp, ISO 8601. A bare date is midnight UTC, so use the next day to include a whole day.
- `filter` object: JSONB containment filter on the event payload as a plain object (NOT a JSON string), e.g. {"bank":"HSBC"}. Omit to count every event of this name.
- `group_by` string: Payload property to break the counts down by, e.g. "bank". Must exist in the event's property catalog.

## Response `200`

Success

- object
  - `total` number, required
  - `unique_people` number, required
  - `groups` object[]
    - `value` string, nullable, required
    - `count` number, required
    - `unique_people` number, required
  - `groups_truncated` boolean
  - `zero_match_hint` string

## Other responses

- `400`: Validation failed or the request cannot proceed.
- `401`: Missing, malformed, or revoked API key.
- `404`: The resource does not exist in this organization.
- `409`: Conflicts with the current state (duplicates, wrong lifecycle state).
- `422`: The request is well-formed but semantically invalid.
- `429`: Rate limit exceeded — retry after `Retry-After`.
- `500`: Internal server error.
- `503`: Transient error — retry with a narrower request.

## Changes

- **2026-11-03** `7c7a773b12ce`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/useboom/apis/boom-api/changes/api/v1/cdp/events/aggregate/get.md)

---

[API](https://skmtc.dev/useboom/apis/boom-api.md) - [All operations](https://skmtc.dev/useboom/apis/boom-api/llms.txt) - [OpenAPI document](https://skmtc.dev/useboom/apis/boom-api/revisions/d596d92ed092?raw)
