SMS Send Overview

What is Send SMS API?

The MainBrainer Send API helps you programmatically send SMS messages from your web application to mobile numbers across the world. The Send API uses HTTP request and a RESTful endpoint structure to ensure flexibility and scalability for our customers.

How to use the Send API to send messages?

Step 1: Create a free account on MainBrainer.com

Create your account on MainBrainer. Log into your account and get your account’s private token from the Account Configuration menu.

Step 2: Send your first SMS using the SMS Send API

To help you get started, use the Send API endpoint to send a test message from your web application. This should help you get familiarized with the MainBrainer SMS sending procedure.

Note

In case you wish to know more about how the SMS sending procedure works on MainBrainer, please refer to our detailed article series on the same.

Step 3: Enter the relevant sending details as parameters in your API call

When sending a new message via the API, here are the parameters that need to be defined.

• Sender Name - This parameter specifies the name that you want to be displayed as the sender name for the SMS. This name helps the SMS recipients identify who sent them SMS. Note that you’ll need to create and verify a sender name before you can use it to send SMSs. If you don’t wish to create a custom sender name, you can use MainBrainer as the sender name for your SMS sendings.

• Body --- This parameter includes the complete text of the SMS you wish to send.

• Recipient – This parameter specifies the mobile number to which you want to send an SMS. Also, ensure that you prefix the country code to the mobile number. For example, when sending messages to a mobile number in Norway, the to parameter value should look like – 4793454496, where 47 is the country code for Norway, and 93454496 is the intended recipient mobile number.

Note

MainBrainer supports Alphanumeric Sender IDs for use as Sender Names. Kindly ensure that you use a sender name compliant with the rules and regulations of the country where you wish to send the SMSs.

Note

In case the message body is more than 160 GSM-7 characters long (or more than unicode 70 UCS-2 characters), your messages will be split into multiple 160-character messages and concatenated, resulting in separately billed messages.

Step 4: Monitor the delivery status of your SMS

In case you wish to get the delivery status updates for the SMSs being sent via Webhook, include the parameter – Webhook URL in your SMS Send request.

Alternatively, you can retrieve the delivery status using the endpoint Get SMS Delivery Status. Pass the response ID value received in step 3 above as the input parameter, and the endpoint will return the delivery status for the specified SMS.

Copy
Copied
  •	Queued,
  •	Submitted,
  •	Delivered, or
  •	Undelivered/Failed

Here is a sample GET request to retrieve the latest delivery status for an SMS:

Copy
Copied
{
  "Id": "65564096-7ae8-eb11-84b6-af932d533f34",
  "Status": 100,
  "StatusText": "Sent Successfully",
  "StatusFailedReason": "",
  "Details": [{"Total":1,"Queued":0,"Submitted":1,"Delivered":0,"Failed":0,"Bounced":0}]
}
Note:

When you send SMSs to your CRM contacts, SMSs will only be delivered to the contacts if their Contact Property – SMS Opt-in Marketing’ has the value ‘SMS Opt-in. To know more about our CRM and the opt-in procedures.

Limits

MainBrainer Send SMS API Call will queue the messages for delivery subject to standard SMS limits.