Trillet AI logo

List Call Histories

Retrieve a list of call history records in your workspace.

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

Headers

x-workspace-idstringrequired

Workspace identifier for the API.

Query Parameters

pageinteger

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

limitinteger

Number of records per page. Defaults to 10.

agentIdstring

Filter call histories by agent ID.

pathwayIdstring

Filter call histories by call flow (pathway) ID.

batchIdstring

Filter call histories belonging to a specific batch call.

statusstring

Filter by call status (e.g. completed, failed, in-progress).

directionstring

Filter by call direction: inbound or outbound.

callTypestring

Filter by call type: sip or web.

searchstring

Free-text search across phone numbers / call metadata.

callIdsstring

JSON-stringified array of specific call IDs to fetch (e.g. ["abc","def"]).

dateRangestring

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

postAnalysisstring

JSON-stringified filter object for post-call analysis fields.

Response Fields

_idstring

The unique identifier for the call history record.

timestampnumber

The Unix timestamp indicating when the call was made.

callIdstring

A unique identifier associated with the specific call.

fromPhoneNumberstring

The phone number from which the call originated.

toPhoneNumberstring

The phone number to which the call was directed.

directionstring

The direction of the call, typically "inbound", "outbound", or "bidirectional".

agentstring

The name or identifier of the agent involved in the call.

statusstring

The status of the call, such as "active", "completed", or other relevant statuses.

callFlowNamestring

The name of the call flow used during the call.

costnumber

The cost incurred for the call, if applicable.

recordingUrlstring

A URL pointing to the recorded audio of the call, if available.

summarystring

A brief summary or overview of the call.

analyzedDataobject

An object containing additional analyzed data from the call, such as flags for voicemail detection or other specific features.

answered_by_voicemailboolean

Indicates whether the call was answered by a voicemail system.

variablesobject

Any variables that were used or modified during the call.

transcriptarray

An array containing elements of the call transcript, if available.

[
  {
    "_id": "00000000bf7ca4a7c69e0000",
    "timestamp": 1737062894.9754236,
    "callId": "00000000013bd867b55ca000-00t00imaqj",
    "fromPhoneNumber": "+00000000000",
    "toPhoneNumber": "+00000000000",
    "direction": "bidirectional",
    "agent": "SampleAgent",
    "status": "active",
    "callFlowName": "Example Call Flow",
    "cost": 0,
    "recordingUrl": null,
    "summary": "Call summary here",
    "analyzedData": {},
    "variables": {},
    "transcript": []
  },
  {
    "_id": "00000000cbddbe9988450000",
    "timestamp": 1737061847.891025,
    "callId": "00000000013bd867b55ca000-00pk0su000",
    "fromPhoneNumber": "+00000000000",
    "toPhoneNumber": "+00000000000",
    "direction": "bidirectional",
    "duration": 0,
    "agent": "SampleAgent",
    "status": "completed",
    "callFlowName": "Example Call Flow",
    "cost": 0,
    "recordingUrl": null,
    "summary": "Call summary here",
    "analyzedData": {
      "answered_by_voicemail": false
    },
    "variables": {},
    "transcript": []
  }
]

Last updated on