---
title: "Aggregate Conversations"
method: POST
path: "/core/dashboard/aggregate"
tags: ["Dashboard"]
---

# Aggregate Conversations

`POST /core/dashboard/aggregate`

## Request

- Base URL: `https://api.anyreach.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.anyreach.ai/core/dashboard/aggregate`
- Auth: HTTP bearer

Group conversations by any combination of the supported dimensions.

POST rather than GET because the filter set is a nested object with a status
list; encoding that in a query string buys nothing and costs a parser.

## Headers

- `x-anyreach-org` string, nullable: Organization ID for user PATs (pat_ prefix tokens)

## Request body

- ConversationAggregateRequest
  - `filters` ConversationAggregateFilters
    - `agent_id` string, nullable
    - `created_after` string, date-time, nullable
    - `created_before` string, date-time, nullable
    - `channel` string, nullable
    - `direction` string, nullable
    - `status` string[], nullable
    - `is_demo` boolean, nullable
    - `timezone` string, nullable
    - `include_token_created` boolean
    - `exclude` ConversationExclusions: Rules that remove conversations from every dashboard number; they are applied in conversation_aggregate (migration 1785200000000).
      - `duration` ExclusionRule[]
        - `op` 'lte' | 'gte', required
        - `value` integer, required
      - `turns` ExclusionRule[]
        - `op` 'lte' | 'gte', required
        - `value` integer, required
      - `callers` string[]
      - `keep_transferred` boolean
  - `group_by` string[]: Dimensions to group by. Besides the built-in ones, at most one label:<key> groups by a single-valued label key.

## Response `200`

Successful Response

- ConversationAggregateBucket[]
  - `dims` object, required
  - `conversations` integer, required
  - `avg_duration` number, nullable
  - `avg_turns` number, nullable
  - `total_duration` integer, required
  - `duration_samples` integer, required
  - `turns_samples` integer, required

## Other responses

- `422`: Validation Error

---

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