Sending
SMS statuses & batch sending
Read confirmed message state without sending duplicates.
#Steps
- Send POST /v1/messages with an Idempotency-Key and retain messageId. POST /v1/messages/batch accepts 1–25 SMS items, each with its own idempotencyKey (prepaid and postpaid accounts).
- Use GET /v1/messages/{id} for one message or POST /v1/messages/statuses with 1–100 unique ids. messages.read is required; foreign and missing IDs are indistinguishable.
- Read status_info.outcome: pending means processing continues, uncertain requires clarification, delivered has delivery confirmation, and not_delivered records a negative outcome. Preserve unknown future status values.
- HTTP 202 confirms platform admission, not delivery. Batch sending returns HTTP 200 with a separate HTTP result for every item; some items may be accepted while others are rejected.
- Follow poll_after_seconds. Retrying after a network error: repeat a single send (prepaid or postpaid account) or a batch item with the same key and the same payload — the original message is returned (duplicate:true) with no second send; the same key with a different payload is refused with 409 idempotency_conflict. If the original send of a postpaid account was refused with 402 insufficient_credit, a repeat with the same key returns 402 again; after topping up, use a new key. The answers 409 idempotency_in_progress and 409 payment_mode_changed carry retryable:true: no message was created; repeat later with the same key and the same payload. resubmit_safe:false means a status read never authorizes sending a new copy.
- prepared, queued, pending — Queued or being prepared; not delivery confirmation.
- retrying — Platform retry in progress. Do not send a duplicate.
- sent — Submitted to transport; await delivery evidence. Limitation of the current version: if no delivery report arrives, the platform does not move the message to a final status after any time; it stays sent (outcome pending). The absence of a confirmation does not mean the message was not delivered.
- submission_ambiguous, ambiguous — Submission outcome is uncertain. Blind retries can duplicate delivery.
- failed, throttled — Failure or throttling recorded; current runtime can still perform fallback. This value alone is not proof of final failure.
- delivered — Platform has delivery confirmation.
- cancelled, suppressed, blocked_consent, expired, rejected, undeliverable, rejected_insufficient_credit — Not delivered under the recorded cancellation, suppression, consent, expiry, rejection or credit outcome. Financial outcome must be read from the ledger.
#Keep in mind
sent and submitted_segments indicate transport submission, not handset delivery. failed alone may still enter fallback where a fallback route is configured for the destination. Customer delivery webhooks are not published in this version.