> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.hollr.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.hollr.ai/_mcp/server.

# List batches for a campaign

GET https://api.hollr.ai/v1/call/batches

Reference: https://docs.hollr.ai/api-reference/hollr-ai-api/batches/list-batches

## Authentication

- `hollr-api-key` header (required) — API key issued for your account. Every request is logged and rate-limited against this key.

## Request

### Query parameters

- `campaign_id` (string, required) — UUID of the campaign to list batches for.

## Response

### 200

Batches retrieved.

- `status` (string, optional)
- `count` (integer, optional)
- `batches` (list of object, optional)
  - `id` (string, optional)
  - `userId` (string, optional) — Clerk ID of the batch owner.
  - `campaignId` (string, optional)
  - `name` (string, optional)
  - `csvData` (list of object, optional) — The contacts submitted for this batch.
    - `name` (string, required)
    - `phone_number` (string, required)
    - `other_details` (map from string to any, optional)
  - `status` (enum, optional) — Current lifecycle status of the batch, kept in sync with the call server.
    - Allowed values: `pending`, `scheduled`, `in_progress`, `paused`, `completed`, `failed`
  - `scheduledFor` (datetime, optional, nullable)
  - `createdAt` (datetime, optional)
  - `updatedAt` (datetime, optional)

## Examples

**Response**

```json
{
  "status": "success",
  "count": 1,
  "batches": [
    {
      "id": "string",
      "userId": "string",
      "campaignId": "string",
      "name": "string",
      "csvData": [
        {
          "name": "Jane Doe",
          "phone_number": "+15551234567",
          "other_details": {}
        }
      ],
      "status": "pending",
      "scheduledFor": "2024-01-15T09:30:00Z",
      "createdAt": "2024-01-15T09:30:00Z",
      "updatedAt": "2024-01-15T09:30:00Z"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.hollr.ai/v1/call/batches"

querystring = {"campaign_id":"campaign_id"}

headers = {"hollr-api-key": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.hollr.ai/v1/call/batches?campaign_id=campaign_id';
const options = {method: 'GET', headers: {'hollr-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.hollr.ai/v1/call/batches?campaign_id=campaign_id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("hollr-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.hollr.ai/v1/call/batches?campaign_id=campaign_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["hollr-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.hollr.ai/v1/call/batches?campaign_id=campaign_id")
  .header("hollr-api-key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.hollr.ai/v1/call/batches?campaign_id=campaign_id', [
  'headers' => [
    'hollr-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.hollr.ai/v1/call/batches?campaign_id=campaign_id");
var request = new RestRequest(Method.GET);
request.AddHeader("hollr-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["hollr-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hollr.ai/v1/call/batches?campaign_id=campaign_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```