Contents

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

StatusMeaningFinal
queuedAccepted by the API, waiting to be processed.
processingBeing routed to a provider.
submittedHanded to a provider.
sentThe provider confirmed it left their platform.
deliveredDelivered to the handset.yes
failedCould not be delivered. failure.code: DELIVERY_FAILED.yes
rejectedRefused: invalid number, policy or DLT mismatch. failure.code: MESSAGE_REJECTED.yes
expiredNo 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

  • limit is 1–100 (default 20).
  • Pass pagination.nextCursor as cursor until hasMore is false.
  • Cursors are opaque; do not construct or store them long-term.