Send Batch SMS Messages
This document will describe how to send batch SMS messages.
Batch messages allows you to send up to 1,000 messages per Batch SMS request. These are useful for large campaigns.
POST
/send/batch
POST
/send/batch
Send batch SMS messages to a number of receipients.
curl -X POST "https://api.mobivatebulksms.com/send/batch" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer [API KEY]' \
-d '{ "routeId": "mglobal", "messages": [ { "originator": "Brand", "recipient": "440000001", "text": "This is a test message" } ] }'
Send a batch SMS message for later delivery
curl -X POST "https://api.mobivatebulksms.com/send/batch" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer [API KEY]' \
-d '{ "routeId": "mglobal", "scheduleDateTime": "2024-01-26T15:30:00+0530", "messages": [ { "originator": "Brand", "recipient": "440000001", "text": "This is a test message" } ] }'
Please note, to schedule a date time as a parameter, the date time parameter must be set to a time in the future.
Send a batch SMS message with a URL we want to shorten
curl -X POST "https://api.mobivatebulksms.com/send/batch" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer [API KEY]' \
-d '{ "routeId": "mglobal", "shortenUrls": true, "messages": [ { "originator": "Brand", "recipient": "440000001", "text": "Hey check out this cool video I found: https://vimeo.com/751393851?autoplay=1" } ] }'
Headers
Content-Type
application/json
Authorization
Bearer [Api-Key]
Body
routeId
string
Yes
Route for messages.
messages
string
Yes
A list of messages to send. See message arguments.
name
string
No
Campaign name, used for reporting purposes.
shortenUrls
boolean
No
Default: false (URLs will not be shortened) Set to true to shorten long URLs Reduces message size and allows click tacking.
excludeOptouts
boolean
No
Default: true (Optouts are excluded) Set to false to turn off Optout filtering.
excludeDuplicates
boolean
No
Default: true (Duplicates are excluded) Set to false if you wish to send multiple messages to the same recipient(s).
scheduleDateTime
datetime
No
Default: null (Campaign is sent immediately) Specify a date/time to schedule delivery at a later date Example: 2024-01-26T15:30:00+0530
Arguments
Message Arguments are largely the same as when sending a single SMS message, see here.
originator
string
Yes
Originator/SenderID for SMS messages (MaxLength - AlphaNumeric: 11, numeric: 15).
recipient
string
Yes
Recipient of SMS Message (Numeric only, MSISDN format inc international prefix).
body
string
Yes
Message text.
routeID
string
No
Specified message route.
reference
string
No
Your reference, will be provided as part of the delivery receipt for correlation.
Response
{
"id":"fd9157b74bd3475d8716a69683066f0f",
"name":null,
"routeId":"mglobal",
"shortenUrls":false,
"spreadHours":0,
"excludeOptouts":true,
"excludeDuplicates":false,
"scheduleDateTime":null,
"recipients":[
{
"originator":"Brand",
"recipient":"440000001",
"text":"Test Message",
"reference":"ref-001",
"routeId":null
}
]
}
Last updated
Was this helpful?