Get Batch Logs
curl --request GET \
--url https://api.bland.ai/v2/batches/{batch_id}/logs \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v2/batches/{batch_id}/logs"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v2/batches/{batch_id}/logs', 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.bland.ai/v2/batches/{batch_id}/logs",
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: <authorization>"
],
]);
$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.bland.ai/v2/batches/{batch_id}/logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
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.bland.ai/v2/batches/{batch_id}/logs")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/batches/{batch_id}/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "6398342c-d7de-4a11-ba86-3d86e5746699",
"batch_id": "f6ef9224-0ec3-43e4-98a1-bb2a8765d110",
"org_id": "f52eb4b2-c8b6-44a6-a36c-2749aa930c86",
"event_type": "complete",
"timestamp": "2025-05-08T19:28:42.748Z",
"payload": {
"calls_total": 1,
"calls_failed": 0,
"calls_successful": 1
}
},
{
"id": "a24616b4-be8f-42e4-be29-4c5ec005756c",
"batch_id": "f6ef9224-0ec3-43e4-98a1-bb2a8765d110",
"org_id": "f52eb4b2-c8b6-44a6-a36c-2749aa930c86",
"event_type": "lifecycle",
"timestamp": "2025-05-08T19:28:15.560Z",
"payload": {
"message": "Requested: 1. Validated: 1. Dispatched: 1. CPS: 1.12.",
"state_change": "in_progress"
}
}
],
"errors": null
}
Batches
Get Batch Logs
Retrieve logs for a specific batch.
GET
/
v2
/
batches
/
{batch_id}
/
logs
Get Batch Logs
curl --request GET \
--url https://api.bland.ai/v2/batches/{batch_id}/logs \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v2/batches/{batch_id}/logs"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v2/batches/{batch_id}/logs', 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.bland.ai/v2/batches/{batch_id}/logs",
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: <authorization>"
],
]);
$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.bland.ai/v2/batches/{batch_id}/logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
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.bland.ai/v2/batches/{batch_id}/logs")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/batches/{batch_id}/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "6398342c-d7de-4a11-ba86-3d86e5746699",
"batch_id": "f6ef9224-0ec3-43e4-98a1-bb2a8765d110",
"org_id": "f52eb4b2-c8b6-44a6-a36c-2749aa930c86",
"event_type": "complete",
"timestamp": "2025-05-08T19:28:42.748Z",
"payload": {
"calls_total": 1,
"calls_failed": 0,
"calls_successful": 1
}
},
{
"id": "a24616b4-be8f-42e4-be29-4c5ec005756c",
"batch_id": "f6ef9224-0ec3-43e4-98a1-bb2a8765d110",
"org_id": "f52eb4b2-c8b6-44a6-a36c-2749aa930c86",
"event_type": "lifecycle",
"timestamp": "2025-05-08T19:28:15.560Z",
"payload": {
"message": "Requested: 1. Validated: 1. Dispatched: 1. CPS: 1.12.",
"state_change": "in_progress"
}
}
],
"errors": null
}
Headers
string
required
Your API key for authentication.
Path Parameters
string
required
The unique identifier of the batch whose logs you want to fetch.
Query Parameters
integer
Optional. The number of log entries to return.
integer
Optional. The number of log entries to skip (used for pagination).
string
Optional. Sort order of logs.
Valid values:
Valid values:
"asc" or "desc" (default is "desc").Response
array
A list of log entries related to the batch’s lifecycle and execution.
string
The unique identifier for the log entry.
string
The ID of the batch associated with the log.
string
The organization ID tied to the batch.
string
The type of log event.
Examples:
Examples:
"lifecycle", "complete"string (ISO 8601)
The time the log was generated.
object
Additional information related to the event. Contents vary depending on the
event_type.null
Always
null on success.{
"data": [
{
"id": "6398342c-d7de-4a11-ba86-3d86e5746699",
"batch_id": "f6ef9224-0ec3-43e4-98a1-bb2a8765d110",
"org_id": "f52eb4b2-c8b6-44a6-a36c-2749aa930c86",
"event_type": "complete",
"timestamp": "2025-05-08T19:28:42.748Z",
"payload": {
"calls_total": 1,
"calls_failed": 0,
"calls_successful": 1
}
},
{
"id": "a24616b4-be8f-42e4-be29-4c5ec005756c",
"batch_id": "f6ef9224-0ec3-43e4-98a1-bb2a8765d110",
"org_id": "f52eb4b2-c8b6-44a6-a36c-2749aa930c86",
"event_type": "lifecycle",
"timestamp": "2025-05-08T19:28:15.560Z",
"payload": {
"message": "Requested: 1. Validated: 1. Dispatched: 1. CPS: 1.12.",
"state_change": "in_progress"
}
}
],
"errors": null
}
Docs for agents: llms.txt
Was this page helpful?
⌘I