Get Call History Metrics
Retrieve aggregated metrics and analytics for call history records in your workspace.
Headers
x-workspace-idstringrequiredWorkspace identifier for the API.
Query Parameters
The filters behave the same as on List Call Histories.
agentIdstringFilter by agent ID, or by agent name.
statusstringFilter by call status: completed, pending, failed or blocked.
directionstringFilter by call direction: inbound, outbound or web.
pathwayIdstringFilter by call flow ID.
batchIdstringFilter by batch call ID.
callIdsstringJSON-stringified array of call IDs.
dateRangestringJSON string with startDate and endDate ISO 8601 timestamps, applied to the call start time in UTC. Example: {"startDate":"2024-01-01T00:00:00Z","endDate":"2024-01-31T23:59:59Z"}. An invalid value returns 400.
callTypestringFilter by call type: sip or web.
searchstringFree-text search, same as on List Call Histories. At most 200 characters.
fromPhonestringPartial match on the caller number (digits only).
toPhonestringPartial match on the destination number (digits only).
postAnalysisstringJSON-stringified array of post-call analysis filter objects, same as on List Call Histories.
Response Fields
totalCallsnumberNumber of calls matching the filters.
avgDurationstringAverage call duration formatted as m:ss. "0:00" when there are no calls.
completionRatestringShare of matching calls with status completed, as a percentage string rounded to one decimal place. "0%" when there are no calls.
{
"totalCalls": 70,
"avgDuration": "0:42",
"completionRate": "98.6%"
}Last updated on