Before you start
- Create an account and wait for approval.
- Add your DLT sender ID and message templates under Sender IDs & templates. They must be approved before you send.
- Buy credits, then create an API key under API & developers.
Send the key on every request as Authorization: Bearer YOUR_API_KEY. Keep it on your server and never put it in a web page or mobile app.
Send a message
POST https://sendsms.jmspro.in/api/v1/send
| Field | Meaning |
|---|---|
route | transactional today. OTP messages use the same route. |
sender_id | Your approved DLT sender ID, such as JMSPRO. |
template_id | The DLT template ID of the approved template. |
to | A list of 10-digit mobile numbers, up to 100 per request. |
message | The text. It must match the approved template, with the changing parts filled in. |
idempotency_key | Optional. A unique value for this send, so a retry never sends twice. |
curl -X POST https://sendsms.jmspro.in/api/v1/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"route": "transactional",
"sender_id": "JMSPRO",
"template_id": "1707170000000000000",
"to": ["9800000000"],
"message": "Your OTP is 482913. Valid for 10 minutes. -JMSPRO",
"idempotency_key": "login-1042"
}'
A successful response:
{ "ok": true, "message_id": 1281, "status": "submitted", "recipients": 1, "credits_used": 1 }
Check delivery
GET https://sendsms.jmspro.in/api/v1/status?id=1281 with the same Authorization header. Each number shows submitted, delivered or failed. Reports usually arrive within a few minutes.
Check balance
GET https://sendsms.jmspro.in/api/v1/balance with the same Authorization header. Shows the credits left in your account.
{ "ok": true, "balance": 4820, "unit": "credits",
"balances": { "promotional": 0, "transactional": 4820, "otp": 1500 } }
balance is your Transactional credits; balances lists every route.
Errors
A problem returns { "ok": false, "error": "…" } with a status code.
| Status | Meaning |
|---|---|
| 401 | The API key is missing or wrong. |
| 422 | Check the message: the template does not match, a field is missing, or credits are too low. |
| 429 | Too many requests. Wait a moment and try again. |
Examples
PHP
$ch = curl_init('https://sendsms.jmspro.in/api/v1/send');
curl_setopt_array($ch, [
CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $key, 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['route' => 'transactional', 'sender_id' => 'JMSPRO',
'template_id' => '1707170000000000000', 'to' => ['9800000000'],
'message' => 'Your OTP is 482913. Valid for 10 minutes. -JMSPRO']),
]);
$out = json_decode(curl_exec($ch), true);
Node.js
const r = await fetch('https://sendsms.jmspro.in/api/v1/send', {
method: 'POST',
headers: { Authorization: 'Bearer ' + key, 'Content-Type': 'application/json' },
body: JSON.stringify({ route: 'transactional', sender_id: 'JMSPRO',
template_id: '1707170000000000000', to: ['9800000000'],
message: 'Your OTP is 482913. Valid for 10 minutes. -JMSPRO' })
});
const out = await r.json();
Python
import requests
out = requests.post('https://sendsms.jmspro.in/api/v1/send',
headers={'Authorization': 'Bearer ' + key},
json={'route': 'transactional', 'sender_id': 'JMSPRO',
'template_id': '1707170000000000000', 'to': ['9800000000'],
'message': 'Your OTP is 482913. Valid for 10 minutes. -JMSPRO'}).json()
Good to know
- Numbers can be 10 digits or start with 91.
- A message that does not match your approved template is stopped, and nothing is charged.
- If the operator rejects a send, the credits come back to your account at once.
- Use a new
idempotency_keyfor each separate message, and reuse it only when you retry the same one. - Promotional sending is not available yet.