Delivery status
Message statuses, reports and pagination.
Every SMS and WhatsApp message — including OTP deliveries — has a messageId and one status, the same for every provider. Provider names and vendor error codes are never exposed.
Statuses
| Status | Meaning | Final |
|---|---|---|
queued | Accepted by the API, waiting to be processed. | |
processing | Being routed to a provider. | |
submitted | Handed to a provider. | |
sent | The provider confirmed it left their platform. | |
delivered | Delivered to the handset. | yes |
failed | Could not be delivered. failure.code: DELIVERY_FAILED. | yes |
rejected | Refused: invalid number, policy or DLT mismatch. failure.code: MESSAGE_REJECTED. | yes |
expired | No final report within the validity period. | yes |
Uncertain submissions are never resent
If a provider hand-over times out, the message stays
submitted rather than risk a duplicate SMS to your customer. It reaches a final status when the delivery report arrives or the validity period ends.Get one message
curl https://sms21.in/v1/messages/msg_… -H "X-API-Key: $SMS21_API_KEY"Requires the reports:read scope. A key only sees messages of its own project; anything else is 404. Prefer webhooks; if you must poll, back off (5 s, 30 s, 2 min…) and stop at a final status.
List and filter
GET /messages returns the project’s messages, newest first. Filters: status, type (otp, transactional, promotional), channel, mobile, templateId, createdFrom, createdTo (ISO 8601). Unknown parameters are rejected.
curl "https://sms21.in/v1/messages?status=failed&createdFrom=2026-09-01T00:00:00Z&limit=100" \
-H "X-API-Key: $SMS21_API_KEY"
# {"success":true,"data":[…],"pagination":{"limit":100,"hasMore":true,"nextCursor":"…"}}Pagination
limitis 1–100 (default 20).- Pass
pagination.nextCursorascursoruntilhasMoreisfalse. - Cursors are opaque; do not construct or store them long-term.