Analytics
Orbit’s Analytics endpoints expose the same delivery, engagement, and cost datasets that power the dashboard’s Insights page. Use them to embed Orbit metrics in your internal BI tooling, schedule exports to a data warehouse, or programmatically alert on delivery / spend regressions. All analytics endpoints live under/api/v1/analytics, require an API key with the analytics:read scope, and are aggregated against a read replica so heavy reporting queries never contend with the live send path. Each endpoint is rate-limited at 60 requests / minute per tenant. For the model behind the surface — what the aggregates expose, why the read-replica separation holds, how the background roll-up producers pre-aggregate the series, and how the dashboard Insights pages consume the same datasets — see the analytics pipeline concept.
Every response uses the standard Orbit envelope: the payload is under data, and meta carries the request_id + timestamp.
Query delivery metrics
Aggregate sent / delivered / failed / read counts with a time-series breakdown. Filter bychannel, status, or campaign_id, and bucket the series with group_by (hour, day, week, month — defaults to day).
SDK and typed reads
Your API key and the 60 req/min budget travel with whichever surface you call — the output is identical. The examples below run against a sandbox key (dv_test_sk_...); sandbox keys return simulated aggregate rows, so you can wire a BI pipeline before you have live traffic.
Node.js
Python
Go
Ruby
PHP
Java
C#
Every analytics call — from curl, the SDKs, or the dashboard — draws on the same per-tenant budget: 60 requests / minute, and each API key needs the
analytics:read scope. Queries run against a read replica, so reporting traffic never contends with your live send path. On a 429, honour Retry-After and back off.Feed the series into your charts
Thetime_series rows carry one bucket per row, so either of these minimal transforms gets you from the API response to a chart-ready frame:
Python (pandas)
Node.js (chart-ready map)
Response
Query parameters
These filters are shared across the metric and cost endpoints (each endpoint accepts the subset documented below).Endpoints
Cost analytics
Response
Field reference
These cost fields count billed messages only — sends that actually incurred a charge. Free-tier, promotional, and zero-priced sends carry no charge and are excluded, so the counts here are lower than the send totals from/analytics/messages.
Every row is grouped by
currency, so a tenant that changed billing currency mid-range gets one row per currency rather than a mixed sum. To reconcile a total against avg_cost_per_message, divide total_spend by total_messages (billed) for the matching currency — not by your overall send count.
Funnel drop-off reasons
Drill into why messages dropped at a funnel step.{step} is one of sent, delivered, read, or queued; the response returns the top carrier rejection codes (default 5, max 20 via limit) enriched with human-readable names and categories from Orbit’s carrier-error dictionary.
Response
Customer journey paths
Reconstruct the ordered touchpoint sequence customers actually walked across channels (chat → voice → email, for example), with per-stage reach and drop-off plus the most-walked full paths. This is the aggregate path view — distinct from the message-delivery funnel above (a single per-message send→deliver funnel) and from the campaign journey builder (the journey a marketer designs).Query parameters (journey paths)
Response
Common errors
Scheduled exports
For ongoing exports, prefer scheduled reports over polling the metric endpoints.POST /api/v1/analytics/scheduled-reports registers a recurring report that Orbit renders and emails to your configured recipients on a daily / weekly cadence; GET /api/v1/analytics/scheduled-reports lists the active schedules. Creating or editing a schedule requires an owner or admin role because the report payload includes per-tenant PII (top contacts, spend, etc.).