Skip to main content

Endpoint

GET https://api.graine.ai/api/v1/batches/{batch_id}/debug Returns diagnostic information about a batch’s internal state. Use this when a batch is in_progress but calls don’t seem to be going out.

Path Parameters

Headers

Example Request

Response

200 OK — Healthy batch

200 OK — Stuck batch

Response Fields

How to Interpret Results

Cause: The Apollo worker container is not running or not connected to Kafka, so PENDING contacts are never being consumed and dispatched.Fix:
  1. Restart the worker container
  2. Wait ~30 seconds for it to reconnect
  3. POST to /batches/{id}/dispatch to re-publish pending contacts
Cause: The telephony provider (RotaryRouter / Jambonz) is accepting calls but not sending status webhooks back to Apollo.Fix:
  1. Check RotaryRouter logs for webhook delivery failures
  2. Verify the APOLLO_WEBHOOK_URL env var in RotaryRouter points to Apollo’s /webhooks/call-status
  3. Check network connectivity between RotaryRouter and Apollo
Cause: Contacts aren’t answering. Could be time-of-day, invalid numbers, or carrier blocking.Fix:
  • Review working_hours configuration — are you calling at the right time?
  • Check if specific area codes or number ranges are failing
  • Consider reducing concurrency to avoid appearing as spam
Cause: Counters might show stale data from the batch document.Fix: Counters in GET /batches/{id} are always computed live. If they look wrong, compare with GET /batches/{id}/contacts status breakdown to see the ground-truth per-contact status.

Next Steps

Force Dispatch

Re-publish pending contacts to Kafka

Get Batch

Check current batch status and counters