Skip to main content

What it does

Returns an organization’s WhatsApp message analytics: summary cards at the top and a time series below. The source is ClickHouse with no caching, so every request returns the most up-to-date data. It can be scoped org-wide (all apps) or to selected app(s), and is bucketed by a date range and a granularity (hourly/daily/weekly/monthly).

Endpoint

There are no path or body parameters.

Headers

Authorization
string
required
Secret key in Bearer sk_... format. See Secret Key authentication.

Query parameters

All query parameters are optional.
appId
string
default:"all apps"
Repeatable. If none is given, all of the organization’s apps are included; if one or more are given, only those apps are included. An ID that does not belong to the organization → 404. For multiple apps, repeat the parameter: ?appId=app_AAA&appId=app_BBB.
startDate
string
default:"today 00:00:00 (UTC)"
ISO-8601 datetime. Start of the range.
endDate
string
default:"today 23:59:59 (UTC)"
ISO-8601 datetime. End of the range. Must be greater than startDate.
granularity
string
default:"daily"
Determines how the series is bucketed. See Granularity for the full list of values.

Response

The envelope is { "data": {...}, "isSuccess": true }, where data contains:
  • summary (object) — totals for the selected range (the stat cards).
  • series (array) — time points bucketed by granularity.
isSuccess
boolean
true when the request completed successfully.
data
object
Invariants: Σ series[].sentMessages == summary.sentMessages (the same holds for templateMessages and receivedMessages), and templateMessages ≤ sentMessages.

Examples


Errors

errors
object
Error details with code, group, and description; isSuccess is false.
Example error responses: