List Batch Calls
Get a paginated list of all calls within a batch operation with optional status filtering
GET
Headers
x-api-keystringrequiredAPI key used for authenticating requests to the API.
x-workspace-idstringrequiredWorkspace identifier for the API.
Path Parameters
batchIdstringrequiredThe unique identifier of the batch call operation
Query Parameters
pagenumberdefault: 1Page number for pagination (1-based)
limitnumberdefault: 20Number of results per page (maximum 100)
statusstringdefault: allFilter 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
callsarrayArray of call objects in the batch
paginationobjectPagination information
summaryobjectSummary statistics for the batch
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
errorstringError message describing what went wrong
Common Error Codes:
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
