JMSPRO SMS
Developers

SMS API guide

Send OTPs, alerts and reminders from your own software with one request. You need an approved account, sender ID and template, and an API key.

Create account to get your key

Before you start

  1. Create an account and wait for approval.
  2. Add your DLT sender ID and message templates under Sender IDs & templates. They must be approved before you send.
  3. 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

FieldMeaning
routetransactional today. OTP messages use the same route.
sender_idYour approved DLT sender ID, such as JMSPRO.
template_idThe DLT template ID of the approved template.
toA list of 10-digit mobile numbers, up to 100 per request.
messageThe text. It must match the approved template, with the changing parts filled in.
idempotency_keyOptional. 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.

StatusMeaning
401The API key is missing or wrong.
422Check the message: the template does not match, a field is missing, or credits are too low.
429Too 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_key for each separate message, and reuse it only when you retry the same one.
  • Promotional sending is not available yet.

Ready to send from your own software?

Create an account, get your key and send your first message.

●WhatsApp