For Developers
Account

Analytics

Read call, agent and usage figures for your account over a date range.

These read-only routes return summary figures in camelCase, worked out from your own account's calls.

EndpointRequest
Get call analyticsGET/v1/analytics/calls
Get agent analyticsGET/v1/analytics/agents
Get analytics summaryGET/v1/analytics/summary

What's counted

  • Calls: your account's calls, excluding test calls. A call falls in a range by when it started, or by when it was created if it never started.
  • Date ranges: start_date defaults to 30 days before end_date, and end_date defaults to now.
  • Date format: send YYYY-MM-DD, or a full time with a timezone such as 2026-10-01T00:00:00Z. A date with no time means that whole day in UTC. In a query string, encode + as %2B.
  • Limits: a range can be up to 366 days. A longer range, a start after the end, or any other date format returns 400.
  • Success: a call is finished once it has an ended reason. A finished call is successful unless that reason shows an error, a failure, no answer, a busy line, a rejection, a cancellation, a timeout or voicemail.
  • Cost: what your account was charged for those calls, in US dollars. A call that hasn't been billed yet adds nothing.

The call analytics object

Attributes

totalCallsintegerrequired
The number of calls in the range.
averageDurationnumberrequired
The average duration in seconds, across calls with a known duration. 0 when there are none.
successRatenumber | nullrequired
Successful calls as a percentage of finished calls, from 0 to 100. null when no call has finished.
costobjectrequired
What you were charged, described below.
trendsarrayrequired
One item per UTC day in the range, including days with no calls.

cost attributes

totalCostnumberrequired
The total charged, in US dollars.
costPerCallnumberrequired
totalCost divided by totalCalls. 0 when there are no calls.

trends item attributes

datestringrequired
The day, as YYYY-MM-DD.
callsintegerrequired
The number of calls that day.
durationnumberrequired
The average call duration that day, in seconds. 0 when there are none.

The agent analytics object

Attributes

activeAgentsintegerrequired
How many of your agents have the status active now. The date range doesn't change this.
topPerformingarrayrequired
Your agents with calls in the range, most calls first, then highest success rate. Agents with no calls in the range aren't listed.

topPerforming item attributes

agentIdstringrequired
The agent's id from the agents API.
namestringrequired
The agent's display name.
callsintegerrequired
The agent's calls in the range.
successRatenumber | nullrequired
The agent's success rate from 0 to 100. null when none of its calls has finished.

The analytics summary object

Attributes

totalCallsintegerrequired
The number of calls in the range.
totalMinutesnumberrequired
Total call time in minutes, to two decimal places.
totalCostnumberrequired
The total charged, in US dollars.
activeAgentsintegerrequired
How many of your agents have the status active now.

Get call analytics

GET/v1/analytics/callsread key

Returns call counts, duration, success rate, cost and daily trends.

Query parameters

start_datestring
Start of the range. Defaults to 30 days before end_date.
end_datestring
End of the range. Defaults to now.
Request
curl "https://backend.synthesys.app/api/v1/analytics/calls?start_date=2026-10-01&end_date=2026-10-03" \
  -H "SYNTH_API_KEY: YOUR_API_KEY"
Response
{
  "success": true,
  "data": {
    "totalCalls": 120,
    "averageDuration": 90.5,
    "successRate": 74.17,
    "cost": { "totalCost": 36, "costPerCall": 0.3 },
    "trends": [
      { "date": "2026-10-01", "calls": 25, "duration": 88 },
      { "date": "2026-10-02", "calls": 31, "duration": 94.25 },
      { "date": "2026-10-03", "calls": 0, "duration": 0 }
    ]
  }
}
Range too long (400)
{
  "success": false,
  "error": "The date range cannot exceed 366 days",
  "code": "VALIDATION_ERROR",
  "requestId": "e3a1c5d7-2b4f-4a6c-9d8e-1f2a3b4c5d6e",
  "timestamp": "2026-10-31T14:02:11.482Z"
}

Get agent analytics

GET/v1/analytics/agentsread key

Returns your active agent count and your busiest agents in the range.

Query parameters

limitintegerdefault 10
Maximum agents in topPerforming, from 1 to 50.
start_datestring
Start of the range. Defaults to 30 days before end_date.
end_datestring
End of the range. Defaults to now.

A limit out of range returns 400.

Request
curl "https://backend.synthesys.app/api/v1/analytics/agents?limit=5" \
  -H "SYNTH_API_KEY: YOUR_API_KEY"
Response
{
  "success": true,
  "data": {
    "activeAgents": 3,
    "topPerforming": [
      {
        "agentId": "d4e5f6a7-8b9c-4d0e-8f1a-3b4c5d6e7f80",
        "name": "Sales agent",
        "calls": 64,
        "successRate": 82.5
      }
    ]
  }
}

Get analytics summary

GET/v1/analytics/summaryread key

Returns totals for the same calls as call analytics, plus your active agent count.

Query parameters

start_datestring
Start of the range. Defaults to 30 days before end_date.
end_datestring
End of the range. Defaults to now.
Request
curl "https://backend.synthesys.app/api/v1/analytics/summary?start_date=2026-10-01" \
  -H "SYNTH_API_KEY: YOUR_API_KEY"
Response
{
  "success": true,
  "data": {
    "totalCalls": 120,
    "totalMinutes": 181,
    "totalCost": 36,
    "activeAgents": 3
  }
}