List Batch Calls
curl --request GET \
--url https://api.trillet.ai/v1/api/batch-calls/{batchId}/calls \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api.trillet.ai/v1/api/batch-calls/{batchId}/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/v1/api/batch-calls/{batchId}/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/v1/api/batch-calls/{batchId}/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/v1/api/batch-calls/{batchId}/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/v1/api/batch-calls/{batchId}/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/v1/api/batch-calls/{batchId}/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{
"calls": [
{
"jobId": "<string>",
"status": "<string>",
"phone_number": "<string>",
"startTime": 123,
"endTime": 123,
"duration": 123,
"error": "<string>",
"metadata": {}
}
],
"pagination": {
"page": 123,
"limit": 123,
"total": 123,
"totalPages": 123,
"hasNext": true,
"hasPrev": true
},
"summary": {
"total": 123,
"waiting": 123,
"active": 123,
"completed": 123,
"failed": 123
},
"error": "<string>"
}Batch Calls
List Batch Calls
Get a paginated list of all calls within a batch operation with optional status filtering
GET
/
v1
/
api
/
batch-calls
/
{batchId}
/
calls
List Batch Calls
curl --request GET \
--url https://api.trillet.ai/v1/api/batch-calls/{batchId}/calls \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api.trillet.ai/v1/api/batch-calls/{batchId}/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/v1/api/batch-calls/{batchId}/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/v1/api/batch-calls/{batchId}/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/v1/api/batch-calls/{batchId}/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/v1/api/batch-calls/{batchId}/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/v1/api/batch-calls/{batchId}/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{
"calls": [
{
"jobId": "<string>",
"status": "<string>",
"phone_number": "<string>",
"startTime": 123,
"endTime": 123,
"duration": 123,
"error": "<string>",
"metadata": {}
}
],
"pagination": {
"page": 123,
"limit": 123,
"total": 123,
"totalPages": 123,
"hasNext": true,
"hasPrev": true
},
"summary": {
"total": 123,
"waiting": 123,
"active": 123,
"completed": 123,
"failed": 123
},
"error": "<string>"
}Headers
string
required
API key used for authenticating requests to the API.
string
required
Workspace identifier for the API.
Path Parameters
string
required
The unique identifier of the batch call operation
Query Parameters
number
default:"1"
Page number for pagination (1-based)
number
default:"20"
Number of results per page (maximum 100)
string
default:"all"
Filter calls by status
all- Return all calls regardless of statuswaiting- Only calls waiting in queueactive- Only calls currently in progresscompleted- Only successfully completed callsfailed- Only failed calls
Response
array
Array of call objects in the batch
Show Call Object
Show Call Object
string
Unique identifier of the call job
string
Current status of the call
string
Phone number that was called
number
Timestamp when the call started (if applicable)
number
Timestamp when the call ended (if completed/failed)
number
Call duration in seconds (if completed)
string
Error message (if failed)
object
Customer data from CSV row
object
object
Example Usage
# Get first page of all calls
curl -X GET "https://api.trillet.ai/v1/api/batch-calls/batch_7891011121314/calls" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-workspace-id: YOUR_WORKSPACE_ID"
# Get failed calls only, page 2
curl -X GET "https://api.trillet.ai/v1/api/batch-calls/batch_7891011121314/calls?status=failed&page=2&limit=50" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-workspace-id: YOUR_WORKSPACE_ID"
Example Response
{
"calls": [
{
"jobId": "call_123",
"status": "completed",
"phone_number": "+1234567890",
"startTime": 1703097600000,
"endTime": 1703097642000,
"duration": 42,
"metadata": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
}
},
{
"jobId": "call_124",
"status": "failed",
"phone_number": "+1987654321",
"startTime": 1703097600000,
"endTime": 1703097615000,
"error": "Number busy",
"metadata": {
"first_name": "Jane",
"last_name": "Smith",
"email": "jane.smith@example.com"
}
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 150,
"totalPages": 8,
"hasNext": true,
"hasPrev": false
},
"summary": {
"total": 150,
"waiting": 45,
"active": 5,
"completed": 95,
"failed": 5
}
}
Error Responses
string
Error message describing what went wrong
500- Server error retrieving batch calls
Use Cases
- Build dashboards showing all calls in a batch
- Filter and review failed calls for troubleshooting
- Export call results for reporting and analysis
- Monitor active calls in real-time
⌘I
