Message Stats
Aggregated messaging statistics for an organization — overall totals, per-user breakdowns, yearly trends, and daily conversation counts.
All endpoints require authentication via the X-API-Key header. See Authentication.
All stats are broken down by platform: email, stacked-sms, stacked-mms, personal-sms, web-chat, and a total aggregate. Each platform reports in (inbound) and out (outbound) counts.
Get org message stats
GET /stats/messages
Overall message stats for the organization within a date range.
Query parameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
startDate | string | 30 days ago | Unix timestamp in milliseconds. |
endDate | string | now | Unix timestamp in milliseconds. |
Example request
Response
Errors
| Status | Message | Cause |
|---|---|---|
| 400 | Validation error | startDate >= endDate, or invalid date format. |
Get org stats by year
GET /stats/messages/by-year
Monthly message stats for a calendar year.
Query parameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
year | string | — | Four-digit year (e.g. 2026). Must be between 2020 and 9999. |
Example request
Response
Returns an array of 12 objects, one per month (1–12).
Errors
| Status | Message | Cause |
|---|---|---|
| 400 | Validation error | Invalid year (not 2020–9999). |
Get all users' message stats
GET /stats/messages/users
Per-user message stats for all users in the organization.
Query parameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
startDate | string | 30 days ago | Unix timestamp in milliseconds. |
endDate | string | now | Unix timestamp in milliseconds. |
Example request
Response
Get my message stats
GET /stats/messages/my-stats
Message stats for the currently authenticated user.
Query parameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
startDate | string | 30 days ago | Unix timestamp in milliseconds. |
endDate | string | now | Unix timestamp in milliseconds. |
Example request
Response
Same shape as Get org message stats — platform-level in/out counts for the authenticated user only.
Get daily conversation counts
GET /stats/messages/daily-conversations
Unique daily conversation counts per user. Counts unique (date, user, contact) combinations across direct messages and bulk message recipients.
Query parameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
startDate | string | 30 days ago | Unix timestamp in milliseconds. |
endDate | string | now | Unix timestamp in milliseconds. |
Example request
Response
Response envelope
All endpoints use the standard envelope:
Error responses:
data is null for a general failure, such as a database error or an upstream timeout. When the request is rejected because of a specific field, data carries the field(s) at fault instead:
Each issue carries a path (the dotted path into the request body) and a message. A label is added when the path is not self-describing, which today means custom fields only, for example "path": "fields.68b0a1f39c2e4d0012ab77e5", "label": "Class Year". issues is an array, but treat it as holding at most one entry: validation stops at the first failure.