GET

Call Stats for Subaccount

Returns aggregated call analytics for a sub-account over a rolling window.

GEThttps://api.vantaxai.com/v1/calls/stats

Summarizes call volume and performance over the trailing `days` window: totals, breakdowns by direction, status, and outcome, total and average talk time, and the completion rate (completed calls ÷ total calls).

Headers

  • Authorizationstringrequired

    Bearer authentication with your secret API key.

    example: Bearer vx_live_3fa9c2…

Query Parameters

  • sub_account_idstringrequired

    The sub-account to compute stats for.

    example: sub_8a1f4c2e

  • daysintegeroptional

    Size of the trailing window in days (1–365). Defaults to 30.

    example: 30

Request

curl -X GET https://api.vantaxai.com/v1/calls/stats?sub_account_id=sub_8a1f4c2e \
  -H "Authorization: Bearer vx_live_3fa9c2..."

Response

{
  "success": true,
  "data": {
    "range_days": 30,
    "total": 218,
    "by_direction": {
      "inbound": 173,
      "outbound": 45
    },
    "by_status": {
      "completed": 168,
      "failed": 7,
      "no_answer": 31,
      "busy": 9,
      "in_progress": 3
    },
    "by_outcome": {
      "appointment_booked": 74,
      "question_answered": 58,
      "message_taken": 22,
      "transferred": 14,
      "no_answer": 31,
      "voicemail": 19
    },
    "total_duration": 39122,
    "avg_duration": 179,
    "completion_rate": 0.771
  }
}