Skip to main content
GET
/
batches
/
{batch_id}
cURL
curl --request GET \
  --url https://api.bolna.ai/batches/{batch_id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.bolna.ai/batches/{batch_id}"

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/batches/{batch_id}', 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/batches/{batch_id}",
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/batches/{batch_id}"

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/batches/{batch_id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.bolna.ai/batches/{batch_id}")

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
{
  "batch_id": "3c90c3cc0d444b5088888dd25736052a",
  "humanized_created_at": "5 minutes ago",
  "created_at": "2024-01-23T05:14:37Z",
  "updated_at": "2024-02-28T04:22:29Z",
  "status": "scheduled",
  "scheduled_at": "2024-01-29T08:30:00Z",
  "from_phone_number": "+19876543007",
  "from_phone_numbers": [
    "+19876543007",
    "+19876543007"
  ],
  "file_name": "customers.csv",
  "valid_contacts": 7,
  "total_contacts": 11,
  "execution_status": {
    "completed": 1,
    "ringing": 10,
    "in-progress": 15
  }
}
{
"error": 123,
"message": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

batch_id
string<uuid>
required

The ID of the batch

Response

agent status response

batch_id
string

The ID of the batch

Pattern: ^[0-9a-fA-F]{32}$
Example:

"3c90c3cc0d444b5088888dd25736052a"

humanized_created_at
string

Human-readable relative time since batch creation

Example:

"5 minutes ago"

created_at
string<date-time>

Created timestamp of batch

Example:

"2024-01-23T05:14:37Z"

updated_at
string<date-time>

Last updated timestamp of batch

Example:

"2024-02-28T04:22:29Z"

status
enum<string>

Current status of the batch. Progression: created → scheduled → running → completed. stopped means manually halted; failed means an error prevented execution.

Available options:
created,
scheduled,
running,
completed,
stopped,
failed
Example:

"scheduled"

scheduled_at
string<date-time>

The scheduled batch timestamp in UTC

Example:

"2024-01-29T08:30:00Z"

from_phone_number
string
deprecated

Deprecated. Use from_phone_numbers instead. Phone number of the sender along with country code (in E.164 format).

Example:

"+19876543007"

from_phone_numbers
string[]

List of phone numbers from which the batch calls are made. Each number includes the country code in E.164 format.

Example:
["+19876543007", "+19876543007"]
file_name
string

Name of the CSV batch file uploaded

Example:

"customers.csv"

valid_contacts
integer<int32>

Count of all valid contacts found in the CSV file

Example:

7

total_contacts
integer<int32>

Count of all contacts mentioned in the CSV file

Example:

11

execution_status
object

Provides a count-wise breakdown of executions based on their current status. View all possible statuses

Example:
{
"completed": 1,
"ringing": 10,
"in-progress": 15
}