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
Headers
Secret key in
Bearer sk_... format. See Secret Key authentication.Query parameters
All query parameters are optional.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.ISO-8601 datetime. Start of the range.
ISO-8601 datetime. End of the range. Must be greater than
startDate.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 bygranularity.
true when the request completed successfully.Invariants:
Σ series[].sentMessages == summary.sentMessages (the same holds for templateMessages and receivedMessages), and templateMessages ≤ sentMessages.Examples
Demo 1 — all apps (defaults: today, daily)
Demo 1 — all apps (defaults: today, daily)
Demo 2 — single app + date range + daily
Demo 2 — single app + date range + daily
Demo 3 — multiple apps (repeatable appId)
Demo 3 — multiple apps (repeatable appId)
Demo 4 — hourly (single day, single app)
Demo 4 — hourly (single day, single app)
Demo 5 — no data (empty range)
Demo 5 — no data (empty range)
Errors
Error details with
code, group, and description; isSuccess is false.
Example error responses: