Check a batch
Get the latest counts for a bulk send: how many messages were delivered, failed or are still on their way.
GET
/api/v1/batches?batchReference=B00042Request
batchReferencequery stringRequiredThe batchReference returned when you sent the bulk SMS, for example B00042.
curl -X GET "https://api.inboxiq.co.zw/api/v1/batches?batchReference=B00042" \ -H "Authorization: Basic $(echo -n 'username:password' | base64)" \ -H "key: YOUR_API_KEY"Response
{ "batchReference": "B00042", "batchStatus": "SENT", "numberOfSms": 2480, "delivered": 2341, "failed": 12, "unknownDelivery": 0}The fields are the same as the bulk SMS response. The counts are recalculated each time you call this endpoint.
Batch statuses
| Status | Meaning |
|---|---|
| PENDING | The batch has been created and no messages have been counted yet. |
| SENDING | Some messages are still queued and being sent. |
| SENT | All messages have been sent and some are waiting for a delivery report. |
| COMPLETED | Every message has a final status. |
| FAILED | Every message in the batch failed. |
How often to check
- Most messages are delivered within a minute, but some networks report delivery later.
- Checking every few minutes is plenty. Stop once the batch is
COMPLETEDorFAILED. - You can only check batches sent from your own account. Other references return
403 Forbidden.