An SMS gateway is the system that takes a text message from your application or web platform and hands it to mobile networks for delivery to a phone. It accepts your request over an API, picks a route to the recipient’s operator, and reports back whether each message was delivered.
That sounds simple, but the route a gateway chooses decides whether your one-time codes arrive in seconds, arrive late or never arrive at all. This guide explains what happens inside an SMS gateway, how it differs from an SMSC and an aggregator, why direct and grey routes behave so differently, and what to check before you choose a provider.
How does an SMS gateway work?
Every A2P (application-to-person) message follows roughly the same path, whichever provider you use:
- Submission. Your system sends the message to the gateway, usually through an HTTP API or an SMPP connection. The request carries the destination number, the text and the sender ID.
- Validation and preparation. The gateway checks the number format, works out the character encoding (GSM-7 for plain Latin text, UCS-2 for emoji and most non-Latin scripts) and splits long text into segments.
- Routing. It identifies the recipient’s current network, taking number portability into account, and selects a route to that operator based on quality, price and local rules.
- Hand-off to the operator. The message is passed, directly or through a partner, to the Short Message Service Centre (SMSC) of the recipient’s network.
- Delivery to the handset. The SMSC delivers the message to the phone, or stores it and retries if the phone is switched off or out of coverage.
- Delivery report. A status comes back along the same chain and the gateway passes it to you, typically as a webhook.
The steps you control are the first and last. Everything in between is the provider’s routing, which is why two gateways can give very different results for the same message.
What is an SMSC, and how is it different from an SMS gateway?
An SMSC is the network element inside a mobile operator that stores and forwards text messages. Its behaviour is defined in the 3GPP specification TS 23.040, Technical realization of the Short Message Service. When a phone is unreachable, the SMSC keeps the message and tries again until it is delivered or its validity period runs out.
An SMS gateway sits in front of many SMSCs. It gives businesses one interface, one account and one set of delivery reports for thousands of networks, instead of a separate technical and commercial agreement with every operator.
| Component | Who runs it | What it does |
|---|---|---|
| SMSC | Mobile network operator | Stores and forwards messages to handsets on its own network |
| SMS gateway | Messaging provider | Accepts messages from businesses, routes them to operators and returns delivery reports |
| Aggregator or hub | Wholesale intermediary | Buys termination from operators or other hubs and resells it to providers |
Who sits between your app and the phone?
Very few messages go straight from a business to the recipient’s operator. A typical chain is your application, your provider’s gateway, possibly one or more aggregators, and finally the terminating operator. Some providers are also licensed operators or hold direct operator connections; others resell capacity they buy from wholesale hubs.
Each extra hop has a cost. It adds latency, adds a margin to the price, and makes delivery reports less reliable, because every hand-off is another place where a status can be lost, delayed or generated by the intermediary rather than the network. When you evaluate a provider, ask how many hops sit between their gateway and the operators in your main markets.
What is the difference between direct and grey routes?
A direct route (sometimes called a white route) carries A2P traffic to the terminating operator under an agreement that operator recognises, at the rate it charges for business messaging. A grey route delivers the same message by a path the operator has not authorised. The GSMA describes grey route traffic as traffic which circumvents legitimate paths, often originated from SIM boxes that make business messages look like person-to-person texts.
Grey routes look cheap, but they are unstable for anyone sending messages that matter:
- Operators block them. Many networks run SMS firewalls whose job is to let only legitimate, billed A2P traffic reach their subscribers. A grey route can work for weeks and then stop overnight.
- Your sender ID changes. Traffic sent through SIM boxes usually arrives from a random mobile number instead of your brand name, which confuses customers and invites fraud complaints.
- Delivery reports become unreliable. Some grey routes return “delivered” statuses that no handset ever produced, so your dashboards look healthy while customers never receive their codes.
Warning signs include prices well below what other reputable providers charge for the same country, numeric senders appearing where you registered an alphanumeric one, and delivery rates that swing from one week to the next. For one-time passcodes, payment alerts and anything time-critical, a direct route is the only sensible choice.
How do you connect to an SMS gateway: HTTP API or SMPP?
Most providers offer two ways in. An HTTP API is a set of web endpoints: you send an HTTPS request for each message or batch and receive status updates as webhooks. SMPP (Short Message Peer-to-Peer, published by the SMPP Developers Forum as the SMPP v3.4 specification) is a telecom protocol that keeps a persistent connection open and suits high, sustained volumes.
| Factor | HTTP API | SMPP |
|---|---|---|
| Setup | Minutes: create a key and send a request | Longer: credentials, IP allowlisting, client software and tuning |
| Best for | Apps, websites, CRMs, most business traffic | Carriers, aggregators and very high-volume senders |
| Delivery reports | Webhooks to your callback URL | Returned on the open session as deliver_sm |
For most teams, HTTP is the right starting point. A single message through the SMS.to API looks like this:
curl -X POST https://api.sms.to/sms/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "Your verification code is 482913. It expires in 5 minutes.",
"to": "+35794000001",
"sender_id": "SMSto",
"callback_url": "https://example.com/sms/status"
}'
The callback_url is where status updates for that message are posted. For a detailed comparison, including when it is worth moving to SMPP, read SMPP API vs HTTP API, or see how SMPP works for the protocol itself.
What do delivery reports tell you?
A delivery report (DLR) is the status the network returns for each message. Depending on the route and destination, you may receive intermediate statuses (accepted by the provider, sent to the operator) and a final one: delivered, failed, rejected or expired. Failure reasons help you tell a temporarily unreachable phone from a number that no longer exists.
Use delivery reports to:
- stop retrying numbers that are permanently invalid, which saves money on every future send
- trigger a fallback, such as a voice call or another channel, when an OTP has not been delivered within your timeout
- spot routing problems early, for example a sudden drop in delivery to one network
- reconcile what you were billed with what actually arrived
Treat delivery reports as strong evidence rather than absolute proof. Their accuracy depends on the route: some operators do not return handset-level receipts, and grey routes can fake them. The best check is to test with real phones on the main networks in each country you send to and compare what arrived with what the reports said.
How do you choose an SMS gateway provider?
Price per message matters, but it is the last thing to compare, not the first. Work through these points in order:
- Route quality. Ask whether traffic to your key countries goes over direct operator connections, and how many intermediaries are involved.
- Local rules and sender IDs. Many countries require sender registration. The US has 10DLC and toll-free verification for SMS to the United States, and bulk SMS in India requires DLT registration of senders and templates. A good provider tells you before launch, not after messages fail.
- Delivery report fidelity. Check which statuses you receive, how quickly, and whether failure reasons are included.
- Throughput and queueing. Confirm the sending rate available for your peaks, and what happens to messages above it.
- Encoding and length. One emoji switches a message to UCS-2 and cuts a single message from 160 to 70 characters. Check your templates with a tool such as the SMS length calculator before you price a campaign.
- Number validation. HLR and MNP lookups remove dead numbers and route ported ones correctly. See how HLR and MNP checks cut wasted spend.
- Compliance tools. Look for opt-out handling, consent records and separate streams for transactional and marketing traffic.
- Support and transparency. A public status page, clear error codes and people who answer during an incident are worth more than a small saving per message.
- Pricing model. Compare the price per segment rather than per message, check whether failed messages are charged, and ask about volume discounts.
Before you commit, run a test on real handsets in each target country. A few hundred messages across the main networks will tell you more than any sales deck.
How SMS.to handles this
SMS.to is operated by Intergo Telecom, a licensed telecom and CPaaS operator in Paphos, Cyprus, that has been building messaging infrastructure since 2014. That operator background shapes how the SMS.to gateway and programmable SMS API work:
- Two ways to connect. Use the HTTP SMS API for most integrations, or the SMPP gateway, designed for 2,000+ messages per second on supported setups, for high-volume traffic.
- Direct, high-quality routes. Traffic uses direct and high-quality connections with MNOs and MVNOs, with smart routing chosen per destination.
- Delivery visibility. Delivery reports arrive as webhooks on your callback URL over HTTP, or as final and intermediate DLRs over SMPP, alongside message logs in the dashboard.
- Clean numbers before you send. The HLR and MNP lookup API returns reachability, portability and the current network.
- Compliance built in. Opt-in and opt-out tools, GDPR-aligned processing and guidance on sender ID registration for each market.
- Clear pricing. Pay as you go from $0.023 per SMS, varying by country, with volume discounts. See the full SMS pricing by country.
FAQs
Is an SMS gateway the same as an SMS API?
Not quite. The SMS gateway is the whole system that routes messages to mobile networks. The SMS API is the interface your software uses to send messages into that gateway and receive statuses back.
Do I need SMPP to use an SMS gateway?
No. Most businesses use an HTTP API, which works from any programming language in minutes. SMPP is worth it for carriers, aggregators and senders with very high, sustained volumes.
Why does a message show as delivered when the customer did not receive it?
Usually because the route is unreliable. Some intermediaries and grey routes return delivered statuses the handset never produced. Test on real phones and ask your provider how each route reports delivery.
Can an SMS gateway receive messages as well as send them?
Yes, if you use a number that can receive replies, such as a virtual mobile number or short code. Inbound messages are passed to your system as webhooks, which lets you run two-way conversations and surveys.
How much does an SMS gateway cost?
Most providers charge per message segment, and prices vary by destination country and route quality. SMS.to has no setup fees, starts from $0.023 per SMS depending on country, and offers volume discounts.
Ready to send your first message through a direct-route gateway? Create a free account, no credit card needed, grab your API key and watch your first delivery report arrive in minutes.