A plain REST API for एसएमएस भेजना
POST your sender, recipient and content with a Token header. Get a message ID straight back, and delivery reports pushed to your server.
One request, one message
Authenticate with your access key, POST the message, and read the msgid from the response. Press the button to see it run.
1curl -X POST https://secure.smslocal.com/api/service/enterprise-service/external/sms \
2 -H "Token: $SMSLOCAL_TOKEN" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "from": "SMSLOCAL",
6 "to": "14155550123",
7 "content": "Your code is 481920."
8 }'
/external/smsRun the request to see the response.
Nothing exotic to learn
Three ideas cover the whole API, which follows plain REST conventions.
- Authentication
Token authentication
Send your access key in a Token header on every request, with JSON in and JSON out.
- No SDK required
- Works from any language
- Keep the key in an environment variable
- प्रतिक्रिया
Know it was accepted
Every send returns a msgid and an errorcode immediately.
- Store the msgid against your own record
- errorcode 0 means accepted
- Use the msgid to match reports later
- Replies
Two-way by default
Replies arrive on the same callback, marked as mobile originated.
- Same message shape as reports
- Tell directions apart with mt / mo
- Route replies to your support tools
See what happened to every message
A status report is posted to your callback URL when a message reaches its final state.
- 1Match by msgidEvery report carries the ID you were given at send time.
- 2Final states onlyYou hear about a message when it is delivered or has failed.
- 3One callback URLThe same endpoint receives reports and replies.
9f2a7c10+1 415 ••• 0123पहुंचा दियाjust now9f2a7c11+91 98••• 43210पहुंचा दिया3 s ago9f2a7c12+44 7••• 123456लंबित5 s ago9f2a7c13+91 99••• 00012असफल9 s ago
See how a message is counted
Longer text and non-Latin characters change how many parts a message is billed as. Try your own wording, and look up a number before you send.
- Part 146 / 160
One part holds 160 characters in GSM7 or 70 in Unicode. One non-GSM character, such as an emoji or a Hindi letter, switches the whole message to Unicode.
Stop gluing messaging together by hand
Drag the divider to compare.
- Messages sent from your own code
- A report for every message
- Replies pushed to your system
- Manual exports and uploads
- No idea if a message arrived
- Replies land in someone’s inbox
A short pre-launch checklist
Tick items off as you go. Nothing here is saved.
SMS API — frequently asked questions
Pass your access key in a Token header on every request, along with Content-Type: application/json.
Every send returns a msgid. Point us at a callback URL and we post a status report to it when the message reaches its final state.
160 characters on GSM7 encoding, or 70 on Unicode. Longer messages are joined from several parts, each billed separately.
Yes. Inbound replies are delivered to the same callback URL and marked as mobile originated.
Yes. SMS to Indian numbers must use an approved entity, sender header and template. Our team helps you register them during onboarding.
Send your first SMS in minutes
Create an account, grab your access key and make your first request.