List Active Calls
curl --request GET \
--url https://api.trillet.ai/v2/api/active-calls \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api.trillet.ai/v2/api/active-calls"
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/active-calls', 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/active-calls",
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/active-calls"
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/active-calls")
.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/active-calls")
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{
"data": [
{
"id": "665a1b2c3d4e5f6a7b8c9d0e",
"roomName": "call-abc123",
"customerPhone": "+14155551234",
"customerName": "John Doe",
"aiAgentName": "Customer Support Agent",
"duration": 145,
"status": "active",
"sentiment": "positive",
"lastMessage": "Sure, I can help you with that!",
"transferRequested": false,
"type": "phone",
"participants": [
{
"identity": "agent-001",
"isAgent": true,
"joinedAt": "2024-06-01T10:00:00.000Z"
},
{
"identity": "customer-001",
"isAgent": false,
"joinedAt": "2024-06-01T10:00:01.000Z"
}
]
}
],
"count": 1,
"timestamp": "2024-06-01T10:02:25.000Z"
}
Active Calls
List Active Calls
Retrieve all currently active calls in your workspace with real-time status information.
GET
/
v2
/
api
/
active-calls
List Active Calls
curl --request GET \
--url https://api.trillet.ai/v2/api/active-calls \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api.trillet.ai/v2/api/active-calls"
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/active-calls', 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/active-calls",
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/active-calls"
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/active-calls")
.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/active-calls")
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{
"data": [
{
"id": "665a1b2c3d4e5f6a7b8c9d0e",
"roomName": "call-abc123",
"customerPhone": "+14155551234",
"customerName": "John Doe",
"aiAgentName": "Customer Support Agent",
"duration": 145,
"status": "active",
"sentiment": "positive",
"lastMessage": "Sure, I can help you with that!",
"transferRequested": false,
"type": "phone",
"participants": [
{
"identity": "agent-001",
"isAgent": true,
"joinedAt": "2024-06-01T10:00:00.000Z"
},
{
"identity": "customer-001",
"isAgent": false,
"joinedAt": "2024-06-01T10:00:01.000Z"
}
]
}
],
"count": 1,
"timestamp": "2024-06-01T10:02:25.000Z"
}
Headers
string
required
API key used for authenticating requests to the API.
string
required
Workspace identifier for the API.
Response Fields
array
Array of active call objects.
string
Unique identifier for the active call.
string
The LiveKit room name for the call.
string
Customer’s phone number.
string
Customer’s name if available.
string
Name of the AI agent handling the call.
number
Current call duration in seconds.
string
Call status (always “active” for this endpoint).
string
Current detected sentiment of the conversation.
string
The most recent message in the conversation.
boolean
Whether a transfer to a human agent has been requested.
string
Call type: “phone” or “web”.
array
Array of call participants.
number
Total number of active calls.
string
Server timestamp of the response.
{
"data": [
{
"id": "665a1b2c3d4e5f6a7b8c9d0e",
"roomName": "call-abc123",
"customerPhone": "+14155551234",
"customerName": "John Doe",
"aiAgentName": "Customer Support Agent",
"duration": 145,
"status": "active",
"sentiment": "positive",
"lastMessage": "Sure, I can help you with that!",
"transferRequested": false,
"type": "phone",
"participants": [
{
"identity": "agent-001",
"isAgent": true,
"joinedAt": "2024-06-01T10:00:00.000Z"
},
{
"identity": "customer-001",
"isAgent": false,
"joinedAt": "2024-06-01T10:00:01.000Z"
}
]
}
],
"count": 1,
"timestamp": "2024-06-01T10:02:25.000Z"
}
⌘I
