Get Batch Status
Get detailed status information for a batch call operation
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
Response
idstringThe batch ID
statusstringCurrent status of the batch operation
queued- Batch is waiting to be processedprocessing- Calls are currently being madecompleted- All calls have been completedcancelled- Batch was cancelledfailed- Batch failed due to an error
isCompletebooleanWhether the batch operation has finished
totalCallsnumberTotal number of calls in the batch
progressobjectDetailed progress information
timestampnumberTimestamp of when this status was retrieved
Example Usage
curl -X GET "https://api.trillet.ai/v1/api/batch-calls/batch_7891011121314" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-workspace-id: YOUR_WORKSPACE_ID"
Example Response
{
"id": "batch_7891011121314",
"status": "processing",
"isComplete": false,
"totalCalls": 150,
"progress": {
"waiting": 45,
"active": 5,
"completed": 95,
"failed": 5,
"total": 150,
"startTime": 1703097600000,
"lastCompletedTime": 1703101200000,
"completedTime": null,
"averageCallDuration": 45.2,
"recent_calls": [
{
"jobId": "call_123",
"status": "completed",
"phone_number": "+1234567890",
"completedAt": 1703101200000
}
]
},
"timestamp": 1703101300000
}
Error Responses
errorstringError message describing what went wrong
messagestringAdditional context about the error
Common Error Codes:
404- Batch not found with the specified ID500- Server error retrieving batch information
Status Monitoring
You can poll this endpoint to monitor the progress of your batch calls. The response includes detailed metrics about call completion rates, timing information, and recent call results.
