Send Single SMS

Send an SMS to Contact

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.

Request
Security:
Bearer
Request Body schema:

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

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.

Array
tagName
string or null
tagValue
string or null
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.

Responses
202

Success

400

Bad Request

401

Unauthorized

409

Conflict

422

Client Error

500

Server Error

post/sms/single
Request samples
{
  • "recipient": 0,
  • "senderName": "MainBrainer",
  • "isBodyEncrypted": false,
  • "body": "Hi, test sms from MainBrainer.",
  • "personalizationSubstitutionTags": [
    • {
      • "tagName": "string",
      • "tagValue": "string"
      }
    ],
  • "scheduleDateTime": "2019-08-24T14:15:22Z",
  • "landingPageId": "00000000-0000-0000-0000-000000000000",
  • "shortner": {
    • "shortnerUrl": "sms.club",
    • "isUniqueUrl": true
    },
  • "webHookUrl": "string"
}
Response samples
{
  • "queueId": "string",
  • "QueuedTimestamp": 0
}