Send messages

Send one body to many recipients in a single request. The body is either inline content (channel + content) or a saved template (template_id); its channel applies to the whole batch, and each entry in recipients carries its own destination and its own variables, substituted into the body for that recipient alone.

The response carries one result per recipient, in request order, each with the message id created for it and the status it was created with. A mixed outcome is normal:

  • pending — accepted and queued for dispatch.
  • blocked — the recipient is suppressed on this channel, so it was never dispatched and was not charged.
  • error — it never reached a carrier: no sender configured for the channel, referenced media unavailable, a variable the body references missing for that recipient, or a body that rendered empty.

Only pending results go on to a carrier; the other two are already terminal. Send an Idempotency-Key to make a retry safe: replaying the key returns the original results instead of sending — and charging — a second time.

Body Params

A batch send: one body — inline content or a saved template — rendered per recipient and delivered over its channel.

body
required

What to send: inline content or a saved template reference.

uuid

Campaign to attribute every message this request creates to, so the send shows up under the campaign_id list filter. Must be a campaign of yours; an unknown id is rejected with 404. Omit it for an ad-hoc send.

recipients
array of objects
required
length between 1 and 50000

Recipients of this batch, 1 to 50000. Each yields its own message, its own result entry, and its own charge.

recipients*
Headers
string
length ≤ 255

A client-generated key that makes this request safe to retry. Replaying a key returns the original response instead of repeating the write, so a timeout or a network failure cannot send twice or charge twice. Reusing a key with a different request body is refused with 409 conflict. Keys are scoped to your account and retained for 24 hours.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json