Skip to main content

Overview

A Batch is a group of contacts dispatched together under a Campaign. When you create a batch, Apollo immediately begins dispatching calls to every contact (or waits until scheduled_start if set). Batches inherit the parent campaign’s retry policy, working hours, phone number strategy, and concurrency settings — but each of these can be overridden per-batch. Base URL: https://api.graine.ai/api/v1 Authentication: All batch endpoints require Authorization: Bearer gat_<token>.

Batch Object

{
  "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"
}

Batch Fields

FieldTypeDescription
batch_idstringUnique identifier
campaign_idstringParent campaign
organization_idstringOwning org
statusstringCurrent state (see lifecycle below)
total_contactsintegerTotal contacts uploaded to this batch
concurrency_limitintegerMax parallel calls. Inherits from campaign if not set
scheduled_startdatetimeWhen to start dispatching. null = immediately
countersobjectLive real-time contact status breakdown
max_retries_overrideintegerOverrides campaign.retry_policy.max_retries for this batch only

Batch Status Lifecycle

StatusDescription
pendingWaiting for scheduled_start
in_progressActively dispatching calls
pausedStopped — resumes with /resume
completedAll contacts reached a terminal state
cancelledHard-stopped. Terminal
expiredPassed end window without completing

Contact Status Values

Each contact within a batch can be in one of these states:
StatusDescription
pendingWaiting to be dispatched
dispatchedPublished to Kafka — call is being placed
in_progressCall actively ringing or in conversation
retryingScheduled for a retry attempt
followup_scheduledA follow-up call is scheduled
completedCall was answered and completed
failedCall failed (network/provider error)
busyLine was busy
no_answerNo answer within timeout
skippedManually skipped — no further attempts
max_retries_reachedExhausted all retry attempts

Endpoints

Create Batch

POST /batches/

List Batches

GET /batches/

Get Batch

GET /batches/:id

List Batch Contacts

GET /batches/:id/contacts

Export CSV

GET /batches/:id/export.csv

Pause / Resume / Cancel

Control batch execution

Force Dispatch

POST /batches/:id/dispatch

Debug Batch

GET /batches/:id/debug