TRAI DLT-compliant routes on Jio, Airtel, Vi and BSNL
SMS gateway

SMS Gateway Provider in India: REST API and SMPP 3.4

Connect your app, website or CRM to Indian mobile networks with one HTTPS request, or over SMPP 3.4 on the Enterprise plan. DLT-registered sender IDs and templates, delivery reports and webhooks, from ₹0.15 per SMS excluding GST.

Updated · 10 min read · OnlineSMSService team, Coimbatore

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.

  1. 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.
  2. 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.
  3. 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.
  4. 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:

VM-ACMEIN-SYour OTP for login is 482193. It is valid for 10 minutes. -Acme

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 example ACMEIN.
  • recipient — the mobile number, 10 digits (9876543210) or with +91. For up to 1,000 numbers, send a recipients array to /sms/send-bulk instead.
  • 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 fieldWhat DLT requiresCommon mistake
sender_idA six-character header registered to your entityUsing a header that belongs to a different entity or was never registered
messageText that matches an approved template linked to that header, with only the {#var#} parts changedEditing the fixed wording in code, or adding a line the template doesn't have
recipientPromotional 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) APISMPP 3.4
ConnectionOne HTTPS request per sendA persistent TCP session (a "bind") that stays open
What you needAny language that can make an HTTP requestAn SMPP client library or an SMS platform that already speaks SMPP
Delivery reportsDelivery reports in the panel; webhooks to your URL on Business and aboveReturned over the same bind as deliver_sm messages
SuitsApps, websites, CRMs, OTPs, order updates — most businessesAggregators, resellers and platforms with steady high volume
Available onAll plansEnterprise

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_id from every send against your own record — the login attempt, the order, the invoice — so you can look up its status with GET /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 as broadcast_id), status, number and date. 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

PlanPrice per SMSMonthly volumeGateway features
Starter₹0.20Up to 10,000Custom sender IDs, web panel, CSV upload, scheduling, API access, delivery reports, email support
Business₹0.15Up to 1,00,000Everything in Starter, plus full API and webhooks, advanced analytics and priority support
EnterpriseCustomAbove 1,00,000Volume discounts, SMPP 3.4 binds, 24/7 phone support, dedicated account manager, SLA and custom integration
Domestic India SMS, excluding GST. The same rate applies to OTP, transactional, service and promotional SMS.

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:

Don't see your city? Every Indian mobile number is reachable from the same account — see all locations.

Frequently asked questions

What is an SMS gateway?

An SMS gateway is a service that accepts messages from your software, through an HTTP API or an SMPP connection, and passes them to the mobile network for delivery. It also reports back whether each message was delivered.

Do I need DLT registration to use an SMS gateway in India?

Yes. Every business sending commercial SMS in India must register its entity, sender IDs and message templates on DLT. We can file it for you for ₹5,900 including 18% GST, valid for one year and renewed every year, or link a DLT entity you already have for free.

Should I use the HTTP API or SMPP?

Most businesses should use the HTTP API, which is available on every plan and works from any programming language. SMPP 3.4 suits aggregators and platforms that already use SMPP or send steady high volume, and it comes with the Enterprise plan.

Why did my SMS fail when the API returned success?

A success response means the gateway accepted the message. The operator checks it against DLT afterwards, and if the text does not match an approved template for that sender ID, the message is rejected and shows as failed in the delivery report.

How much does an SMS gateway cost in India?

With OnlineSMSService it costs ₹0.20 per SMS on Starter (up to 10,000 a month) and ₹0.15 per SMS on Business (up to 1,00,000 a month), excluding GST. There is no setup fee or minimum top-up, and credits never expire.

Can OTP messages reach numbers on the DND list?

Yes. OTP, service and transactional SMS are delivered 24×7, including to DND numbers. Only promotional SMS are limited to non-DND numbers between 9 AM and 9 PM.

Do you have an office in my city?

We have one office, in Sulur, Coimbatore, and we serve businesses across India online. Sign-up, KYC, DLT filing and support are all handled remotely, in English, Hindi or Tamil.

Get a free API key + 100 test SMS

Create your account and generate an API key right away. Verified businesses also get 100 free test SMS once KYC and DLT mapping are done. No setup fee, no minimum top-up, and credits never expire.

Get 100 free SMS
Claim 100 free SMS