Trillet AI logo

Get Call History Metrics

Retrieve aggregated metrics and analytics for call history records in your workspace.

GEThttps://api.trillet.ai/v2/api/call-history/metrics

Headers

x-workspace-idstringrequired

Workspace identifier for the API.

Query Parameters

The filters behave the same as on List Call Histories.

agentIdstring

Filter by agent ID, or by agent name.

statusstring

Filter by call status: completed, pending, failed or blocked.

directionstring

Filter by call direction: inbound, outbound or web.

pathwayIdstring

Filter by call flow ID.

batchIdstring

Filter by batch call ID.

callIdsstring

JSON-stringified array of call IDs.

dateRangestring

JSON 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.

callTypestring

Filter by call type: sip or web.

searchstring

Free-text search, same as on List Call Histories. At most 200 characters.

fromPhonestring

Partial match on the caller number (digits only).

toPhonestring

Partial match on the destination number (digits only).

postAnalysisstring

JSON-stringified array of post-call analysis filter objects, same as on List Call Histories.

Response Fields

totalCallsnumber

Number of calls matching the filters.

avgDurationstring

Average call duration formatted as m:ss. "0:00" when there are no calls.

completionRatestring

Share 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