Trillet AI logo

Get Individual Call Status

Get the status of an individual call within a batch operation

GEThttps://api.trillet.ai/v1/api/batch-calls/{batchId}/calls/{jobId}

Headers

x-workspace-idstringrequired

Workspace identifier for the API.

Path Parameters

batchIdstringrequired

The 10-character batch ID.

jobIdstringrequired

The job's numeric ID, from the id field of List Batch Calls.

A status exists only once the job has started. A job that is still waiting in the queue returns 404 Call not found. Statuses are kept for 7 days. This endpoint reports the dial job, not the conversation: for the outcome, transcript and analysis use Call History filtered by batchId.

Response

jobIdstring | number

The numeric job ID.

batchIdstring

The batch the job belongs to.

statusstring
  • active - The call is being placed
  • completed - The dial job finished. This doesn't mean the conversation succeeded.
  • failed - The dial job failed; see error
  • cancelled - The job was cancelled with Cancel Batch Job or Cancel Batch Contact
phoneNumberstring

The number that was called.

contactstring | null

The row's contact or name column, if present. Other columns (such as the template's contact_name) are not copied here.

businessstring | null

The row's business or company column, if present.

startTimenumber

active jobs only. When the job started, in Unix milliseconds.

endTimenumber

completed, failed and cancelled jobs. When the job ended, in Unix milliseconds.

callDurationnumber

completed jobs only. Call duration from Call History, or 0 if it wasn't found.

roomNamestring

completed jobs only. The call's room name, when known.

errorstring

failed jobs only. Why the job failed.

Example Usage

curl -X GET "https://api.trillet.ai/v1/api/batch-calls/k3j9x0a1bq/calls/4821" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-workspace-id: YOUR_WORKSPACE_ID"

Example Response (Completed Call)

{
  "status": "completed",
  "endTime": 1793284842000,
  "phoneNumber": "+14155550123",
  "contact": "John Smith",
  "business": "Acme Dental",
  "batchId": "k3j9x0a1bq",
  "jobId": "4821",
  "callDuration": 42
}

Example Response (Failed Call)

{
  "status": "failed",
  "error": "Call failed",
  "endTime": 1793284815000,
  "phoneNumber": "+14155550187",
  "contact": "Jane Doe",
  "business": "Acme Dental",
  "batchId": "k3j9x0a1bq",
  "jobId": "4822"
}

Example Response (Active Call)

{
  "jobId": "4823",
  "batchId": "k3j9x0a1bq",
  "status": "active",
  "startTime": 1793284900000,
  "phoneNumber": "+14155550199",
  "contact": "Sam Lee",
  "business": "Acme Dental"
}

Error Responses

errorstring

Error message describing what went wrong

Common Error Codes:

  • 404 - Call not found: the job hasn't started yet, doesn't exist, isn't part of this batch, or its 7-day status has expired. Batch not found when the batch doesn't exist or belongs to another workspace.
  • 500 - Server error retrieving call status

Last updated on