Send Batch SMS

Send Bulk SMS to your Contacts

This endpoint is especially useful for sending out marketing campaigns like promotions for upcoming sales, special discount coupons, or event promotions, etc., to your contact lists.

SecurityBearer
Request
Request Body schema:

This endpoint is used to send an SMS to multiple recipients in one go.

listId
Array of strings or null <uuid>

The list ID(s) of the contact lists to which you wish to send the SMS. In case you wish to send the SMS to multiple lists, pass the relevant list IDs as an array.

required
Array of objects (Recipient)

The `mobile number(s) to which you want to send the SMS (along with the country code).

Array
mobileNo
required
integer <int64>
Array of objects or null (PersonalizationSubstitutionTag)

Insert dynamic data at the time of SMS sending, follow the pattern tagName:tagValue to substitute for the key/value pair

Array
tagName
string or null
tagValue
string or null
senderName
required
string [ 6 .. 11 ] characters
Default: "MainBrainer"

The sender name you wish to use for your SMS sending (MainBrainer is the default sender name available for use, if you wish to use a custom sender name, write to us at support@mainbrainer.com).

isBodyEncrypted
required
boolean
Default: false

Pass the parameter value as Isbodyencrypted if you wish to encrypt your message body.

body
required
string
Default: "Hi, test sms from MainBrainer."

The complete text of the SMS that you wish to send.

scheduleDateTime
string or null <date-time>

The scheduled date and time for the message sending in RFC3339 format (Y-m-d TH:i:sP).

landingPageId
string or null <uuid>
Default: "00000000-0000-0000-0000-000000000000"

Landing page ID of the landing page you wish to send with the SMS.

object (Shortner)

The shortener you wish to use for the landing page URL (sms.club is the default shortener available for use, in case you wish to use a custom URL shortener, create it using the MainBrainer UI)

shortnerUrl
required
string
Default: "sms.club"
isUniqueUrl
required
boolean
Default: true
webHookUrl
string or null

The webhook URL where you want to receive delivery status updates for the SMS being sent.

unsubscribeId
string <uuid>
Responses
202

Success

400

Bad Request

401

Unauthorized

409

Conflict

422

Client Error

500

Server Error

post/sms/batch
Request samples
{
  • "listId": [
    • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
  • "recipients": [
    • {
      • "mobileNo": 0,
      • "personalizationSubstitutionTags": [
        • {
          • "tagName": "string",
          • "tagValue": "string"
          }
        ]
      }
    ],
  • "senderName": "MainBrainer",
  • "isBodyEncrypted": false,
  • "body": "Hi, test sms from Mainbrainer.",
  • "scheduleDateTime": "2019-08-24T14:15:22Z",
  • "landingPageId": "00000000-0000-0000-0000-000000000000",
  • "shortner": {
    • "shortnerUrl": "sms.club",
    • "isUniqueUrl": true
    },
  • "webHookUrl": "string",
  • "unsubscribeId": "20d79bc6-4ce5-4654-9cdd-d12b55cf4944"
}
Response samples
{
  • "queueId": "string",
  • "QueuedTimestamp": 0
}