Sending
Bulk SMS
POST /api/v1/sms/bulk: send up to 1,000 personalised messages in one request.
POST
/api/v1/sms/bulkScope: sms:sendRequest#
| Field | Type | Description |
|---|---|---|
recipientsrequired | array | 1 to 1,000 items: { to, message?, variables? }. A plain array of number strings is also accepted. |
messagerequired | string | Default message. Supports {{variable}} placeholders filled from each recipient's variables. |
sender_idoptional | string | Approved sender ID. |
typeoptional | string | transactional (default) or promotional. |
referenceoptional | string | Your reference for the whole batch. |
schedule_atoptional | ISO 8601 string | Optional 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.