SG

SMSGatewayHub

🟢 Online · Typically replies in minutes

Hello! Welcome to SMSGatewayHub. 👋

Please select a department and we'll connect you right away.
SMSGatewayHub · Now

Choose a department

Tap below — opens WhatsApp instantly · +91 9111408039

SMS API with API Key

Send SMS from your website, app or software with one HTTPS call. Every call uses your secret API Key instead of your username and password. WhatsApp, RCS, Email and the unified CPaaS API are listed at the end.

Quick start

  1. Log in to your panel and open Developer API › API Key (Panel › API Key). Get the key on your registered email or generate a new one.
  2. Use your approved Sender ID, DLT Entity ID and DLT Template ID. The text must match the approved template.
  3. Call the URL below. Base URL: https://www.smsgatewayhub.com
https://www.smsgatewayhub.com/api/mt/SendSMS?APIKey=YOUR_API_KEY&senderid=TESTIN&channel=2&DCS=0&flashsms=0&number=91989xxxxxxx&text=Your+OTP+is+123456&route=1&EntityId=YOUR_ENTITY_ID&dlttemplateid=YOUR_TEMPLATE_ID
Keep your API Key secret. Call the API from your server, not from browser JavaScript or a mobile app. If the key leaks, generate a new one in the panel - the old key stops working at once. You can also limit API use to your server IPs (ask support).

Send SMS

GETPOST/api/mt/SendSMS

Sends one message to one or more numbers. Answer: a JobId for the request and one MessageId per number.

https://www.smsgatewayhub.com/api/mt/SendSMS?APIKey=YOUR_API_KEY&senderid=TESTIN&channel=2&DCS=0&flashsms=0&number=91989xxxxxxx&text=test+message&route=1&EntityId=YOUR_ENTITY_ID&dlttemplateid=YOUR_TEMPLATE_ID

Response

{"ErrorCode":"000","ErrorMessage":"Success","JobId":"20047",
 "MessageData":[{"Number":"91989xxxxxxx","MessageId":"mvHdpSyS7UOs9hjxixQLvw"}]}

POST works with the same fields as form fields. Up to 100 numbers per call - use a group or several calls for more. URL-encode the text (space = + or %20, & = %26).

Parameters

NameDescription
APIKey requiredYour API Key from the panel.
senderid requiredYour approved 6-character Sender ID (header).
channel required2 = Transactional / Service, 1 = Promotional.
DCS0 = normal text (default), 8 = Unicode (Hindi and other languages).
flashsms0 = normal (default), 1 = flash message shown at once on the screen.
number requiredMobile number with country code, e.g. 9198xxxxxxxx. Several numbers: comma separated (max 100).
text requiredMessage text, exactly as the approved DLT template (variables filled in).
routeRoute ID given by your account manager. Leave it out to use your account's default route.
EntityIdYour registered DLT Principal Entity ID.
dlttemplateidRegistered DLT Template ID of this text.
telemarketeridRegistered telemarketer ID (only if you were told to send it).
schedtimeSend later: yyyy/MM/dd hh:mm:ss AM, e.g. 2026/12/31 10:30:00 AM (IST).
groupidSend to a saved contact group instead of number (see Groups).

Check balance

GETPOST/api/mt/GetBalance
https://www.smsgatewayhub.com/api/mt/GetBalance?APIKey=YOUR_API_KEY
{"ErrorCode":"0","ErrorMessage":"Success","Balance":"Promo:9988|Trans:0"}

Delivery report (by JobId)

GETPOST/api/mt/GetDelivery

Use the JobId you got from Send SMS. Always send your API Key with this call.

https://www.smsgatewayhub.com/api/mt/GetDelivery?APIKey=YOUR_API_KEY&jobid=20047
{"ErrorCode":"0","ErrorMessage":"Success","MessageId":null,
 "DeliveryReports":[{"MessageId":"mvHdpSyS7UOs9hjxixQLvw","DeliveryStatus":"Delivered","DeliveryDate":"2026-10-15T06:17:00"}]}

Tip: check delivery a few minutes after sending, not in a fast loop. Operators can take up to 48 hours to report some numbers.

Sent report by number

