Messaging cost analytics with time-series and channel breakdown
Aggregates the tenant’s messaging spend over the selected date range into headline totals (total messages, total spend, average cost per message, billed segments) plus a per-bucket time-series and a per-channel breakdown — each carrying its currency so multi-currency tenants render per-currency series correctly. Powers the Reports page cost summary and the Costs dashboard. Read-only; degrades to a zeroed cost summary (still 200) during a transient database blip so the continuously-polled page never flashes a 5xx.
Authorizations
Dashboard JWT token from Clerk
Query Parameters
Inclusive start of the reporting window (ISO-8601 date or datetime). Defaults to the last 30 days when omitted; the range may not exceed the platform lookback cap.
Inclusive end of the reporting window (ISO-8601 date or datetime). A single-day range (start_date === end_date) is accepted.
Alternative rolling lookback in whole days (bounded by the lookback cap). Mutually exclusive with an explicit start/end range.
x >= 1Optional single-channel filter (e.g. sms, whatsapp, email).
Time-series bucket granularity.
hour, day, week, month