List Call Histories
Retrieve a paginated list of call history records in your workspace.
Headers
x-workspace-idstringrequiredWorkspace identifier for the API.
Query Parameters
All filters are exact matches unless stated otherwise. A filter value that matches nothing returns an empty data array, not an error.
pageintegerPage number for pagination. Defaults to 1. Results are sorted newest first (by creation order). Calls that arrive while you page shift later pages, so to page a fixed set, set dateRange.endDate to the time you start and keep it fixed until you reach the last page.
limitintegerNumber of records per page. Defaults to 10.
agentIdstringFilter by agent ID. A value that is not an ID is treated as an agent name in the workspace.
pathwayIdstringFilter call histories by call flow (pathway) ID.
batchIdstringFilter call histories belonging to a specific batch call.
statusstringFilter by call status: completed, pending, failed or blocked.
directionstringFilter by call direction: inbound, outbound or web.
callTypestringFilter by call type: sip (phone calls) or web. Other values are ignored.
modestringFilter by conversation mode: voice or text.
searchstringFree-text search across phone numbers, call ID, record ID, agent name and call flow name. At most 200 characters. A term with 7 or more digits is matched on digits only, so +1 (845) 630-... and 1845630... find the same number.
fromPhonestringPartial match on the caller number. Only the digits are used, and the value must contain at least one digit. At most 200 characters.
toPhonestringPartial match on the destination number. Same rules as fromPhone.
callIdsstringJSON-stringified array of call IDs (callId values) to fetch, e.g. ["abc","def"].
dateRangestringJSON-stringified object with startDate and endDate ISO 8601 timestamps, URL-encoded (e.g. {"startDate":"2024-01-01T00:00:00Z","endDate":"2024-01-31T23:59:59Z"}). Both keys are required.
The filter applies to the call's start time, in UTC. Both bounds are inclusive and compared to the second. A date with no time ("2024-01-31") means midnight UTC at the start of that day, so include a time on endDate to cover the whole day. An invalid value returns 400.
postAnalysisstringJSON-stringified array of filter objects on post-call analysis fields, e.g. [{"call_disposition":"booked"}]. Each key is an analyzedData field; all conditions must match. A value can be a plain value, null, or an object using $exists, $ne, $regex (with optional $options, default i) or $in. The special key function_calls matches calls that invoked a tool by name (a string, or {"$in": [...]}).
Send an array, even for a single condition.
includeTranscriptsstringSet to false to omit the transcript field from each record. Defaults to including it.
slimstringSet to true to also omit postCallStatus, preCallWebhook, dynamic_variables and variables.
Response Fields
dataarrayCall history records for this page.
paginationobjectErrors
| Status | Body | When |
|---|---|---|
400 | {"error": "dateRange must be a JSON object with startDate and endDate ..."} | dateRange is not valid JSON or has invalid dates |
400 | {"error": "<field> must be ..."} | search, fromPhone or toPhone is repeated, over 200 characters, or (phone filters) has no digits |
{
"data": [
{
"_id": "d8d8d8d8d8d8d8d8d8d8d8d8",
"timestamp": 1761731294,
"callId": "d3d3d3d3d3d3d3d3d3d3d3d3-k3j9x0a1bq",
"fromPhoneNumber": "+14155550123",
"toPhoneNumber": "+14155550188",
"direction": "outbound",
"duration": 42,
"charged_duration": 42,
"transferTiming": null,
"agentSegments": null,
"agent": "Front Desk",
"status": "completed",
"error": "None",
"pathwayName": "Appointment Booking",
"callFlowName": "Appointment Booking",
"cost": 0.12,
"hasTelephonyCost": false,
"telephonyCost": 0,
"warmTransferCharge": 0,
"warmTransferMinutes": 0,
"isCallFromSmartCallback": false,
"recordingUrl": "https://api.trillet.ai/v2/api/recordings/d8d8d8d8d8d8d8d8d8d8d8d8",
"publicRecordingUrl": null,
"timezone": "America/Los_Angeles",
"scheduledTime": null,
"currentTimeOfGivenTimezone": null,
"pendingReason": null,
"nextAttemptAt": null,
"publicRecording": null,
"batchId": null,
"roomName": "d3d3d3d3d3d3d3d3d3d3d3d3-k3j9x0a1bq",
"summary": "Caller booked a consultation for Tuesday.",
"analyzedData": {
"call_disposition": "booked",
"call_sentiment": "positive"
},
"variables": {},
"transcript": [],
"hipaaCompliance": false,
"functionCalls": [],
"dynamic_variables": {},
"llm": { "model": "gpt-4.1" },
"stt": {},
"tts": {},
"postCallStatus": null,
"twilioCallSid": "CA0123456789abcdef0123456789abcdef",
"headerVariables": [{ "key": "store_id", "value": "1042" }],
"preCallWebhook": null,
"postCallEmailDeliveries": [],
"bookingOutcome": null,
"mode": "voice",
"callEndedBy": "Unknown",
"callEndReason": "Unknown"
}
],
"pagination": {
"page": 1,
"limit": 10,
"totalCount": 1,
"totalPages": 1
}
}Last updated on