Quick answer
An SMS gateway is the service that takes a message from your software and hands it to the mobile network for delivery to a phone. In India every commercial SMS must go out under a DLT-registered sender ID and match an approved template. OnlineSMSService gives you a REST API on every plan and SMPP 3.4 on Enterprise, at ₹0.20 per SMS on Starter or ₹0.15 on Business, excluding GST.
How an SMS gateway works in India
When your app sends an OTP or an order update, the message makes four stops before it shows up on a customer's phone. Knowing them makes it much easier to work out why a message did or didn't arrive.
- Your applicationYour website, mobile app backend, CRM or billing system sends an HTTPS request to the gateway with four things: your API key, the sender ID, the mobile numbers and the message text.
- The gatewayWe check the API key, the sender ID and your balance, work out how many SMS parts the text needs, and pass the message on to the telecom network for delivery.
- DLT scrubbing by the operatorBefore delivery, the operator checks the message against the DLT registry. Is the header registered to your business? Is there an approved template for that header, and does the text match it? For promotional messages, is the number free of DND preferences, and is it between 9 AM and 9 PM? A message that fails any check is rejected and never reaches the handset.
- The handsetThe message arrives showing a header such as
VM-ACMEIN-S. The operator then reports whether it was delivered, and that status comes back to you as a delivery report.
Header and template matching
The header is your sender ID: six characters, such as ACMEIN, registered to your business on DLT. On the phone the network adds a two-letter prefix and a one-letter suffix that tells the reader what kind of message it is: -P promotional, -S service, -T transactional and -G government (TRAI amendment, February 2025). Our guide to SMS header suffixes explains each one.
The template is the approved wording of a message, with variable parts marked as {#var#}. The fixed words must match exactly; only the variable parts can change. Suppose this template is approved for the header ACMEIN:
Your OTP for login is {#var#}. It is valid for 10 minutes. -Acme
Then this message goes through:
If your code changes "10 minutes" to "5 minutes", drops "-Acme" or adds a line about an offer, the text no longer matches. The operator blocks it, even though the gateway accepted it.
Send your first SMS through the API
Before your first live message you need an account, an API key from the web panel, and a sender ID with at least one approved template. After that, sending is a single HTTPS POST with a JSON body to https://whitelabled.securesmsc.com/api/v2/sms/send. There is no SDK to install. The request has:
Authorization: Bearer YOUR_API_KEY— your API key, in a header. Keep it on your server, never in a mobile app or browser code. Each key is locked to the first IP address that uses it, so add your server IPs to the key (API & Integrations → API Management → IP Whitelisting) before the first call.sender_id— your six-character DLT header, for exampleACMEIN.recipient— the mobile number, 10 digits (9876543210) or with +91. For up to 1,000 numbers, send arecipientsarray to/sms/send-bulkinstead.message— the text, matching one of your approved templates.
cURL
curl -X POST https://whitelabled.securesmsc.com/api/v2/sms/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"sender_id": "ACMEIN",
"recipient": "9876543210",
"message": "Your OTP for login is 482193. It is valid for 10 minutes. -Acme"
}'
A queued message returns HTTP 200 with JSON like this:
{
"success": true,
"message": "SMS queued successfully",
"data": {
"message_id": 123,
"queue_id": 123,
"status": "queued",
"estimated_delivery": "2026-11-07T09:32:00.000000Z"
}
}
Errors return "success": false with error and message, and sometimes error_code — for example HTTP 401 for a wrong key, or HTTP 422 with TEMPLATE_MISMATCH when the text doesn't match an approved template.
PHP
<?php
$otp = random_int(100000, 999999);
$ch = curl_init('https://whitelabled.securesmsc.com/api/v2/sms/send');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 10,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('OSS_API_KEY'),
'Content-Type: application/json',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'sender_id' => 'ACMEIN',
'recipient' => '9876543210',
'message' => "Your OTP for login is $otp. It is valid for 10 minutes. -Acme",
]),
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($status === 200 && !empty($result['success'])) {
// Save $result['data']['message_id'] with the login attempt
// so you can look up its delivery status later.
echo 'Queued: ' . $result['data']['message_id'] . PHP_EOL;
} else {
// Most specific first: error_code, then error, then message
$reason = $result['error_code'] ?? $result['error'] ?? "HTTP $status";
echo "Not sent ($reason): " . ($result['message'] ?? '') . PHP_EOL;
}
The same request works from any language that can make an HTTPS call. There are worked examples for PHP, Python and Node.js, and the full reference, including Java, is in the API documentation. To try a request before writing code, use the API playground.
DLT parameters: sender ID and approved template
DLT (Distributed Ledger Technology) registration is mandatory for every business that sends commercial SMS in India. Three things are registered on an operator's DLT portal: your business as an entity, your sender IDs (headers) and your message templates. Each API field ties back to one of them:
| API field | What DLT requires | Common mistake |
|---|---|---|
sender_id | A six-character header registered to your entity | Using a header that belongs to a different entity or was never registered |
message | Text that matches an approved template linked to that header, with only the {#var#} parts changed | Editing the fixed wording in code, or adding a line the template doesn't have |
recipient | Promotional templates reach only non-DND numbers, 9 AM to 9 PM. Service and transactional templates go 24×7, including to DND numbers. | Sending an offer through a promotional template at 10 PM |
Before you file a template, run the wording through our DLT template checker, and read the guide to DLT template variable tags if you're unsure where the {#var#} parts should go.
We can file DLT for you. Filing your entity, sender ID and templates costs ₹5,900 (including 18% GST) and is valid for one year and renewed every year. If you already have a DLT entity, linking it is free: you add us as your telemarketer. KYC needs proof of business (GST certificate, certificate of incorporation or Udyam registration), proof of business address, ID of the authorised signatory and an authorisation letter on your letterhead (we send drafts). We usually review KYC within one working day. The DLT registration guide covers each step.
SMPP 3.4 vs HTTP API: which should you use?
Both routes reach the same networks under the same DLT rules. The difference is how your system talks to the gateway.
| HTTP (REST) API | SMPP 3.4 | |
|---|---|---|
| Connection | One HTTPS request per send | A persistent TCP session (a "bind") that stays open |
| What you need | Any language that can make an HTTP request | An SMPP client library or an SMS platform that already speaks SMPP |
| Delivery reports | Delivery reports in the panel; webhooks to your URL on Business and above | Returned over the same bind as deliver_sm messages |
| Suits | Apps, websites, CRMs, OTPs, order updates — most businesses | Aggregators, resellers and platforms with steady high volume |
| Available on | All plans | Enterprise |
A simple rule: start with the HTTP API. It takes minutes to integrate, and there's no connection to keep alive. Move to SMPP when you already run software built around SMPP — a reseller platform or an in-house SMSC client, for example — or when you send enough volume that one long-lived connection is easier to manage than many separate requests. SMPP binds come with the Enterprise plan, which also includes 24/7 phone support and a dedicated account manager. See SMPP connectivity for details.
Delivery reports and webhooks
A success response from the API means the gateway has accepted your message. Whether it was delivered is decided later, by the operator and the handset. That's why the delivery report matters more than the API response.
- Save the message ID. Store the
message_idfrom every send against your own record — the login attempt, the order, the invoice — so you can look up its status withGET /sms/status/{message_id}. GET calls are off for new keys until you tick "Allow GET Method" for the key. - Use the panel for a quick look. Delivery reports are on every plan, and you can export them as CSV for Excel or your BI tool.
- Use webhooks for automation. On Business and above, when a message reaches its final status we call a URL on your server with a GET request carrying
messageid(the broadcast ID; the bulk endpoint returns it asbroadcast_id),status,numberanddate. Your app can mark an OTP as delivered, alert support when an important message fails, or flag a number that keeps failing. - Make your webhook endpoint quick. Return a 200 response within 10 seconds and do the heavy work in a queue; if your URL fails, we try once more after 60 seconds. Handle the same report arriving twice without double-counting, keyed on the message ID and number.
Billing is per delivered message. A message rejected by DLT scrubbing shows up in your report as failed, and the most common cause is a text that doesn't match its template — check the wording first.
SMS gateway pricing
| Plan | Price per SMS | Monthly volume | Gateway features |
|---|---|---|---|
| Starter | ₹0.20 | Up to 10,000 | Custom sender IDs, web panel, CSV upload, scheduling, API access, delivery reports, email support |
| Business | ₹0.15 | Up to 1,00,000 | Everything in Starter, plus full API and webhooks, advanced analytics and priority support |
| Enterprise | Custom | Above 1,00,000 | Volume discounts, SMPP 3.4 binds, 24/7 phone support, dedicated account manager, SLA and custom integration |
There's no setup fee and no minimum top-up, and credits never expire. On our priority OTP route, OTPs are typically delivered in 2–6 seconds, and the API has 99.9% uptime.
One thing to watch is message length. A message of up to 160 characters is one SMS; anything longer is split into parts of 153 characters, and each part is billed as one SMS. Messages in Tamil, Hindi or another Indian script use Unicode, which allows 70 characters for one SMS and 67 per part. Our SMS character counter shows the part count before you register a template.
100 free SMS for verified businesses. Register with your company email (not Gmail, Yahoo or Outlook), complete KYC and get your own sender ID approved on DLT, and we'll add 100 free SMS to your account. Claim your free SMS.
Cities we serve
We serve businesses all over India online from our office in Sulur, Coimbatore — it's our only office. The API, the web panel and DLT filing work the same wherever your business is based. Support is available in English, Hindi and Tamil, and our sales team is on +91 95851 60363, Monday to Friday, 9 AM to 6 PM IST.
These city guides cover local industries and common use cases:
- SMS gateway in Chennai
- SMS gateway in Coimbatore
- SMS gateway in Madurai
- SMS gateway in Bangalore
- SMS gateway in Mumbai
- SMS gateway in Delhi NCR
- SMS gateway in Hyderabad
- SMS gateway in Kolkata
- SMS gateway in Pune
- SMS gateway in Ahmedabad
- SMS gateway in Kochi
- SMS gateway in Jaipur
- SMS gateway in Surat
Don't see your city? Every Indian mobile number is reachable from the same account — see all locations.