---
title: "Aggregate"
method: POST
path: "/crm/aggregate"
tags: ["crm"]
---

# Aggregate

`POST /crm/aggregate`

## Request

- Base URL: `https://www.dench.com/api/v1`
- URL: `https://www.dench.com/api/v1/crm/aggregate`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Aggregate CRM entries.

## Request body

- object
  - `objectName` string, required
  - `fieldName` string, required: Field to bucket by.
  - `sumField` string: Number field to total per bucket (e.g. Amount grouped by Stage). Exact at any table size.

## Response `200`

Successful response

- object[]
  - `key` string, required
  - `count` number, required
  - `sumNumber` number

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid authentication
- `404`: Operation or resource not found
- `500`: Server error

---

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