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
Query Parameters
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.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.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"}Response Fields
[
{
"_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": []
}
]
