Send SMS
The Send SMS API sends one transactional or promotional message to one number. To send the same text to up to 1,000 numbers in one call, use POST /sms/send-bulk with a recipients array.
Endpoint
POST https://whitelabled.securesmsc.com/api/v2/sms/send
Parameters (JSON body)
| Parameter | Type | Description |
|---|---|---|
sender_id |
String | Required. Your approved DLT header, up to 11 characters (e.g. ACMEIN) |
recipient |
String | Required. Mobile number: 10 digits (9876543210) or +919876543210 |
message |
String | Required. Up to 1,600 characters. Must match an approved DLT template |
route |
String | Optional. transactional (default) or promotional |
dlt_template_id |
String | Optional. DLT template ID (with dlt_entity_id, skips the platform's own template matching) |
schedule_at |
Date-time | Optional. Send later, e.g. 2026-11-20 09:00:00 (India time unless you set timezone) |
Unicode (Tamil, Hindi, ₹ or curly quotes) is detected automatically. All fields are in the API reference.
Example Request
<?php
// PHP + cURL. 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_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('SMS_API_KEY'),
'Content-Type: application/json',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'sender_id' => 'ACMEIN',
'recipient' => '9876543210',
'message' => 'Your OTP for login is 482913. It is valid for 10 minutes. -Acme',
'route' => 'transactional',
]),
]);
$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'] ?? "HTTP $status";
echo "Not sent ($reason): " . ($result['message'] ?? '') . PHP_EOL;
}
Example Response
{
"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, message and sometimes error_code: 401 bad key, 403 IP not whitelisted, 400 unapproved sender ID or dispatch failure, 422 validation or TEMPLATE_MISMATCH, 429 rate limit.