MainBrainer SMS API

Download OpenAPI specification:

MainBrainer SMS API for public

SMS

Send Single SMS

Send SMS API

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. The SMSs can be sent immediately or scheduled for delivery at a later date and time.

Authorizations:
Bearer
Request Body schema:
required

This endpoint is especially useful for sending recipient-specific one-time alert messages or updates, such as OTPs or transaction updates

recipient
required
integer <int64>

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

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@movitext.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.

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 pairs.

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)

webHookUrl
string or null

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

unsubscribeId
string <uuid>

Responses

Request samples

Content type
{
  • "recipient": 0,
  • "senderName": "MainBrainer",
  • "isBodyEncrypted": false,
  • "body": "Hi, test sms from MainBrainer.",
  • "personalizationSubstitutionTags": [
    ],
  • "scheduleDateTime": "2019-08-24T14:15:22Z",
  • "landingPageId": "00000000-0000-0000-0000-000000000000",
  • "shortner": {
    },
  • "webHookUrl": "string",
  • "unsubscribeId": "20d79bc6-4ce5-4654-9cdd-d12b55cf4944"
}

Response samples

Content type
{
  • "queueId": "string",
  • "QueuedTimestamp": 0
}

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.

Authorizations:
Bearer
Request Body schema:
required

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

listId
Array of strings or null <uuid> [ items <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).

senderName
required
string [ 6 .. 11 ] characters
Default: "pincle"

The sender name you wish to use for your SMS sending (pincle is the default sender name available for use, if you wish to use a custom sender name, write to us at support@movitext.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)

webHookUrl
string or null

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

unsubscribeId
string <uuid>

Responses

Request samples

Content type
{
  • "listId": [
    ],
  • "recipients": [
    ],
  • "senderName": "pincle",
  • "isBodyEncrypted": false,
  • "body": "Hi, test sms from MainBrainer.",
  • "scheduleDateTime": "2019-08-24T14:15:22Z",
  • "landingPageId": "00000000-0000-0000-0000-000000000000",
  • "shortner": {
    },
  • "webHookUrl": "string",
  • "unsubscribeId": "20d79bc6-4ce5-4654-9cdd-d12b55cf4944"
}

Response samples

Content type
{
  • "queueId": "string",
  • "QueuedTimestamp": 0
}

Send Predefined SMS

Trigger SMS sendings on the basis of pre-saved templates

This endpoint is used to trigger SMS sendings on the basis of pre-saved SMS trigger templates. SMS trigger templates allow you to save all the details necessary to ‘trigger’ an SMS sending as a template. These templates contain SMS sending details like the Sender name, the SMS content and text, and unsubscribe options at the time of campaign distribution, etc.

Authorizations:
Bearer
Request Body schema:
required

This endpoint is used to trigger SMSs on the basis of details pre-saved as SMS trigger templates – no need to pass the details manually.

predefinedTemplateId
required
string
Default: "TSMS-899"
listId
Array of strings or null <uuid> [ items <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.

scheduleDateTime
string or null <date-time>

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

Array of objects or null (Recipients)

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

webHookUrl
string or null

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

Responses

Request samples

Content type
{
  • "predefinedTemplateId": "TSMS-899",
  • "listId": [
    ],
  • "scheduleDateTime": "2019-08-24T14:15:22Z",
  • "recipients": [
    ],
  • "webHookUrl": "string"
}

Response samples

Content type
{
  • "queueId": "string",
  • "QueuedTimestamp": 0
}

Get SMS Delivery Status

Retrieve the delivery status of the sent SMS(s).

When sending SMS(s) using the MainBrainer SMS Send APIs, the APIs return a QueueId value that can then be used to retrieve the delivery status for the sent SMSs. Use this endpoint to retrieve the delivery status updates for an SMS sending QueueId. The response will include the following delivery statuses as per the latest status of the sent SMS:

  • Total
  • Submitted
  • Processed
  • Delivered
  • Failed
Authorizations:
Bearer
path Parameters
id
required
string <uuid>

The queueId value received as response from the endpoints SMS/Send Batch, SMS/Single send, and Predefined Template SMS Send.

Responses

Response samples

Content type
{
  • "Id": "string",
  • "Status": 0,
  • "StatusText": "string",
  • "StatusFailedReason": "string",
  • "Details": [
    ]
}