List Batch Calls
Get a paginated list of all calls within a batch operation with optional status filtering
GET
Headers
x-workspace-idstringrequiredWorkspace identifier for the API.
Path Parameters
batchIdstringrequiredThe 10-character batch ID.
Query Parameters
pagenumberdefault: 1Page number for pagination (1-based)
limitnumberdefault: 20Number of results per page. No maximum is enforced.
statusstringdefault: allFilter calls by status. Any other value matches the job's status exactly.
all- Return all calls regardless of statuswaiting- Calls waiting in the queueactive- Calls being placedcompleted- Dial jobs that finishedfailed- Dial jobs that failedcancelled- Jobs cancelled individually
While the batch is tracked (7 days), jobs are read from the live queue. After that, the list is rebuilt from the stored batch record: id may then be the phone number when no job ID was stored, call.duration is filled in where known, and statuses come from the stored per-number results.
Response
jobsarrayJobs in the batch.
paginationobjectPagination information
Example Usage
# Get first page of all calls
curl -X GET "https://api.trillet.ai/v1/api/batch-calls/k3j9x0a1bq/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/k3j9x0a1bq/calls?status=failed&page=2&limit=50" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-workspace-id: YOUR_WORKSPACE_ID"
Example Response
{
"jobs": [
{
"id": "4821",
"status": "completed",
"phoneNumber": "+14155550123",
"contact": "John Smith",
"business": "Acme Dental",
"createdAt": 1793284800000,
"data": {
"phoneNumber": "+14155550123",
"record": {
"phone_number": "+14155550123",
"business": "Acme Dental",
"name": "John Smith"
},
"batchId": "k3j9x0a1bq"
},
"call": null
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 150,
"totalPages": 8
}
}
Error Responses
errorstringError message describing what went wrong
Common Error Codes:
404-Batch not found: the batch doesn't exist or belongs to another workspace500- Server error retrieving batch calls
Last updated on