GET
/
v1
/
api
/
batch-calls
/
{batchId}
/
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>'
{
  "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

x-api-key
string
required

API key used for authenticating requests to the API.

x-workspace-id
string
required

Workspace identifier for the API.

Path Parameters

batchId
string
required

The unique identifier of the batch call operation

Query Parameters

page
number
default:"1"

Page number for pagination (1-based)

limit
number
default:"20"

Number of results per page (maximum 100)

status
string
default:"all"

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

calls
array

Array of call objects in the batch

pagination
object

Pagination information

summary
object

Summary 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

error
string

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