🛠 SMSGatewayHub Developer APIs — Full Overview
One account, one API key, every channel. Below is the complete SMSGatewayHub API suite — this page documents the Bulk SMS / OTP SMS API in full; click through for dedicated docs and pricing on the other channels.
🔑 Authentication
Every SMS API request requires your unique APIKey parameter. Generate a free key by registering an account, then find it in your dashboard under API Settings.
| Parameter | Type | Description |
APIKey required | string | Your unique API key assigned to your account |
Keep your APIKey private. Never expose it in client-side JavaScript or public repositories. You can also restrict it to specific IP addresses from your dashboard.
🔑 Get Your Free API Key →
⚡ Throughput & SLA
Every account on the SMS gateway API gets a guaranteed baseline throughput, with a High Availability tier available for high-volume senders.
| Tier | Throughput | Response Time |
| Standard | 200 RPS | 100–500 ms |
| HA Cluster | 2000 TPS | 50–150 ms |
To upgrade to the HA Cluster infrastructure, contact support@smsgatewayhub.com.
🛡 Security & Trust
All API endpoints run behind SSL/TLS encryption with a Web Application Firewall (WAF), IP-based access restriction and brute-force monitoring.
🔒 ISO 27001 Certified
✅ ISO 9001:2015
🛡 SOC 2
📋 VAPT Assessed
📡 TRAI DLT Compliant
Data Retention Policy
| Client Type | Retention Period |
| Banking clients | 1 year (as per RBI regulations) |
| All other clients | 6 months, then archived to cold storage |
🧪 Live API Tester
Test the SMSGatewayHub API directly from your browser. Enter your credentials and send a real request to verify your integration.
Request URL Preview
Fill in the fields above to see the API URL...
Response will appear here...
⚠️ This tester makes real API calls and will deduct credits from your account.
Don't have an account?
Register for free →
Single SMS API — Bulk SMS API core endpoint
Send a single SMS to one recipient. Supports text, Unicode (Hindi/regional), Flash SMS, group delivery and scheduled delivery.
GET
https://www.smsgatewayhub.com/api/mt/SendSMS
Parameters
| Parameter | Type | Description |
APIKey required | string | API key for authentication |
senderid required | string | DLT-approved sender ID (6 characters) |
channel required | string | 1=Promotional, 2=Transactional, OTP=OTP, INT=International |
DCS | string | 0=Normal/English (default), 8=Unicode (Hindi/Regional) |
flashsms | string | 0=Normal (default), 1=Flash SMS popup |
number required | string | Recipient mobile number with country code, e.g. 91989xxxxxxx |
text required | string | SMS message content (URL-encode special characters) |
route | string | Route ID to control delivery path |
schedtime | string | Scheduled send time — format: yyyy/mm/dd hh:mm:ss AM/PM |
groupid | string | Contact group ID |
EntityId required | string | DLT-registered Entity ID |
dlttemplateid required | string | DLT-registered Template ID |
https://www.smsgatewayhub.com/api/mt/SendSMS
?APIKey=yourapicode
&senderid=TESTIN
&channel=2
&DCS=0
&flashsms=0
&number=91989xxxxxxx
&text=test+message
&route=1
&EntityId=Registered-Entity-Id
&dlttemplateid=Registered-DLT-Template-Id
https://www.smsgatewayhub.com/api/mt/SendSMS
?APIKey=yourapicode
&senderid=TESTIN
&channel=2
&DCS=8
&flashsms=0
&number=91989xxxxxxx
&text=%E0%A4%A8%E0%A4%AE%E0%A4%B8%E0%A5%8D%E0%A4%A4%E0%A5%87
&route=1
&EntityId=Registered-Entity-Id
&dlttemplateid=Registered-DLT-Template-Id
https://www.smsgatewayhub.com/api/mt/SendSMS
?APIKey=yourapicode
&senderid=TESTIN
&channel=2
&DCS=0
&flashsms=1
&number=91989xxxxxxx
&text=test+message
&route=1
&EntityId=Registered-Entity-Id
&dlttemplateid=Registered-DLT-Template-Id
Response
{"ErrorCode":"000","ErrorMessage":"Success","JobId":"20047",
"MessageData":[{"Number":"91989xxxxxxx","MessageId":"BqTiw66A2UGLFV3DnwHFLQ"}]}
Bulk SMS API
Send SMS to multiple recipients in one call. Pass comma-separated numbers in the number parameter — all other parameters match the Single SMS API.
GET
https://www.smsgatewayhub.com/api/mt/SendSMS
Separate multiple numbers with commas: number=91989xxxxxxx,91999xxxxxxx
https://www.smsgatewayhub.com/api/mt/SendSMS
?APIKey=yourapicode&senderid=TESTIN&channel=2&DCS=0&flashsms=0
&number=91989xxxxxxx,91999xxxxxxx&text=test+message&route=1
&EntityId=Registered-Entity-Id&dlttemplateid=Registered-DLT-Template-Id
Response
{"ErrorCode":"000","ErrorMessage":"Success","JobId":"20047",
"MessageData":[
{"Number":"91989xxxxxxx","MessageId":"mvHdpSyS7UOs9hjxixQLvw"},
{"Number":"91999xxxxxxx","MessageId":"PfivClgH20iG6G5R3usHwA"}
]}
OTP SMS API
The same endpoint powers OTP delivery for login, signup and 2FA flows — just set channel=OTP. OTP messages get the highest delivery priority and bypass DND filters, while still requiring a DLT-registered OTP template.
GET
https://www.smsgatewayhub.com/api/mt/SendSMS
https://www.smsgatewayhub.com/api/mt/SendSMS
?APIKey=yourapicode&senderid=TESTIN&channel=OTP&DCS=0&flashsms=0
&number=91989xxxxxxx&text=Your+OTP+is+123456&route=1
&EntityId=Registered-Entity-Id&dlttemplateid=Registered-DLT-Template-Id
International SMS API
Send SMS to numbers worldwide with channel=INT and the full number including country code (no + prefix). EntityId and dlttemplateid are not required for international SMS.
GET
https://www.smsgatewayhub.com/api/mt/SendSMS
https://www.smsgatewayhub.com/api/mt/SendSMS
?APIKey=yourapicode&senderid=TESTIN&channel=INT&DCS=0&flashsms=0
&number=12093158246&text=test+message&route=1
Balance Check API
Check available SMS credits on your account in real time.
GET
https://www.smsgatewayhub.com/api/mt/GetBalance?APIKey=yourapicode
{"ErrorCode":"0","ErrorMessage":"Success","Balance":"9988"}
DLR Status API
Check delivery status for a sent message using the jobid returned by the Send SMS API.
GET
https://www.smsgatewayhub.com/api/mt/GetDelivery?APIKey=yourapicode&jobid=#######
| Parameter | Type | Description |
APIKey required | string | API key for authentication |
jobid required | string | Job ID from the Send SMS API response |
{"ErrorCode":"0","ErrorMessage":"Success",
"DeliveryReports":[
{"MessageId":"mvHdpSyS7UOs9hjxixQLvw","DeliveryStatus":"Delivered","DeliveryDate":"2026-08-28T06:17:00"}
]}
JSON API
Send SMS via HTTP POST with a JSON body. Set header Content-Type: application/json.
POST
https://www.smsgatewayhub.com/api/mt/SendSMS
{
"Account": {
"APIkey": "your-api-key",
"SenderId": "TESTIN",
"Channel": "2",
"DCS": "0",
"EntityId": "your-entity-id"
},
"Messages": [
{ "Text": "Your message here", "DLTTemplateId": "your-template-id", "Number": "91989xxxxxxx" }
]
}
XML API
Send SMS via HTTP POST with an XML body. Set header Content-Type: application/xml.
POST
https://www.smsgatewayhub.com/api/mt/SendSMS
<SmsQueue>
<Account>
<APIKey>your-api-key</APIKey>
<SenderId>TESTIN</SenderId>
<Channel>2</Channel>
<EntityId>13011xxxxxxxx</EntityId>
<DCS>0</DCS>
<Route>1</Route>
</Account>
<Messages>
<Message>
<Number>91989xxxxxxx</Number>
<Text>Your message here</Text>
<DltTemplateId>130716xxxxxxxxx</DltTemplateId>
</Message>
</Messages>
</SmsQueue>
Short Link API
Embed trackable shortened URLs inside SMS text using #Link1#, #Link2# placeholders.
<Links>
<Links><Link>www.example.com</Link></Links>
</Links>
Simple Voice SMS API
Send a text-to-speech (TTS) voice call to a single recipient. Supports Indian English and Hindi voices.
POST
https://vapi.smsgatewayhub.com/tts/3/single
🔒 Authorization: Basic base64(username:password) — pass in the Authorization header.
| Parameter | Type | Description |
from required | string | Caller ID in E.164 format (e.g. 919999999999) |
to required | string | Destination number in E.164 format |
text | string | TTS message text (up to 1400 characters) |
language | string | Language code — default: en. See Voice Languages section. |
voice.name | string | Voice name (e.g. Joanna, Aditi, Ravi, Heera) |
audioFileUrl | string | URL to audio file (wav/mp3/ogg, max 4 MB). Use instead of text. |
{
"from": "919999999999",
"to": "916666666666",
"text": "Test Voice message.",
"language": "en",
"voice": { "name": "Joanna", "gender": "female" }
}
Response
{"messages":[{
"to": "916666666666",
"status": { "groupId": 1, "groupName": "PENDING", "name": "PENDING_ENROUTE" },
"messageId": "2250be2d4219-3af1-78856-aabe-1362af1edfd2"
}]}
Multiple Voice SMS API
Send voice messages to multiple recipients in one request. Mix TTS text and audio file URLs within the same batch.
POST
https://vapi.smsgatewayhub.com/tts/3/multi
{
"messages": [
{ "from": "919999999999", "to": ["916666666666","919999999998"], "audioFileUrl": "https://example.com/media.mp3" },
{ "from": "919999999999", "to": ["916666666666"], "text": "Hello world!", "language": "en", "voice": { "name": "Joanna", "gender": "female" } }
]
}
Fully Featured Voice API
Full-featured voice API with scheduling, DTMF input, call transfer, retry logic, machine detection, recording, and delivery webhooks.
POST
https://vapi.smsgatewayhub.com/tts/3/advanced
| Parameter | Type | Description |
bulkId | string | Unique identifier for the bulk request |
speechRate | double | Playback speed — range 0.5 to 2.0 (default: 1) |
notifyUrl | string | Webhook URL for delivery report callbacks |
record | boolean | Record the call — true or false |
ringTimeout | int | Ring duration before hang-up in seconds (default: 45) |
machineDetection | string | hangup or continue |
retry.maxCount | int | Max retry attempts (maximum: 4) |
⚠️ Machine detection is charged additionally. Contact your account manager for pricing.
Call Transfer — Any DTMF
[{ "if": "anyDtmf", "transferTo": "919999999999", "callTransferMaxDuration": 10 }]
Voice Delivery Reports
Delivery reports are returned ONCE only. Subsequent calls return an empty collection.
GET
https://vapi.smsgatewayhub.com/tts/3/reports
| Parameter | Type | Description |
bulkId | string | Filter by bulk request ID |
messageId | string | Filter by specific message ID |
limit | int | Maximum number of reports to return (default: 50) |
📞 Missed Call API
When an incoming missed call arrives at your toll-free or DID number, SMSGatewayHub forwards the call details to your webhook URL via GET request.
WEBHOOK
http://yoursite.com/handler.php?who=%who&ChannelID=%channel&Circle=%circle&Operator=%operator&DateTime=%time
| Parameter | Description |
| Caller | Phone number of the caller |
| Channel | Your toll-free or DID number that received the call |
| Circle | Telecom circle of the caller |
| Operator | Caller's mobile operator (Jio, Airtel, Vi, BSNL, etc.) |
| CallTime | Date and time the call was received |
⚠️ Your webhook must respond quickly. Do not return any HTML in the response body — plain text or JSON only.
🐘 PHP Quick Start
Copy, paste, replace your credentials — this is the fastest way to send your first SMS from a PHP backend.
<?php
$apikey = "YourAPIkey";
$sender = "TESTIN";
$msg = "YOUR MESSAGE HERE";
$num = "91XXXXXXXXX";
$ms = rawurlencode($msg);
$url = "https://www.smsgatewayhub.com/api/mt/SendSMS"
. "?APIKey=$apikey&senderid=$sender&channel=2"
. "&DCS=0&flashsms=0&number=$num&text=$ms&route=1";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
echo $result['ErrorCode'] === '000'
? "SMS sent! Job ID: " . $result['JobId']
: "Error: " . $result['ErrorMessage'];
?>
⚠️ API Response Error Codes
These codes are returned in the ErrorCode field of every API response.
| Code | Description |
| 000 | Success |
| 001 | Login details cannot be blank |
| 007 | Username or password is invalid |
| 008 | Account not active |
| 0011 | IP address restriction |
| 0013 | Mobile numbers not valid |
| 0015 | Sender ID not valid |
| 0021 | Insufficient credits |
| 0024 | Invalid template or template mismatch |
| 0027 | Invalid optin user |
⚠️
Seeing a DLT / operator-level failure (5xxx series) instead of the API codes above? Get the full code-by-code breakdown with fixes on our dedicated guide:
🔗 DLT Error Codes & Solutions Guide →
✓️ Special Character Encoding
URL-encode these characters when passing them in query string parameters (especially the text field). Use PHP's rawurlencode() or JavaScript's encodeURIComponent() to handle this automatically.
| Character | Encoded | Character | Encoded |
| space | %20 | & | %26 |
| ! | %21 | ' | %27 |
| # | %23 | + | %2B |
| $ | %24 | / | %2F |
| % | %25 | ? | %3F |
🗣 Voice Languages
| Language | Code | Female Voices | Male Voices |
| English (Indian) | en-in | Aditi, Heera✦, Priya, Raveena | Ravi |
| Hindi | hi | Aadita✦, Kalpana | Hemant |
| English (US) | en | Joanna✦, Salli, Kendra, Ivy | Matthew, Justin |
✦ = Default voice for language
❓ Frequently Asked Questions
How do I get an API key for the Bulk SMS API?
Register a free account at
smsgatewayhub.com, log in, and open
API Settings in your dashboard to find your
APIKey. Use it on every request and never expose it client-side.
What is DLT and why is EntityId required in every SMS API call?
DLT (Distributed Ledger Technology) is TRAI's mandatory registration system for commercial SMS senders in India. Every request must carry your DLT-registered EntityId and dlttemplateid, or telecom operators will block delivery.
How do I send OTP SMS using this API?
Use channel=OTP on the same SendSMS endpoint. OTP gets the highest delivery priority and bypasses DND, but still needs a DLT-registered OTP template.
Does SMSGatewayHub also offer a WhatsApp Business API?
Yes — alongside the SMS API, SMSGatewayHub offers a
WhatsApp Business API, RCS and Voice APIs, so you can run SMS and WhatsApp messaging from one account.
What's the difference between Promotional and Transactional SMS?
Transactional (channel=2) — alerts, OTPs, account updates; can reach DND numbers, delivered 24×7. Promotional (channel=1) — marketing & offers; blocked on DND numbers, delivery window 9 AM–9 PM only.
What does error code 0024 mean?
It means your message text does not match your DLT-approved template exactly — extra spaces, punctuation, or a wrong
dlttemplateid are common causes. See the
DLT Error Codes & Solutions Guide for the full fix list.
What is the maximum API throughput?
Standard accounts support up to 200 requests per second (RPS). The optional HA Cluster tier scales to 2000 transactions per second (TPS) — contact
support@smsgatewayhub.com to upgrade.
Does SMSGatewayHub offer an Email API too?
Yes — the
Email API sends transactional and promotional email from the same account and dashboard you use for SMS, WhatsApp and Voice.
Is the SMSGatewayHub API free to use?
Signup and your API key are free — there's no setup fee for developer access. You only pay per SMS/email/call credit when you actually send messages.
Start sending SMS in minutes
Free signup, no setup fee. Get your API key and send your first Bulk SMS, OTP SMS or WhatsApp Business message today.
🔑 Get Your Free API Key