Skip to main content

Documentation Index

Fetch the complete documentation index at: https://orbit-docs.devotel.io/llms.txt

Use this file to discover all available pages before exploring further.

Analytics

Orbit’s Analytics endpoints expose the same time-series, cohort, and funnel datasets that power the dashboard’s Insights page. Use them to embed Orbit metrics in your internal BI tooling, run scheduled exports to a data warehouse, or programmatically alert on delivery / spend regressions. All analytics endpoints respect the same per-API-key allowlist + rate limits as the rest of the API. Aggregations are computed against materialised per-tenant rollups, refreshed every 60 seconds.

Query a metric

curl -G https://orbit-api.devotel.io/api/v1/analytics/metrics \
  -H "X-API-Key: dv_live_sk_..." \
  --data-urlencode "metric=messages.delivered" \
  --data-urlencode "channel=sms" \
  --data-urlencode "from=2026-05-01T00:00:00Z" \
  --data-urlencode "to=2026-05-08T00:00:00Z" \
  --data-urlencode "group_by=day"

Response

{
  "data": {
    "metric": "messages.delivered",
    "channel": "sms",
    "interval": "day",
    "series": [
      { "ts": "2026-05-01T00:00:00Z", "value": 12345 },
      { "ts": "2026-05-02T00:00:00Z", "value": 13987 },
      { "ts": "2026-05-03T00:00:00Z", "value": 13202 }
    ],
    "total": 39534
  },
  "meta": {
    "request_id": "req_xyz789",
    "timestamp": "2026-05-09T00:00:00Z"
  }
}

Available metrics

MetricDescription
messages.sent / messages.delivered / messages.failedOutbound message counters by channel + destination MCCMNC.
messages.inboundInbound MO counts by channel.
messages.cost_centsWallet debit per channel + destination.
calls.placed / calls.completed / calls.failedVoice call counters with disposition (answered, busy, no_answer, etc.).
calls.minutes / calls.cost_centsVoice utilization + spend.
agents.conversations_total / agents.handoff_rateAI agent volume + escalation share.
webhooks.delivered / webhooks.failed / webhooks.dlq_sizeWebhook delivery health.
wallet.balance_centsWallet balance time-series (per currency).

Group-by dimensions

channel, direction, destination_country, destination_mccmnc, agent_id, campaign_id, flow_id, webhook_endpoint_id. Multiple group_by= params can be passed; the response shape becomes a nested object keyed by the dimension stack.

Funnels

curl -X POST https://orbit-api.devotel.io/api/v1/analytics/funnels \
  -H "X-API-Key: dv_live_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "from": "2026-05-01T00:00:00Z",
    "to": "2026-05-08T00:00:00Z",
    "steps": [
      { "event": "campaign.sent" },
      { "event": "message.delivered" },
      { "event": "message.clicked" },
      { "event": "conversion.recorded" }
    ]
  }'

Common errors

CodeHTTPCauseFix
ANALYTICS_RANGE_TOO_WIDE422Requested range exceeds 90 days for interval=hour or 2 years for interval=day.Narrow the range or aggregate to a coarser interval.
ANALYTICS_INVALID_METRIC400Metric name not recognised.See the metric table above.
ANALYTICS_GROUP_BY_TOO_DEEP422More than 3 simultaneous group_by dimensions.Drop the least useful dimension.
ANALYTICS_RATE_LIMITED429Per-key rate limit exceeded.Honour Retry-After; the Analytics endpoints share the platform-wide 1000 req/min cap.

Export to a data warehouse

For ongoing exports, prefer the /v1/exports/start endpoint over polling /analytics/metrics. Exports stream to a signed Cloud Storage URL in JSONL or Parquet, scheduled hourly / daily, with delivery confirmation via webhook.