Simple SMS API for SaaS
Add reliable SMS delivery to your applications to programmatically send text notifications, OTPs, and 2FA messages to users.
Grow your SaaS with SMS
Increase engagement
Keep customers happy and reduce churn with targeted SMS that build relationships.
Improve security
Show users you value their security with 2FA and one-time passwords.
Streamline support
Let customers get help when they need it with inbound SMS.
Advanced SMS API for apps
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();
}
}
Inbound message processing
Facilitate two-way messaging for users and parse inbound SMS content to your apps and CRM. Add app functionality such as the ability to add list items or create support tickets when a user sends a text.
Quick & easy bulk SMS sending
Conveniently send bulk SMS alerts to an entire list of recipients. Send emergency notifications, weather alerts, important business information, client-wide security alerts, and more.
No-code integrations for SMS
Real-time webhook notifications
Create custom workflows based on users’ actions with the Sent, Delivered, and Failed webhook events as triggers. Plus, integrate the real-time activity into your custom dashboards and apps.
Toll-free numbers for high-volume sending
Toll-free numbers have a high throughput that can handle sending thousands of SMS. You can reliably process large volumes of SaaS SMS notifications without worry.
Secure and TCPA-compliant
MailerSend is a TCPA-compliant SMS delivery service that implements the latest security and encryption protocols as well as data protection regulations. You can be confident your customers’ data will always be protected.
Award-winning technical support
Get 24/7 access to a friendly, knowledgeable, human customer support team. Whether you need help getting started or guidance on more technical aspects, a support team member will be happy to help.
SMS activity tracking
Monitor all sent messages and their statuses in real-time. Gain insights about SMS delivery to troubleshoot, learn about recipient activity, and make adjustments to SMS notifications.
Personalization options
Easily personalize bulk SMS messages for individual users with personalization variables. Include names, account information, usage details, and more in your texts.
Multi-language support
Provide SMS services for users in any language with multilingual character encoding. Tailor your SaaS messaging for each user’s language preferences to increase customer engagement.
Explore the possibilities of SMS for SaaS
-
SaaS OTPs (One-time Passwords)
Make user accounts more secure with quick and reliable delivery of SMS OTPs. -
SaaS 2FA (2-Factor Authentication)
Implement multi-layer security systems to verify the identity of users during login attempts. -
Customer Support
Add another channel to your customer support options with SMS communication. -
Billing notifications
Keep customers informed about upcoming and processed payments.
Scalable, secure SMS delivery for SaaS
Hobby
Starter
Professional
Enterprise
What our customers think
Frequently Asked Questions
How to send SMS from a web application or website?
Once you’ve purchased a phone number, you can easily start sending SMS messages with the MailerSend API. This involves creating an API token and making a request. You can learn more about how to start sending SMS in our guide. Also, check out this guide on how to send SMS with Python.
Can MailerSend's SMS API handle high volumes of messages for large SaaS companies?
Yes, MailerSend’s sending infrastructure is built to handle large volumes of SMS messages for SaaS businesses. What’s more, we use toll-free phone numbers which are also ideal for sending SMS at scale.
Are there any limitations on the geographic reach of MailerSend's SMS services?
MailerSend’s SMS service is currently available for the USA and Canada. More availability is coming soon.
Is there a trial period for MailerSend's SMS API?
Starter and Professional plan users have access to a free trial phone number that they can use for testing purposes.
How easy is it to integrate MailerSend's SMS API with existing SaaS applications?
With MailerSend’s powerful SMS API, SDKs, documentation and no-code integrations, it’s very easy for developers to integrate SMS sending into their existing SaaS applications. View the API and developers documentation for more.
How does MailerSend ensure compliance and data privacy in SMS communications?
MailerSend is TCPA compliant and also follows the required regulations for data privacy. The messaging itself is protected by the latest security and encryption protocols.
What support options are available for MailerSend's SMS API users?
MailerSend prides itself on its award-winning support which is available 24/7 via email and live chat. Our customer support team can provide support for implementation, features and technical issues.
Try MailerSend for free
Sign up now to experience all of the features that make MailerSend a great SaaS messaging solution. Get 3,000 emails/month free.