Call stats for the sub-account

call stats. Aggregate call metrics over an optional date range (default: the last 30 days): totals by direction and status, completed vs missed, calls with recordings, and total and average talk time.

GET https://api.centerfy.ai/webhooks/inbound/calls/stats

Headers

HeaderRequiredValueDescription
x-api-keyYesyour sub-account API key (cfy_…)authenticates the request; or pass Authorization: Bearer <key>.

Query parameters

NameTypeRequiredDefaultDescription
fromstringNo—optional window start; ISO 8601 (include a UTC offset or Z). When omitted, defaults to 30 days ago. An invalid value returns 400.
tostringNo—optional window end; ISO 8601 (include a UTC offset or Z). A date-only value (no time) covers the whole day (through 23:59:59.999). When omitted, the window runs to now. An invalid value returns 400.

Example

curl -X GET "https://api.centerfy.ai/webhooks/inbound/calls/stats" \
  -H "x-api-key: $CENTERFY_API_KEY"
import { CenterfyClient } from "@centerfy/sdk";

const centerfy = new CenterfyClient({ apiKey: process.env.CENTERFY_API_KEY! });

const result = await centerfy.calls.stats();
console.log(result);
centerfy calls stats

MCP tool: centerfy_calls_stats (see MCP server)

Response

{
  "status": "success",
  "from": "2026-05-13T16:00:00.000Z",
  "to": "2026-06-12T23:59:59.999Z",
  "capped": false,
  "stats": {
    "total_calls": 342,
    "inbound_calls": 210,
    "outbound_calls": 132,
    "completed_calls": 298,
    "missed_calls": 31,
    "calls_with_recordings": 275,
    "total_duration_seconds": 41280,
    "average_duration_seconds": 138,
    "by_status": {
      "completed": 298,
      "no_answer": 22,
      "failed": 9,
      "busy": 13
    }
  }
}

Errors

  • 401 — if unauthenticated; 400 for an invalid from/to.

Notes

Read-only. Aggregated over up to 5000 most-recent calls in the window; if that cap is hit, capped is true (narrow the range for exact figures on high-volume accounts). missed_calls counts the statuses no_answer, no-answer, and failed. average_duration_seconds is the rounded mean over calls with a positive duration. ‘to’ is null in the response when not supplied.

© 2026 Centerfy AI. All rights reserved.