- 01
Create an SMSLocal account
Sign up with a work email. Every new account lands with ₹60 free credit — enough for ~200 test SMS. No credit card required. You will be asked for a company name and the country you operate in; for Indian operators, pick India.
- 02
Register your Principal Entity on DLT
India's TRAI-mandated DLT registry requires every sender to be approved before any SMS is delivered. If you haven't already registered, do it once on any DLT platform (Vi, Jio, Airtel, or BSNL) — approval is near-instant. Our team can help if you get stuck.
- Pick a 6-character Sender ID (also called the Header) — e.g. MYBRND or ALERTS.
- Register the template body of the SMS you want to send. Use {#var#} for dynamic fields.
- Copy the 19-digit Template ID after approval — you will pass it in every API call.
- 03
Add your DLT header in SMSLocal
In the dashboard, go to Settings → Sender IDs and paste the approved 6-character header. Approval typically syncs within a few hours. Once it shows status Active, you can send through it.
- 04
Generate an API key
Still in Settings, open API & Webhooks and click New API Key. Name it after the service that will use it (e.g. prod-otp-server) so you can rotate safely. Keys are 32-character hex strings — copy once and store in your secrets manager.
- Treat the key like a password. Never commit it to a repo.
- Use separate keys for dev, staging, and production.
- If a key is ever exposed, revoke and re-issue from the dashboard immediately.
- 05
Send your first SMS
You now have everything you need. Export the key as SMSLOCAL_KEY and run one of the snippets below. The API returns a plain-text message ID on success — store it so you can fetch the delivery status later.
bashcurl "https://app.smslocal.in/api/smsapi" \ --get \ --data-urlencode "key=$SMSLOCAL_KEY" \ --data-urlencode "route=1" \ --data-urlencode "sender=ALERTS" \ --data-urlencode "number=9876543210" \ --data-urlencode "sms=Hello from SMSLocal — your account is live." \ --data-urlencode "templateid=1207161234567890123"A successful send returns a numeric message ID like
1987654321. A three-digit error code (e.g.110) means the request was rejected — see error codes. - 06
Check the delivery status
Pass the message ID to the /api/dlrapi endpoint to see per-number delivery status. For production volumes, switch to webhook mode so we push status updates to you as soon as the carrier confirms.
bashcurl "https://app.smslocal.in/api/dlrapi" \ --get \ --data-urlencode "key=$SMSLOCAL_KEY" \ --data-urlencode "messageid=1987654321"Production tip: switch to webhooks under Settings → API & Webhooks. Delivery events will POST to your URL within seconds of the carrier confirming, signed with HMAC-SHA256.
Next steps
Ship the rest of your messaging stack.
Now that you can send, take the next step: harden retries, capture analytics, and hand your ops team a dashboard they can actually use.
Read the full API reference
Every endpoint, every parameter, every error code — with working cURL, Node.js, Python, and PHP samples.
Open API referenceTry the XML API
If your middleware speaks XML natively, the XML API mirrors every endpoint with clean XML payloads.
See XML examplesDLT compliance guide
Deep-dive on TRAI DLT requirements, PE registration, templates, and sender-ID approvals — the Indian SMS rulebook.
Read the guideSet up webhooks
Receive delivery reports and inbound replies in real time. Signed, versioned, and retry-safe out of the box.
Configure webhooks