Endpoint
GEThttps://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
stuck_pending: true — worker down
stuck_pending: true — worker down
Cause: The Apollo worker container is not running or not connected to Kafka, so
PENDING contacts are never being consumed and dispatched.Fix:- Restart the worker container
- Wait ~30 seconds for it to reconnect
- POST to
/batches/{id}/dispatchto re-publish pending contacts
All contacts stuck in dispatched (never complete)
All contacts stuck in dispatched (never complete)
Cause: The telephony provider (RotaryRouter / Jambonz) is accepting calls but not sending status webhooks back to Apollo.Fix:
- Check RotaryRouter logs for webhook delivery failures
- Verify the
APOLLO_WEBHOOK_URLenv var in RotaryRouter points to Apollo’s/webhooks/call-status - Check network connectivity between RotaryRouter and Apollo
High no_answer count
High no_answer count
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
Batch completed but count looks wrong
Batch completed but count looks wrong
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