Batches
List Batch Executions API (v2)
Retrieve executions from a batch with pagination support, providing detailed information on each call’s outcome and metrics.
GET
/
v2
/
batches
/
{batch_id}
/
executions
cURL
curl --request GET \
--url https://api.bolna.ai/v2/batches/{batch_id}/executions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bolna.ai/v2/batches/{batch_id}/executions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bolna.ai/v2/batches/{batch_id}/executions', 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.bolna.ai/v2/batches/{batch_id}/executions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.bolna.ai/v2/batches/{batch_id}/executions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.bolna.ai/v2/batches/{batch_id}/executions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bolna.ai/v2/batches/{batch_id}/executions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"page_number": 123,
"page_size": 123,
"total": 123,
"has_more": true,
"data": [
{
"id": "4c06b4d1-4096-4561-919a-4f94539c8d4a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"batch_id": "baab7cdc833145bf8dd260ff1f0a3f21",
"conversation_duration": 123,
"total_cost": 123,
"status": "scheduled",
"error_message": "<string>",
"answered_by_voice_mail": true,
"transcript": "<string>",
"created_at": "2024-01-23T01:14:37Z",
"updated_at": "2024-01-29T18:31:22Z",
"cost_breakdown": {
"llm": 4.2,
"network": 1.2,
"platform": 2,
"synthesizer": 6.8,
"transcriber": 0.7
},
"telephony_data": {
"duration": 42,
"to_number": "+10123456789",
"from_number": "+19876543007",
"recording_url": "https://bolna-call-recordings.s3.us-east-1.amazonaws.com/AC1f3285e7c353c7d4036544f8dac36b98/REb1c182ccde4ddf7969a511a267d3c669",
"hosted_telephony": true,
"provider_call_id": "CA42fb13614bfcfeccd94cf33befe14s2f",
"call_type": "outbound",
"provider": "twilio",
"hangup_by": "Caller",
"hangup_reason": "Normal Hangup",
"hangup_provider_code": 4000,
"ring_duration": 17,
"post_dial_delay": 1,
"to_number_carrier": "Reliance Jio Infocomm Ltd (RJIL)"
},
"transfer_call_data": {
"provider_call_id": "CA42fb13614bfcfeccd94cf33befe14s2f",
"status": "completed",
"duration": 42,
"cost": 123,
"to_number": "+10123456789",
"from_number": "+19876543007",
"recording_url": "https://bolna-call-recordings.s3.us-east-1.amazonaws.com/AC1f3285e7c353c7d4036544f8dac36b98/REb1c182ccde4ddf7969a511a267d3c669",
"hangup_by": "Caller",
"hangup_reason": "Normal Hangup",
"hangup_provider_code": 4000
},
"batch_run_details": {
"status": "completed",
"created_at": "2024-01-23T01:14:37Z",
"updated_at": "2024-01-29T18:31:22Z",
"retried": 0
},
"summary": "<string>",
"extracted_data": {
"user_interested": true,
"callback_user": false,
"address": "42 world lane",
"salary_expected": "42 bitcoins"
},
"context_details": {}
}
]
}{
"error": 123,
"message": "<string>"
}{
"message": "Batch not found for given batch_id {batch_id}"
}Pagination
This API supports pagination using thepage_number and page_size query parameters. You can utilize has_more in the API response to determine if you should fetch the next page. You can learn more about it from the pagination documentation.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the batch
Query Parameters
The page number to retrieve (starts from 1)
Required range:
x >= 1Number of results per page. Maximum allowed is 1000.
Required range:
1 <= x <= 1000Response
Paginated list of executions from a batch sorted by most recent first
The current page number returned in the response. Matches the page_number requested in the query.
The number of records returned per page. Matches the page_size specified in the request.
Number of total executions
Whether there are more records or not
Show child attributes
Show child attributes
Was this page helpful?
⌘I
cURL
curl --request GET \
--url https://api.bolna.ai/v2/batches/{batch_id}/executions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bolna.ai/v2/batches/{batch_id}/executions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bolna.ai/v2/batches/{batch_id}/executions', 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.bolna.ai/v2/batches/{batch_id}/executions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.bolna.ai/v2/batches/{batch_id}/executions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.bolna.ai/v2/batches/{batch_id}/executions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bolna.ai/v2/batches/{batch_id}/executions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"page_number": 123,
"page_size": 123,
"total": 123,
"has_more": true,
"data": [
{
"id": "4c06b4d1-4096-4561-919a-4f94539c8d4a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"batch_id": "baab7cdc833145bf8dd260ff1f0a3f21",
"conversation_duration": 123,
"total_cost": 123,
"status": "scheduled",
"error_message": "<string>",
"answered_by_voice_mail": true,
"transcript": "<string>",
"created_at": "2024-01-23T01:14:37Z",
"updated_at": "2024-01-29T18:31:22Z",
"cost_breakdown": {
"llm": 4.2,
"network": 1.2,
"platform": 2,
"synthesizer": 6.8,
"transcriber": 0.7
},
"telephony_data": {
"duration": 42,
"to_number": "+10123456789",
"from_number": "+19876543007",
"recording_url": "https://bolna-call-recordings.s3.us-east-1.amazonaws.com/AC1f3285e7c353c7d4036544f8dac36b98/REb1c182ccde4ddf7969a511a267d3c669",
"hosted_telephony": true,
"provider_call_id": "CA42fb13614bfcfeccd94cf33befe14s2f",
"call_type": "outbound",
"provider": "twilio",
"hangup_by": "Caller",
"hangup_reason": "Normal Hangup",
"hangup_provider_code": 4000,
"ring_duration": 17,
"post_dial_delay": 1,
"to_number_carrier": "Reliance Jio Infocomm Ltd (RJIL)"
},
"transfer_call_data": {
"provider_call_id": "CA42fb13614bfcfeccd94cf33befe14s2f",
"status": "completed",
"duration": 42,
"cost": 123,
"to_number": "+10123456789",
"from_number": "+19876543007",
"recording_url": "https://bolna-call-recordings.s3.us-east-1.amazonaws.com/AC1f3285e7c353c7d4036544f8dac36b98/REb1c182ccde4ddf7969a511a267d3c669",
"hangup_by": "Caller",
"hangup_reason": "Normal Hangup",
"hangup_provider_code": 4000
},
"batch_run_details": {
"status": "completed",
"created_at": "2024-01-23T01:14:37Z",
"updated_at": "2024-01-29T18:31:22Z",
"retried": 0
},
"summary": "<string>",
"extracted_data": {
"user_interested": true,
"callback_user": false,
"address": "42 world lane",
"salary_expected": "42 bitcoins"
},
"context_details": {}
}
]
}{
"error": 123,
"message": "<string>"
}{
"message": "Batch not found for given batch_id {batch_id}"
}
