API key used for authenticating requests to the API.
Workspace identifier for the API.
Path Parameters
The unique identifier of the batch call operation
Query Parameters
Page number for pagination (1-based)
Number of results per page (maximum 100)
Filter calls by status
all
- Return all calls regardless of status
waiting
- Only calls waiting in queue
active
- Only calls currently in progress
completed
- Only successfully completed calls
failed
- Only failed calls
Response
Array of call objects in the batch Unique identifier of the call job
Current status of the call
Phone number that was called
Timestamp when the call started (if applicable)
Timestamp when the call ended (if completed/failed)
Call duration in seconds (if completed)
Error message (if failed)
Customer data from CSV row
Pagination information Total number of calls matching the filter
Whether there are more pages
Whether there are previous pages
Summary statistics for the batch Successfully completed calls
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
Error 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