Przejdź do głównej zawartości

Send SMS Batch (v2)

POST 

/api/v2/sms/batches

Accepts up to 1000 messages in one request and sends them in the background.

The batch is accepted as a whole or not at all: one invalid message rejects the request with 422 and points at it (messages.3.msisdn), and a balance that does not cover the whole batch returns 402. An accepted batch returns 202 with status pending and a price estimate; the amount is reserved when the batch is processed, usually within seconds. Follow progress and per-message results with GET /api/v2/sms/batches/{id}.

If the balance is used up between acceptance and processing, the batch ends as rejected with failure_reason: insufficient_funds - nothing is sent or charged, and you can send it again.

Request​

Responses​

Batch accepted (or replayed for the same Idempotency-Key).

Response Headers
    Location

    URL of the created resource.

    Idempotent-Replayed

    true when this response replays an earlier request with the same Idempotency-Key.