Transactional SMS
Transactional SMS APIEnjoy the over 98% open rate of transactional SMS with MailerSend’s SMS API*. Enhance the customer experience by sending high-volume, toll-free text messages using a unique and recognizable phone number.
Deliver all types of transactional SMS messages
Appointment reminders
Remind clients and patients about upcoming appointments and improve late and no-show rates.
Order confirmations
Reassure customers that their order has been received with an order confirmation SMS.
OTPs and 2FA
Make your app more secure with one-time password and 2-factor authentication text messages.
Payment and billing notifications
Keep customers in the know about payment and billing activity with a quick, convenient SMS.
Security alerts
Let customers know immediately about potential security breaches or unauthorized use of their accounts.
Shipping & delivery notifications
Keep customers updated about the status of their order by telling them when its shipped, out for delivery and delivered.
Reach more customers with transactional messaging
Multiple sending configurations
Customize messages to fit your brand
Developer-friendly resources
curl -X POST \
https://api.mailersend.com/v1/sms \
-H 'Content-Type: application/json' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'Authorization: Bearer {place your token here without brackets}' \
-d '{
"from": "+18332552485",
"to": [
"+12345678900",
],
"text": "This is just a friendly hello"
}'
use MailerSend\MailerSend;
use MailerSend\Helpers\Builder\SmsParams;
$mailersend = new MailerSend(['api_key' => 'key']);
$smsParams = (new SmsParams())
->setFrom('+12065550101')
->setTo(['+12065550102'])
->addRecipient('+12065550103')
->setText('Text');
$sms = $mailersend->sms->send($smsParams);
php artisan make:mail ExampleEmail
Mail::to('you@client.com')->send(new ExampleEmail());
"use strict";
require('dotenv').config()
const MailerSend = require("../../src/MailerSend");
const SmsParams = require("../../src/SmsParams");
const mailersend = new MailerSend({
api_key: process.env.API_KEY,
});
const recipients = [
"+18332647501"
];
const smsParams = new SmsParams()
.setFrom("+18332647501")
.setRecipients(recipients)
.setText("This is the text content");
mailersend.sendSms(smsParams);
package main
import (
"context"
"os"
"fmt"
"time"
"github.com/mailersend/mailersend-go"
)
func main() {
// Create an instance of the mailersend client
ms := mailersend.NewMailersend(os.Getenv("MAILERSEND_API_KEY"))
ctx := context.Background()
ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
defer cancel()
message := ms.Sms.NewMessage()
message.SetFrom("your-number")
message.SetTo([]string{"client-number"})
message.SetText("This is the message content {{ var }}")
personalization := []mailersend.SmsPersonalization{
{
PhoneNumber: "client-number",
Data: map[string]interface{}{
"var": "foo",
},
},
}
message.SetPersonalization(personalization)
res, _ := ms.Sms.Send(context.TODO(), message)
fmt.Printf(res.Header.Get("X-SMS-Message-Id"))
}
from mailersend import sms_sending
from dotenv import load_dotenv
load_dotenv()
mailer = sms_sending.NewSmsSending(os.getenv('MAILERSEND_API_KEY'))
# Number belonging to your account in E164 format
number_from = "+11234567890"
# You can add up to 50 recipient numbers
numbers_to = [
"+11234567891",
"+11234567892"
]
text = "Hi {{name}} how are you?"
personalization = [
{
"phone_number": "+11234567891",
"data": {
"name": "Mike"
}
},
{
"phone_number": "+11234567892",
"data": {
"name": "John"
}
}
]
print(mailer.send_sms(number_from, numbers_to, text, personalization))
require "mailersend-ruby"
# Intialize the SMS class
ms_sms = Mailersend::SMS.new
# Add parameters
ms_sms.add_from('your-number')
ms_sms.add_to('client-number')
ms_sms.add_text('This is the message content')
personalization = {
phone_number: 'client-number',
data: {
test: 'Test Value'
}
}
ms_sms.add_personalization(personalization)
# Send the SMS
ms_sms.send
import com.mailersend.sdk.MailerSend;
import com.mailersend.sdk.exceptions.MailerSendException;
public void sendSms() {
MailerSend ms = new MailerSend();
ms.setToken("mailersend token");
try {
String messageId = ms.sms().builder().from("from phone number")
.addRecipient("to phone number")
.text("test sms {{name}}")
.addPersonalization("to phone number", "name", "name personalization")
.send();
System.out.println(messageId);
} catch (MailerSendException e) {
e.printStackTrace();
}
}
Spark conversations
Easily scale sendings with bulk transactional SMS
Transactional SMS integrations
Plus, the same great MailerSend features:
Easy management
Manage multiple phone numbers from your API, keeping suppressions and templates separate.
Activity & Analytics
View your activity in real-time to gain insights about SMS delivery and recipient activity and make adjustments when needed.
Account management
Effortlessly manage each user and their level of access to your emails, SMS activity or individual phone numbers.
Frequently Asked Questions
*Where is SMS coverage available?
MailerSend's transactional SMS service is currently available in North America. We are working on bringing coverage to additional regions—keep an eye on our roadmap for updates.
What types of SMS can I send?
You can send any type of message in relation to your business as long as you have received opt-in consent to send messages to the recipient’s mobile device and follow the Telephone Consumer Protection Act guidelines.
This includes, but is not limited to, shipping notifications, delivery updates, 2-factor authentication, appointment and event reminders, emergency alerts, one-time passwords, order status updates, booking/reservation confirmation and cancellation, payment and billing alerts, and general alerts, notices and updates. You cannot use the transactional SMS service to send promotional SMS messages.
How do I receive SMS replies?
With MailerSend's inbound routing feature, you can create inbound routes to have MailerSend receive incoming messages on your behalf and integrate them into your app.
Does this work for OTP’s and 2FA texts?
Yes, you can use MailerSend's SMS API to send one-time passwords (OTPs) and 2-factor authentication (2FA) texts.
How can I purchase a phone number?
All Starter, Professional, and Enterprise accounts come with a complimentary, trial phone number for testing purposes. Once you’re ready to begin sending SMS messages to your customers, you can conveniently purchase a dedicated phone number as an add-on via the Plan and Billing page in your MailerSend account. For detailed guidance, refer to our help articles on how to purchase an SMS phone number and how to start sending SMS.
MailerSend’s SMS pricing is seamlessly integrated into our paid plans. Depending on your chosen plan, you'll receive a certain number of SMS messages included.
For example:
• Our base plan includes 100 SMS messages.
• Additional SMS usage on this plan level would billed as $1.40 per 100 SMS messages.
For a comprehensive breakdown of SMS pricing and to determine which plan best suits your needs, please visit our pricing page. Here, you'll find detailed information on plan features, including email volumes, SMS allowances, and pricing for additional usage.
Do I need consent for transactional SMS?
Although opt-in consent isn’t needed for transactional email, to send messages to a recipient’s phone number, you must have first received consent to do so.
As well as complying with the Telephone Consumer Protection Act (TCPA), receiving clear, informed opt-in consent from recipients will also ensure higher levels of engagement and lower opt-out rates.
What phone number can I use?
Toll free numbers will be available for purchase through the app.
Enrich your customer communication with SMS notifications
Get started with real-time SMS service for appointment reminders, two-factor authentication, time-sensitive notifications, service alerts, booking/order confirmation, and more using our REST API.