Trillet AI logo

Get Daily Call Metrics

Retrieve per-day call history metrics for the workspace.

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

Returns call history aggregates as a per-day series. Aggregate totals for the same window are on Get Call History Metrics.

Headers

x-workspace-idstringrequired

Workspace identifier for the API.

Query Parameters

dateRangestringrequired

JSON string with startDate and endDate ISO 8601 timestamps, applied to the call start time. Example: {"startDate":"2026-10-01T00:00:00Z","endDate":"2026-10-31T23:59:59Z"}.

timezonestring

IANA timezone used to group calls into days and to evaluate windows. Defaults to UTC.

windowsstring

Optional JSON object of business-hours windows keyed by day, e.g. {"2026-10-01":{"start":"09:00","end":"17:00"}}. Times are HH:MM in timezone; start is inclusive and end exclusive. Days that are missing, null or have an invalid window count as closed. At most 400 days.

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.

callTypestring

Filter by call type: sip or web.

searchstring

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

postAnalysisstring

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

Response Fields

timezonestring

The timezone the days were computed in.

daysarray

One entry per day that has at least one call, sorted by date. Days with no calls are omitted.

Errors

StatusBodyWhen
400{"error": "dateRange is required"}dateRange is missing
400{"error": "dateRange must be a JSON object with startDate and endDate ..."}dateRange is invalid
{
  "timezone": "America/New_York",
  "days": [
    {
      "day": "2026-10-01",
      "total": 12,
      "completed": 11,
      "inHours": 9,
      "inHoursCompleted": 9,
      "durationSum": 1534
    }
  ]
}

Last updated on