Get Individual Call Status
curl --request GET \
--url https://api.trillet.ai/v1/api/batch-calls/{batchId}/calls/{jobId} \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api.trillet.ai/v1/api/batch-calls/{batchId}/calls/{jobId}"
headers = {
"x-api-key": "<api-key>",
"x-workspace-id": "<x-workspace-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-workspace-id': '<x-workspace-id>'}
};
fetch('https://api.trillet.ai/v1/api/batch-calls/{batchId}/calls/{jobId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.trillet.ai/v1/api/batch-calls/{batchId}/calls/{jobId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.trillet.ai/v1/api/batch-calls/{batchId}/calls/{jobId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trillet.ai/v1/api/batch-calls/{batchId}/calls/{jobId}")
.header("x-api-key", "<api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trillet.ai/v1/api/batch-calls/{batchId}/calls/{jobId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
response = http.request(request)
puts response.read_body{
"jobId": "<string>",
"status": "<string>",
"phone_number": "<string>",
"startTime": 123,
"endTime": 123,
"duration": 123,
"error": "<string>",
"result": {}
}Batch Calls
Get Individual Call Status
Get the status of an individual call within a batch operation
GET
/
v1
/
api
/
batch-calls
/
{batchId}
/
calls
/
{jobId}
Get Individual Call Status
curl --request GET \
--url https://api.trillet.ai/v1/api/batch-calls/{batchId}/calls/{jobId} \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api.trillet.ai/v1/api/batch-calls/{batchId}/calls/{jobId}"
headers = {
"x-api-key": "<api-key>",
"x-workspace-id": "<x-workspace-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-workspace-id': '<x-workspace-id>'}
};
fetch('https://api.trillet.ai/v1/api/batch-calls/{batchId}/calls/{jobId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.trillet.ai/v1/api/batch-calls/{batchId}/calls/{jobId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.trillet.ai/v1/api/batch-calls/{batchId}/calls/{jobId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trillet.ai/v1/api/batch-calls/{batchId}/calls/{jobId}")
.header("x-api-key", "<api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trillet.ai/v1/api/batch-calls/{batchId}/calls/{jobId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
response = http.request(request)
puts response.read_body{
"jobId": "<string>",
"status": "<string>",
"phone_number": "<string>",
"startTime": 123,
"endTime": 123,
"duration": 123,
"error": "<string>",
"result": {}
}Headers
string
required
API key used for authenticating requests to the API.
string
required
Workspace identifier for the API.
Path Parameters
string
required
The unique identifier of the batch call operation
string
required
The unique identifier of the individual call job
Response
string
The unique identifier of the call job
string
Current status of the individual call
waiting- Call is queued and waiting to be processedactive- Call is currently in progresscompleted- Call completed successfullyfailed- Call failed due to an error
string
The phone number that was called
number
Timestamp when the call started (if applicable)
number
Timestamp when the call ended (if completed or failed)
number
Duration of the call in seconds (if completed)
string
Error message if the call failed
object
Call result data including conversation details (if completed)
Example Usage
curl -X GET "https://api.trillet.ai/v1/api/batch-calls/batch_7891011121314/calls/call_123" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-workspace-id: YOUR_WORKSPACE_ID"
Example Response (Completed Call)
{
"jobId": "call_123",
"status": "completed",
"phone_number": "+1234567890",
"startTime": 1703097600000,
"endTime": 1703097642000,
"duration": 42,
"result": {
"callId": "call_abc123",
"transcript": "Hello John, this is an automated call...",
"outcome": "successful",
"metadata": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
}
}
}
Example Response (Failed Call)
{
"jobId": "call_124",
"status": "failed",
"phone_number": "+1987654321",
"startTime": 1703097600000,
"endTime": 1703097615000,
"error": "Number busy - unable to connect after 3 attempts"
}
Example Response (Active Call)
{
"jobId": "call_125",
"status": "active",
"phone_number": "+1555666777",
"startTime": 1703097700000
}
Error Responses
string
Will be “not_found” if the call doesn’t exist
string
Error message describing what went wrong
404- Call not found with the specified job ID500- Server error retrieving call status
Use Cases
- Monitor individual call progress within a batch
- Retrieve detailed results for completed calls
- Debug failed calls to understand failure reasons
- Track call timing and duration metrics
