API endpoint
GET POST
https://sms.otpwala.com/dev/bulkV2
Security: Examples use
YOUR_API_KEY. Never publish the complete authorization key in frontend JavaScript, screenshots, shared URLs or public repositories.Request parameters
| Field | Required | Description |
|---|---|---|
authorization | Yes | Private API key. Query parameter for GET; request header for POST. |
route | Yes | Use dlt for approved DLT messaging. |
sender_id | Yes | Approved six-character sender header. |
message | Yes | Exact approved DLT template text. |
variables_values | As needed | Template variable values in approved order. |
numbers | Yes | Recipient number or supported comma-separated numbers. |
GET request
Send every field in the query string. URL-encode message text and variable values.
GET https://sms.otpwala.com/dev/bulkV2?authorization=YOUR_API_KEY&route=dlt&sender_id=ABCDEF&message=Your%20OTP%20is%20%7B%23var%23%7D&variables_values=482931&numbers=9876543210
POST request
Send authorization and content type in headers. Send message fields as JSON.
Request headers
authorization: YOUR_API_KEY Content-Type: application/json
JSON body
{
"route": "dlt",
"sender_id": "ABCDEF",
"message": "Your OTP is {#var#}. - Your Company",
"variables_values": "482931",
"numbers": "9876543210"
}Code examples
cURL - POST
curl -X POST "https://sms.otpwala.com/dev/bulkV2" \
-H "authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"route":"dlt","sender_id":"ABCDEF","message":"Your OTP is {#var#}. - Your Company","variables_values":"482931","numbers":"9876543210"}'Node.js - POST
const response = await fetch("https://sms.otpwala.com/dev/bulkV2", {
method: "POST",
headers: {
authorization: process.env.OTPWALA_API_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify({
route: "dlt",
sender_id: "ABCDEF",
message: "Your OTP is {#var#}. - Your Company",
variables_values: "482931",
numbers: "9876543210"
})
});
const result = await response.json();PHP - POST
<?php
$payload = json_encode([
"route" => "dlt",
"sender_id" => "ABCDEF",
"message" => "Your OTP is {#var#}. - Your Company",
"variables_values" => "482931",
"numbers" => "9876543210"
]);
$ch = curl_init("https://sms.otpwala.com/dev/bulkV2");
curl_setopt_array($ch, [
CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["authorization: ".getenv("OTPWALA_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => $payload
]);
echo curl_exec($ch);DLT checklist
- Sender ID must be approved and mapped to the content template.
- Message text, punctuation and variable order must match the approved template.
- Pass dynamic values through
variables_values. - Use backend environment variables for the API key.
- Test with one permitted recipient before bulk sending.
Troubleshooting
| Problem | Check |
|---|---|
| Authorization failed | Confirm the key is active and sent in the correct place for GET or POST. |
| Template rejected | Compare sender ID, template wording and variable order with DLT approval. |
| Invalid number | Send a valid mobile number in the supported format. |
| Message not delivered | Check API response, balance, DLT status and message report. |