Endpoint
GEThttps://api.graine.ai/api/v1/batches/
Returns batches with live contact-status counters per batch.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer gat_<token> |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | No | Filter by org. Defaults to token’s org |
campaign_id | string | No | Filter batches to a specific campaign |
status | string | No | Filter by batch status: pending · in_progress · paused · completed · cancelled · expired |
skip | integer | No | Offset. Default: 0 |
limit | integer | No | Page size. Default: 50 |
Example Request
curl "https://api.graine.ai/api/v1/batches/?organization_id=org_xyz&status=in_progress&limit=50" \
-H "Authorization: Bearer gat_your_token"
Response
200 OK
[
{
"batch_id": "btc_xyz001",
"campaign_id": "cmp_abc123",
"organization_id": "org_xyz",
"status": "in_progress",
"total_contacts": 100,
"concurrency_limit": 10,
"scheduled_start": null,
"counters": {
"pending": 22,
"dispatched": 3,
"in_flight": 5,
"retrying": 4,
"completed": 58,
"failed": 3,
"busy": 5,
"no_answer": 0
},
"created_at": "2026-05-08T09:00:00Z",
"updated_at": "2026-05-10T08:30:00Z"
}
]
Code Examples
import requests
url = "https://api.graine.ai/api/v1/batches/"
headers = { "Authorization": "Bearer gat_your_token" }
params = {
"organization_id": "org_xyz",
"campaign_id": "cmp_abc123",
"status": "in_progress",
"skip": 0,
"limit": 50
}
response = requests.get(url, headers=headers, params=params)
batches = response.json()
for b in batches:
print(b["batch_id"], b["status"], b["counters"]["completed"])