SMS

Next level messaging

Reach your customers globally with quick, scalable, and customizable message

Integrate our developer-friendly SMS API to send and receive text messages. Our distributed carrier network and intelligent routing ensure the highest delivery and lowest latency.

curl --request POST \
  --url https://control.msg91.com/api/v5/flow/ \
  --header 'Authkey: <authkey>' \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{"template_id":"EntertemplateID","sender":"EnterSenderID","short_url":"1 (On) or 0 (Off)","mobiles":"919XXXXXXXXX","VAR1":"VALUE 1","VAR2":"VALUE 2"}'
const http = require("https");

const options = {
  "method": "POST",
  "hostname": "control.msg91.com",
  "port": null,
  "path": "/api/v5/flow/",
  "headers": {
    "Authkey": "<authkey>",
    "accept": "application/json",
    "content-type": "application/json"
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  template_id: 'EntertemplateID',
  sender: 'EnterSenderID',
  short_url: '1 (On) or 0 (Off)',
  mobiles: '919XXXXXXXXX',
  VAR1: 'VALUE 1',
  VAR2: 'VALUE 2'
}));
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://control.msg91.com/api/v5/flow/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"template_id\":\"EntertemplateID\",\"sender\":\"EnterSenderID\",\"short_url\":\"1 (On) or 0 (Off)\",\"mobiles\":\"919XXXXXXXXX\",\"VAR1\":\"VALUE 1\",\"VAR2\":\"VALUE 2\"}",
  CURLOPT_HTTPHEADER => [
    "Authkey: <authkey>",
    "accept: application/json",
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://control.msg91.com/api/v5/flow/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["Authkey"] = '<authkey>'
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request.body = "{\"template_id\":\"EntertemplateID\",\"sender\":\"EnterSenderID\",\"short_url\":\"1 (On) or 0 (Off)\",\"mobiles\":\"919XXXXXXXXX\",\"VAR1\":\"VALUE 1\",\"VAR2\":\"VALUE 2\"}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("control.msg91.com")

payload = "{\"template_id\":\"EntertemplateID\",\"sender\":\"EnterSenderID\",\"short_url\":\"1 (On) or 0 (Off)\",\"mobiles\":\"919XXXXXXXXX\",\"VAR1\":\"VALUE 1\",\"VAR2\":\"VALUE 2\"}"

headers = {
    'Authkey': "<authkey>",
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("POST", "/api/v5/flow/", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Features
feature
Intelligent SMS Retry Algorithm Our SMS API service finds the most reliable and quickest telecom route for every message you send. In case the SMS fails, our algorithm retries it within a fraction of a second and delivers your messages using another telecom route.
feature
Reliable, Scalable, and Feature-Rich SMS API Available in all programming languages, integration with our SMS API for developers is quick, easy, and seamless. Built for developers by developers, explore quick-start guides, code snippets, SDKs, and more.
feature
Enjoy Low Latency Delivery-Worldwide Reach 210+ countries reliably with localized telecom operators. The automatic rerouting of global traffic in real-time helps us avoid outages and latency.
feature
Multi-Lingual Support Converse with your audience in their local language and take your customer engagement to the next level. Build customer confidence as you send messages in their regional language anywhere across the world.
feature
Personalized SMSIncrease customer satisfaction with meaningful engagement. Don’t just engage with customers, create personalized experiences by adding characteristics to your messages. Harness the power of personalization to boost your ROI.
feature
Link ShortenerTransform a long URL into a shorter, more readable link. Enable the deeply integrated link shortener to convert long URLs to shorter links. Get a detailed user report on clicks with mobile numbers, browser, and IP.
feature
Enhanced AnalyticsReal-time graphical view for monitoring and troubleshooting. Optimize your SMS delivery, measure the effectiveness of your campaigns, and improve ROI. Always be in the know which messages customers have received and which are missed.

Revolutionizing Business Communication: Empower Your Connectivity with MSG91's SMS Services and API Solutions

MSG91 is an SMS service provider that helps businesses improve their communication. They offer transactional SMS services and a robust SMS API for developers. With their services, businesses can engage with clients and partners, send customizable messages globally, and benefit from features like real-time campaign monitoring and multilingual support. MSG91 also provides comprehensive support and cost-effective solutions. They aim to transform business communication by enhancing connectivity and engagement with customers.

FAQs

An SMS API for developers provides functions, methods, and endpoints to interact with an SMS gateway. Developers can request the API to send messages, retrieve delivery reports, manage contacts, and perform other SMS-related operations. The API handles the processing and delivery of the messages, ensuring seamless communication between the application and the recipients.

An SMS API can send transactional messages, such as order confirmations, appointment reminders, and account notifications. Developers can integrate the API into their systems to trigger automated messages based on specific events or conditions, ensuring timely and relevant customer communication.

When a user initiates the authentication process the application or system generates a unique OTP or verification code. The API then sends this code to the user's generated mobile number via SMS. The user receives the SMS and enters the code into the application or system, which verifies its correctness. If the code matches, the user is granted access or completes the authentication process successfully. This is how SMS authentication API works.
Start building your ideal customer engagement experience
Trusted by 30,000+ global businesses
RazorpayXiaomiUnacademyDream11IndeedIndian OilIxigo