Endpoint
POSThttps://api.graine.ai/api/v1/batches/{batch_id}/dispatch
Forces a re-run of execute_batch. This re-publishes every PENDING contact in the batch to the apollo.batch.dispatch Kafka topic.
When to Use This
Use/dispatch when:
- The worker container was down at the time the batch was created — calls never went out because nobody was consuming Kafka
- A batch shows
PENDINGcontacts with stale timestamps and the debug endpoint confirms the worker is stuck - You want to manually re-trigger dispatch after a worker restart
This endpoint only re-publishes
PENDING contacts. Contacts already dispatched, completed, failed, etc. are not affected.Path Parameters
Headers
Example Request
Response
200 OK
Typical Recovery Flow
If a batch created successfully but calls never went out:1
Check Debug Endpoint
GET /batches/{id}/debug — look for diagnostics.stuck_pending: true2
Restart Worker
Restart the Apollo worker container so it reconnects to Kafka
3
Force Dispatch
POST /batches/{id}/dispatch to re-publish pending contacts4
Monitor
Poll
GET /batches/{id} and watch counters.dispatched increaseNext Steps
Debug Batch
Diagnose why calls aren’t going out
Monitor Contacts
Track per-contact status