Skip to content
MZSMS

Sending

Bulk SMS

POST /api/v1/sms/bulk: send up to 1,000 personalised messages in one request.

POST/api/v1/sms/bulkScope: sms:send

Request#

Parameters
FieldTypeDescription
recipientsrequiredarray1 to 1,000 items: { to, message?, variables? }. A plain array of number strings is also accepted.
messagerequiredstringDefault message. Supports {{variable}} placeholders filled from each recipient's variables.
sender_idoptionalstringApproved sender ID.
typeoptionalstringtransactional (default) or promotional.
referenceoptionalstringYour reference for the whole batch.
schedule_atoptionalISO 8601 stringOptional delayed send.
curl -X POST https://sms.marketian.net/api/v1/sms/bulk \
  -H "Authorization: Bearer $MZSMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sender_id": "YOURBRAND",
    "type": "transactional",
    "message": "Hi {{name}}, your order {{order}} has shipped.",
    "recipients": [
      { "to": "+8801XXXXXXXXX", "variables": { "name": "Rahim", "order": "#1001" } },
      { "to": "01XXXXXXXXX", "variables": { "name": "Karima", "order": "#1002" } }
    ]
  }'

Partial acceptance#

Invalid numbers, duplicates, blocked numbers and (for promotional messages) opted-out numbers are returned in errors with a code per recipient. Valid recipients are still accepted and charged. If no recipient is valid, the request fails with 422 and nothing is charged. The balance check covers the whole accepted batch: if the total exceeds your balance, nothing is sent.

When to use campaigns instead#

For marketing sends to your contact groups, scheduled sends to thousands of numbers, or anything that needs review, use Dashboard → Campaigns. Campaigns resolve groups at send time, so recent opt-outs are respected.