Skip to content
Browse documentation

Analytics API

Pull call and text totals for a date range from the Dialstitch API, the same numbers as the Analytics overview.

Get the numbers behind the Analytics overview for your whole organization. Needs the analytics:read scope.

GET /analytics/summary
  • range: today, 7d, 30d (the default), 90d or custom.
  • from, to: dates as YYYY-MM-DD, with range=custom.
  • number_id: only calls and texts on this number.
  • user_id: only this user.
  • direction: inbound or outbound.

Ranges are worked out in your organization's time zone.

curl "https://dialstitch.com/api/v1/analytics/summary?range=custom&from=2026-10-01&to=2026-10-31" \
  -H "Authorization: Bearer dpk_..." 
{
  "data": {
    "range": {
      "preset": "custom",
      "from": "2026-10-01T07:00:00.000Z",
      "to": "2026-11-01T07:00:00.000Z",
      "from_date": "2026-10-01",
      "to_date": "2026-10-31",
      "time_zone": "America/Vancouver"
    },
    "calls": {
      "total": 1240,
      "inbound": 860,
      "outbound": 380,
      "answered": 1010,
      "missed": 140,
      "voicemail": 62,
      "abandoned": 28,
      "talk_seconds": 268400,
      "avg_talk_seconds": 266,
      "avg_wait_seconds": 14
    },
    "messages": { "sent": 2210, "received": 1875 }
  }
}