SMS API for India: Reliable Messaging Infrastructure for Product Teams

Build OTP, notifications, and campaign workflows with clear delivery controls, callback visibility, and operator-grade reliability.

Send an SMS from PHP (tested example)

<?php
// PHP + cURL: send one SMS. No SDK or Composer package needed.
$ch = curl_init("https://whitelabled.securesmsc.com/api/v2/sms/send");
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => json_encode([
        "sender_id" => "ACMEIN",      // your approved DLT header
        "recipient" => "9876543210",  // or +919876543210
        "message"   => "Your OTP for login is 482913. It is valid for 10 minutes. -Acme",
    ]),
    CURLOPT_HTTPHEADER     => [
        "Authorization: Bearer " . getenv("SMS_API_KEY"),
        "Content-Type: application/json",
        "Accept: application/json",
    ],
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT        => 30,
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);

if ($status === 200 && !empty($result["success"])) {
    echo "Queued, message ID " . $result["data"]["message_id"] . PHP_EOL;
} else {
    // Most specific first: error_code, then error, then message
    $reason = $result["error_code"] ?? $result["error"] ?? "no JSON reply";
    echo "Not sent (HTTP $status, $reason): " . ($result["message"] ?? "") . PHP_EOL;
}

One HTTPS POST with JSON to https://whitelabled.securesmsc.com/api/v2/sms/send, with your key in the Authorization: Bearer header. No SDK is needed. Each key is locked to the first IP address that uses it, so add your server IPs under API & Integrations → API Management → IP Whitelisting before the first call. GET calls (balance, status) stay off until you tick "Allow GET Method" for the key. Every endpoint is in the API documentation.

Predictable API Behavior

Consistent parameters, clear responses, and integration patterns designed for backend reliability.

Delivery Webhooks

Push delivery updates into your event pipeline and track outcomes in near real time.

Multi-Language Integration

Quick-start paths for PHP, Python, Node.js, and enterprise backend stacks.

What Engineering Teams Need from an SMS API

At scale, messaging issues are usually operational, not just code-level. This API is designed around delivery visibility, fault handling, and campaign governance.

  • Safe Retries: Every accepted send returns a message_id; save it with your record. Retry on HTTP 429 (after retry_after seconds) or HTTP 500, but fix the request on other 4xx errors. The API has no idempotency key, so a request that timed out may already have been sent: check before you resend.
  • Unicode and Regional Support: Tamil, Hindi and other scripts are detected automatically and sent as Unicode (70 characters per SMS instead of 160).
  • Sender and Template Control: Keep traffic compliant across transactional and promotional use cases.
  • Operational Visibility: Use callbacks and reporting for fast diagnosis of delivery drift.

Use Cases Commonly Shipped with This API

  • Login OTP and device verification
  • Order confirmations and shipment alerts
  • Billing reminders and payment notifications
  • Promotional campaign dispatch with scheduling

Frequently Asked Questions

How fast can a team go live?

With access credentials and sender setup in place, most teams can complete integration and initial validation in a single workday.

Is webhook callback support included?

Yes, on the Business and Enterprise plans. When a message reaches its final status, the platform calls your URL with the message ID, status, number and date. On every plan you can also read the status with the API or in the web panel.

Can one API handle OTP and campaign messaging?

Yes. You can run transactional and promotional workflows together with proper sender and compliance controls.

Ship Messaging Features with Confidence

There is no sandbox: every call sends a real SMS, so test with your own number. Read the full API reference or try a request in the playground first.