GETPOST/api/mt/GetSentReport
https://www.smsgatewayhub.com/api/mt/GetSentReport?apikey=YOUR_API_KEY&number=91989xxxxxxx

Sender IDs and DLT templates

CallWhat it does
/api/mt/getsenderid?Apikey=KEYList your Sender IDs.
/api/mt/managesenderid?Apikey=KEY&SenderId=TESTIN&senderid_type=..&DltEntityid=..&OpName=..&Status=..&Sid=..Add or update a Sender ID (Sid = existing ID when updating).
/api/mt/deletesenderid?Apikey=KEY&Senderid=TESTINDelete a Sender ID.
/api/mt/gettemplates?Apikey=KEYList your DLT templates.
/api/mt/managetemplate?Apikey=KEY&Temp_Name=..&Temp_message=..&TempType=..&TempId=..&Status=true&Tmid=..Add or update a DLT template (TempId = DLT Template ID).
/api/mt/deletetemplate?Apikey=KEY&DltTempid=..Delete a DLT template.

Contact groups

CallWhat it does
/api/group/getallgroups?APIKey=KEYList your groups.
/api/group/addnewgroup?APIKey=KEY&GroupName=CustomersCreate a group.
/api/group/uploadcontacts?APIKey=KEY&GroupName=Customers&Numbers=9198xxxxxxxx,9199xxxxxxxxAdd numbers to a group (comma separated; use POST for long lists).

All calls above work with GET or POST and need the API Key.

Error codes

CodeMeaning
000Success
001Login details cannot be blank
003Sender cannot be blank
004Message text cannot be blank
005Message data cannot be blank
006Error: generic error description
007API Key (or username / password) is invalid
008Account not active
009Account locked, contact your account manager
010API restriction
011IP address restriction
012Invalid length of message text
013Mobile numbers not valid
014Account locked due to spam message, contact support
015Sender ID not valid
017Group ID not valid
018Multi message to group is not supported
019Schedule date is not valid
020Message or mobile number cannot be blank
021Insufficient credits
022Invalid JobId
023Parameter missing
024Invalid template or template mismatch
025{Field} can not be blank or empty
026Invalid date range
027Invalid opt-in user

More detail: API error codes.

Code samples

curl -G "https://www.smsgatewayhub.com/api/mt/SendSMS" \
  --data-urlencode "APIKey=YOUR_API_KEY" --data-urlencode "senderid=TESTIN" \
  --data-urlencode "channel=2" --data-urlencode "DCS=0" --data-urlencode "flashsms=0" \
  --data-urlencode "number=91989xxxxxxx" --data-urlencode "text=Your OTP is 123456" \
  --data-urlencode "route=1" --data-urlencode "EntityId=YOUR_ENTITY_ID" \
  --data-urlencode "dlttemplateid=YOUR_TEMPLATE_ID"

Ready-made SDKs and plugins: SDKs.

WhatsApp, RCS, Email and the unified CPaaS API

These channels use their own keys, created in Panel › CPaaS, sent in the header Authorization: Bearer <key>.

WhatsApp Business API

Templates, session messages, media, bulk campaigns, status and opt-outs. Key: sghwa_...

WhatsApp API docs ›
PDF

Unified CPaaS API

One call for WhatsApp, SMS, RCS and Email with automatic fallback. POST /cpaas/v1/messages.ashx, key sghcp_...

Read more ›

RCS API

Rich cards, buttons and branded sender on Android.

RCS API PDF ›

Email API

Transactional and marketing email with tracking. POST /cpaas/email/api.ashx, key sghem_...

Email API PDF ›
curl -X POST "https://www.smsgatewayhub.com/cpaas/v1/messages.ashx" \
  -H "Authorization: Bearer sghcp_YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"channels":["whatsapp","sms"],"to":"9198xxxxxxxx","fallbackAfter":300,
       "whatsapp":{"template":"order_update","language":"en","variables":["1234"]},
       "sms":{"text":"Your order 1234 is shipped","sender":"TESTIN","templateId":"YOUR_TEMPLATE_ID","entityId":"YOUR_ENTITY_ID"}}'
Need help with integration? Write to support@smsgatewayhub.com with your username and the JobId or error code.