Get Call History Metrics
Retrieve aggregated metrics and analytics for call history records in your workspace.
GET
Headers
x-api-keystringrequiredAPI key used for authenticating requests to the API.
x-workspace-idstringrequiredWorkspace identifier for the API.
Query Parameters
agentIdstringFilter metrics by a specific agent ID.
statusstringFilter by call status (e.g., "completed", "failed", "no-answer").
directionstringFilter by call direction ("inbound", "outbound", "bidirectional").
pathwayIdstringFilter by call flow ID.
dateRangestringJSON string with startDate and endDate in ISO format. Example: {"startDate":"2024-01-01","endDate":"2024-01-31"}
callTypestringFilter by call type: "sip" or "web".
Response Fields
totalCallsnumberTotal number of calls matching the filters.
completedCallsnumberNumber of completed calls.
failedCallsnumberNumber of failed calls.
averageDurationnumberAverage call duration in seconds.
totalCostnumberTotal cost of all calls.
{
"totalCalls": 150,
"completedCalls": 120,
"failedCalls": 10,
"averageDuration": 180,
"totalCost": 45.50
}