OTP & DLT SMS API

BulkV2 API documentation

Send OTP and DLT SMS using GET query parameters or POST JSON. Keep the authorization key on your backend and use only approved sender IDs and templates.

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

FieldRequiredDescription
authorizationYesPrivate API key. Query parameter for GET; request header for POST.
routeYesUse dlt for approved DLT messaging.
sender_idYesApproved six-character sender header.
messageYesExact approved DLT template text.
variables_valuesAs neededTemplate variable values in approved order.
numbersYesRecipient 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

ProblemCheck
Authorization failedConfirm the key is active and sent in the correct place for GET or POST.
Template rejectedCompare sender ID, template wording and variable order with DLT approval.
Invalid numberSend a valid mobile number in the supported format.
Message not deliveredCheck API response, balance, DLT status and message report.