SMS HTTP API — Send SMS with a Single HTTP Request
Integrate SMS into any application in minutes. Fire a simple HTTP GET or POST to one endpoint and reach 190+ countries with sub‑3‑second OTP delivery, DLT‑compliant routing and real‑time delivery receipts. Works with every language — PHP, Python, Node.js, Java, .NET, cURL or a browser URL.
Send your first SMS in 3 steps
Get credentials
Sign in and copy your username and API key from the API settings page.
Build the URL
Add your sender ID, route, recipient number and message as query parameters.
Fire the request
Call the endpoint from any HTTP client. You get back a broadcast ID to track delivery.
Base URL
All HTTP API calls go to a single endpoint over HTTPS. Authentication is by API key — pass your username and apikey with every request.
# Send SMS — GET or POST https://smsgatewayprovider.com/api/httpapi/send
Always call over HTTPS so credentials are encrypted in transit. Keep your API key secret — never expose it in client-side JavaScript or mobile apps; proxy through your own backend instead.
Parameters
| Parameter | Required | Description |
|---|---|---|
| username | Yes | Your account username / API login. |
| apikey | Yes | Your secret API key. Generated in API Settings and rotatable at any time. |
| sender | Yes | Approved 6‑character sender ID / header (e.g. ACMEIN). Must be registered on DLT for Indian traffic. |
| number | Yes | Recipient mobile number in international format without + (e.g. 919876543210). Send to many recipients by comma‑separating numbers. |
| message | Yes | Message text. URL‑encode the value. For India it must match an approved DLT template. |
| route | Yes | Route ID that selects the delivery path (transactional / OTP / promotional). Provided with your account. |
| type | No | 0 = plain text (GSM‑7, default), 2 = Unicode for Hindi & regional languages / emoji. |
| flash | No | 1 to send a flash SMS that appears directly on screen; omit or 0 for a normal SMS. |
| schedule | No | Future send time as YYYY-MM-DD HH:MM:SS (account timezone). Omit to send immediately. |
Send an SMS
Browser / cURL (GET)
# Single recipient curl "https://smsgatewayprovider.com/api/httpapi/send?\ username=acme&apikey=YOUR_API_KEY&\ sender=ACMEIN&route=2&\ number=919876543210&\ message=Your%20OTP%20is%20123456"
Multiple recipients (POST)
curl -X POST https://smsgatewayprovider.com/api/httpapi/send \ -d "username=acme" \ -d "apikey=YOUR_API_KEY" \ -d "sender=ACMEIN" -d "route=2" \ -d "number=919876543210,919812345678" \ --data-urlencode "message=Sale is live!"
PHP
$params = [ 'username' => 'acme', 'apikey' => 'YOUR_API_KEY', 'sender' => 'ACMEIN', 'route' => '2', 'number' => '919876543210', 'message' => 'Your OTP is 123456', ]; $url = 'https://smsgatewayprovider.com/api/httpapi/send?' . http_build_query($params); echo file_get_contents($url); // broadcast id
Python
import requests r = requests.get( "https://smsgatewayprovider.com/api/httpapi/send", params={ "username": "acme", "apikey": "YOUR_API_KEY", "sender": "ACMEIN", "route": "2", "number": "919876543210", "message": "Your OTP is 123456", }) print(r.text) # broadcast id
What you get back
On success the API returns a broadcast ID — a unique reference for the send. Use it to pull delivery status from the DLR API. Add &response=json for a structured JSON body instead of plain text.
Success (plain text)
1706donef4-2b9c-4d1a-9e77-broadcast
Success (JSON)
{
"status": "success",
"broadcast_id": "1706donef4-2b9c-4d1a",
"queued": 1
}
Error (JSON)
{
"status": "error",
"code": 401,
"message": "Invalid API key"
}
Always check the response before assuming delivery. A broadcast ID means accepted for processing — final handset delivery is confirmed by the DLR.
Response & error codes
| Code | Meaning | What to do |
|---|---|---|
| 200 | Accepted — message queued | Store the broadcast ID; poll DLR for delivery. |
| 400 | Bad request / missing parameter | Check required fields are present and URL‑encoded. |
| 401 | Invalid username or API key | Verify credentials; rotate the key if compromised. |
| 402 | Insufficient balance | Top up credits, then retry. |
| 403 | Sender ID / route not allowed | Use an approved sender and a route enabled on your account. |
| 422 | DLT template mismatch | Match the message to a registered DLT template. |
| 429 | Rate limit exceeded | Slow down and apply exponential backoff. |
| 500 | Server error | Retry with backoff; contact support if it persists. |
HTTP API — frequently asked questions
Can I use GET or must I use POST?
How do I send to multiple numbers in one call?
number parameter, e.g. number=919876543210,919812345678. Each recipient becomes its own message and its own delivery receipt. For large campaigns use the XML API or bulk endpoints.How do I send Hindi or regional-language SMS?
type=2 for Unicode and send UTF‑8 encoded text. Note that Unicode messages are 70 characters per part versus 160 for plain GSM‑7 text.Is DLT registration required?
How do I confirm a message was delivered?
What are the rate limits?
X-RateLimit-* headers so you can throttle gracefully. Enterprise accounts get dedicated throughput for high‑volume OTP and campaign traffic.



