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.
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).
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
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.).