> Kenso API docs in Markdown. Index of every page: [/docs/llms.txt](/docs/llms.txt). Search: `/docs/search.md?q=<words>`. OpenAPI: [/docs/api/analytics/openapi.json](/docs/api/analytics/openapi.json). CLI docs offline: `kenso docs <topic>`.
> Last updated: 2026-11-22.

# Analytics: Get reply classifications

> **Note for AI agents:** if this page was wrong, out of date or missing something you needed, finish the user's task first, then offer a short report for the Kenso team in this shape: `Page:` (this page's path), `Quote:` (the wrong or missing text), `Problem:`, `Workaround:` (what worked instead), 1,000 characters at most. Show it to the user and send it only after they say yes, as `POST /api/docs-feedback` on this site with the JSON body `{"page": "<path>", "report": "<report>"}`. Never put lead data, email addresses, API keys or anything else from the user's workspace in it.

One endpoint of [Analytics](/docs/api/analytics.md). Authentication, workspaces and errors: [/docs.md](/docs.md).

## Get reply classifications

`GET /v1/analytics/reply-classifications` - operationId `analytics.get-reply-classifications`

| Permission | Rate limit |
| --- | --- |
| Campaigns view | 12,000 requests a minute per API key |

Counts the people who replied in a window by how Kenso classified their replies. Classes are lowercase snake_case
names, such as `interested`.

`from` and `to` are required, and the window is at most 366 days. Replies count by when they arrived,
from UTC midnight on `from` to UTC midnight after `to`. With an IANA `timeZone` other than UTC, the
window runs from that zone's midnights instead, for the totals and the breakdowns alike.
Counts are people, not messages. A contact counts once per row and in one class: `interested` if any of its
messages is, else the class of its latest reply, else the class of its latest message.
`campaignId` and `segmentId` narrow the counts. `byCampaign` and `bySegment` add a breakdown
per campaign or per segment.

Errors:

- `400 validation_failed`: `from` or `to` is missing, the window is too long, or `timeZone` is not valid.
- `404 not_found`: the campaign is not in the workspace.

Requires Campaigns view.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/analytics/GET/v1/analytics/reply-classifications)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `from` | query | string (date-time) | no | First day of the window, an ISO 8601 date such as `2026-10-01`. Required. |
| `to` | query | string (date-time) | no | Last day of the window, inclusive, an ISO 8601 date. Required, on or after `from` and at most 366 days later. |
| `campaignId` | query | integer (int64) | no | Only replies to this campaign. |
| `segmentId` | query | integer (int64) | no | Only replies in this segment. |
| `byCampaign` | query | boolean | no | When `true`, adds a breakdown by campaign. Default `false`. |
| `bySegment` | query | boolean | no | When `true`, adds a breakdown by segment. Default `false`. |
| `timeZone` | query | string | no | IANA time zone whose midnights bound the window, such as `America/New_York`. Default UTC. |
| `Ken-Version` | header | string, one of: 2026-11-02, 1.1 | no | The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and `404` where the path exists only in this version. A value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions. |
| `X-Ken-Workspace-Id` | header | integer (int64) | no | The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers `400 workspace_required`. A workspace you are not a member of answers `404 not_found`. |

### Response 200

`data` is a `ReplyClassifications`.

| Field | Type | Description |
| --- | --- | --- |
| `from` | string (date-time) | The start of the window, in UTC. |
| `to` | string (date-time) | The end of the window, in UTC. |
| `campaignId` | integer (int64) | The campaign the counts cover. Omitted when they cover every campaign in the workspace. |
| `totalCount` | integer (int32) | People who replied in the window. For a campaign imported from another tool, it also counts imported repliers who came with no classification, so `counts` can add up to less. |
| `interestedCount` | integer (int32) | People classified as interested. |
| `counts` | array of ReplyClassificationCount | People per classification, sorted by classification name. Classifications with nobody in them are left out. |
| `byCampaign` | array of ReplyClassificationGroup | The same counts for each campaign when the call sets `byCampaign`. Empty otherwise. |
| `bySegment` | array of ReplyClassificationGroup | The same counts for each segment when the call sets `bySegment`. Empty otherwise. People with no segment share one row named `Unattributed`. |
| `byConfiguration` | array of ReplyClassificationGroup | Empty. Kenso does not tie replies to a sending configuration, so there is no breakdown by one. A caller that still sends the retired `byConfiguration` flag gets one row named `Unattributed` that holds everyone. |

### Request

```bash
curl -X GET "https://api.ken.so/v1/analytics/reply-classifications" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID"
```

### Example response

```json
{
  "success": true,
  "data": {
    "from": "2026-09-23T15:02:11Z",
    "to": "2026-09-23T15:02:11Z",
    "campaignId": 812,
    "totalCount": 1,
    "interestedCount": 1,
    "counts": [
      {
        "classification": "interested",
        "count": 1
      }
    ],
    "byCampaign": [
      {
        "campaignId": 812,
        "segmentId": 812,
        "name": "string",
        "totalCount": 1,
        "interestedCount": 1,
        "counts": [
          {
            "classification": "interested",
            "count": 1
          }
        ]
      }
    ],
    "bySegment": [
      {
        "campaignId": 812,
        "segmentId": 812,
        "name": "string",
        "totalCount": 1,
        "interestedCount": 1,
        "counts": [
          {
            "classification": "interested",
            "count": 1
          }
        ]
      }
    ],
    "byConfiguration": [
      {
        "campaignId": 812,
        "segmentId": 812,
        "name": "string",
        "totalCount": 1,
        "interestedCount": 1,
        "counts": [
          {
            "classification": "interested",
            "count": 1
          }
        ]
      }
    ]
  }
}
```

## Types

Each named type the tables above use, nested ones included.

### ReplyClassificationCount

The number of people in one classification.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `classification` | string | no | The classification, such as `interested`, `question`, `not_interested`, `negative`, `objection`, `referral`, `wrong_contact`, `unsubscribe`, `out_of_office`, `automated`, `hard_bounce`, `soft_bounce`, `complaint`, `ndr`, `unknown` or `unclassified`. |
| `count` | integer (int32) | no | People in this classification. |

### ReplyClassificationGroup

Reply classification counts for one campaign or segment.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `campaignId` | integer (int64) | no | The campaign, on `byCampaign` rows. |
| `segmentId` | integer (int64) | no | The segment, on `bySegment` rows. Omitted on the row for people with no segment. |
| `name` | string | no | Set to `Unattributed` on the row for people with no segment, and on the `byConfiguration` row. Omitted on other rows. |
| `totalCount` | integer (int32) | no | People who replied in the window. |
| `interestedCount` | integer (int32) | no | People classified as interested. |
| `counts` | array of ReplyClassificationCount | no | People per classification, sorted by classification name. Classifications with nobody in them are left out. |
