---
title: "Get Message Counts by User"
method: GET
path: "/v5/conversations/{id}/messages/user-counts"
tags: ["Conversations (v5)"]
---

# Get Message Counts by User

`GET /v5/conversations/{id}/messages/user-counts`

## Request

- Base URL: `https://api.carbonvoice.app`
- URL: `https://api.carbonvoice.app/v5/conversations/{id}/messages/user-counts`
- Auth: one of:
  - API key in header `pxtoken`
  - OAuth 2 (implicit, authorization URL `https://api.carbonvoice.app/oauth/authorize`)

Get aggregated message counts grouped by user for the specified conversation. Returns user IDs with their message counts only (no user profile information). Optional filters for user IDs, date, and direction.

## Path parameters

- `id` string, required

## Query parameters

- `user_ids` string[]
- `date` string, date-time
- `direction` 'older' | 'newer'
- `status` MessageStatus[]

## Response `200`

- GetMessageUserCountsResponse
  - `total_messages` number, required: Total number of messages matching the filters
  - `filters` MessageUserCountsFilters, required
    - `date` string, date-time, nullable: Date filter applied (if any)
    - `user_ids` string[], nullable: User IDs filter applied (if any)
    - `status` MessageStatus[], nullable: Message statuses filter applied (if any)
  - `results` MessageUserCountResult[], required: List of users with their message counts
    - `user_id` string, required: User ID
    - `total_messages` number, required: Total number of messages created by this user

## Other responses

- `400`
- `403`
- `404`

---

[API](https://skmtc.dev/carbonvoice/apis/carbon-voice-api.md) · [All operations](https://skmtc.dev/carbonvoice/apis/carbon-voice-api/llms.txt) · [OpenAPI document](https://skmtc.dev/carbonvoice/apis/carbon-voice-api/revisions/b91c5c845122?raw)
