What is an SMS HTTP API?

An SMS HTTP API is a simple web endpoint your application calls to send a message. You build a URL (or a POST request) with a few parameters, your server sends it, and the gateway delivers the SMS and returns a status you can store. It is how websites, apps and back-office systems send OTPs, alerts and notifications automatically.

Bulk SMS HTTP API integration
Your app calls a single URL to send an SMS or OTP.

How to integrate, step by step

  1. Get your API credentialsSign up and generate your API key from the panel. Keep it secret and server-side.
  2. Register your header and template on DLTEvery send needs a registered header and a matching content template. We help you do this free.
  3. Build the requestPass your credentials, the sender ID, the recipient number, the message text and the message type.
  4. Send and read the responseThe API returns a message ID and status you store against the recipient.
  5. Track deliveryPoll the delivery-report endpoint or receive a webhook to record delivered or failed.

A typical request

Most gateways accept a single GET or POST call. The example below is illustrative, your account's API page shows the exact base URL to use. Values are placeholders, and you should never put a real API key in client-side code:

GET https://your-gateway/api/send?
  user=YOUR_USER&apikey=YOUR_API_KEY&
  mobile=9XXXXXXXXX&senderid=MYSHOP&
  message=Your%20OTP%20is%20123456&type=txt

A POST body carrying the same fields works the same way and keeps your key out of server logs:

POST https://your-gateway/api/send
Content-Type: application/x-www-form-urlencoded

user=YOUR_USER&apikey=YOUR_API_KEY&senderid=MYSHOP
&mobile=9XXXXXXXXX&message=Your+OTP+is+123456&type=txt

The fields are the same across most providers:

  • user and apikey: your account credentials.
  • senderid: your registered 6-character header (for example MYSHOP).
  • mobile: the recipient number (or a comma-separated list).
  • message: the URL-encoded message text, matching your registered template.
  • type: txt for plain text or uni for Unicode (regional languages).

For the exact endpoint, parameter names and the response format, always follow your provider's current API documentation, these can change over time. Our live values are on the SMS API page.

Reading the response and delivery report

A successful send returns a message ID. Store it, then use the delivery-report endpoint or a webhook to update the status to delivered or failed. This gives you a complete audit trail for every OTP and alert, which matters for login and payment flows.

OTP and transactional sends

For OTPs and banking alerts, use a transactional template and route. SmsHorizon delivers OTPs in sub-3-second time on priority transactional routing, with 99.9% uptime, so codes arrive while the customer is still on the screen. See the full SMS API page for endpoints and parameters.

You must be DLT-registered

Every API send still follows the DLT rules: a registered header and an approved content template, with any links or numbers in the template whitelisted. A message that does not match a registered template is blocked, even over the API. Our DLT registration guide walks through it, and the character limits guide shows how text length affects each send.

FAQs

SMS HTTP API, common questions

What is an SMS HTTP API?
It is a web endpoint your application calls to send an SMS. You pass a few parameters such as the sender ID, recipient number and message, and the gateway delivers the message and returns a status.
How do I send SMS from my website?
Generate an API key in the panel, register your header and template on DLT, then have your server call the API endpoint with your credentials, sender ID, recipient number and message text.
Do API sends need DLT registration?
Yes. Every commercial send, including over the API, needs a registered header and an approved content template. Messages that do not match a registered template are blocked.
What parameters does the SMS API need?
Typically your user and API key, the sender ID (header), the recipient mobile number, the message text and the message type (text or Unicode).
How do I send an OTP through the API?
Use a transactional template and route, and pass the OTP in the message variable. SmsHorizon delivers OTPs in sub-3-second time on priority transactional routing.
How do I check delivery status?
Store the message ID returned on send, then poll the delivery-report endpoint or receive a webhook that updates the status to delivered or failed.

Questions? Contact us

Talk to a real human, no bots.

Contact us