List Call Histories
curl --request GET \
--url https://api.trillet.ai/v2/api/call-history \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api.trillet.ai/v2/api/call-history"
headers = {
"x-api-key": "<api-key>",
"x-workspace-id": "<x-workspace-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-workspace-id': '<x-workspace-id>'}
};
fetch('https://api.trillet.ai/v2/api/call-history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.trillet.ai/v2/api/call-history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.trillet.ai/v2/api/call-history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trillet.ai/v2/api/call-history")
.header("x-api-key", "<api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trillet.ai/v2/api/call-history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
response = http.request(request)
puts response.read_body[
{
"_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": []
}
]
Calls
List Call Histories
Retrieve a list of call history records in your workspace.
GET
/
v2
/
api
/
call-history
List Call Histories
curl --request GET \
--url https://api.trillet.ai/v2/api/call-history \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api.trillet.ai/v2/api/call-history"
headers = {
"x-api-key": "<api-key>",
"x-workspace-id": "<x-workspace-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-workspace-id': '<x-workspace-id>'}
};
fetch('https://api.trillet.ai/v2/api/call-history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.trillet.ai/v2/api/call-history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.trillet.ai/v2/api/call-history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trillet.ai/v2/api/call-history")
.header("x-api-key", "<api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trillet.ai/v2/api/call-history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
response = http.request(request)
puts response.read_body[
{
"_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": []
}
]
Headers
string
required
API key used for authenticating requests to the API.
string
required
Workspace identifier for the API.
Query Parameters
number
default:"1"
Page number for pagination.
number
default:"10"
Number of records to return per page.
string
Full-text search across caller name, phone numbers, and call ID. Accepts any phone format —
+1 (845) 630-1653, 18456301653, or 8456301653 all match the same record.string
Filter by the originating phone number. Non-digit characters are stripped automatically, so
+1 (845) 630-1653 and 18456301653 are equivalent. Requires at least 7 digits.string
Filter by the destination phone number. Same normalization as
fromPhone.string
Filter by a specific agent ID.
string
Filter by call status (e.g.
completed, failed, no-answer).string
Filter by call direction:
inbound, outbound, or bidirectional.string
Filter to calls belonging to a specific outbound batch.
string
JSON string with
startDate and endDate in ISO 8601 format. Example: {"startDate":"2024-01-01T00:00:00.000Z","endDate":"2024-01-31T23:59:59.999Z"}string
Sort field and direction as
field:asc or field:desc. Default: timestamp:desc.Response Fields
string
The unique identifier for the call history record.
number
The Unix timestamp indicating when the call was made.
string
A unique identifier associated with the specific call.
string
The phone number from which the call originated.
string
The phone number to which the call was directed.
string
The direction of the call, typically “inbound”, “outbound”, or “bidirectional”.
string
The name or identifier of the agent involved in the call.
string
The status of the call, such as “active”, “completed”, or other relevant statuses.
string
The name of the call flow used during the call.
number
The cost incurred for the call, if applicable.
string
A URL pointing to the recorded audio of the call, if available.
string
A brief summary or overview of the call.
object
An object containing additional analyzed data from the call, such as flags for voicemail detection or other specific features.
boolean
Indicates whether the call was answered by a voicemail system.
object
Any variables that were used or modified during the call.
array
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": []
}
]
