An SMS gateway looks simple: your app sends a request, and a text lands on someone's phone. For a technical team, it can be tempting to build one. Plug a GSM modem into a server, buy a SIM with an unlimited plan, and write a small service that turns HTTP calls into AT commands. On paper, the cost per message drops to almost nothing.

In the US, that plan fails for reasons that have little to do with code. Carriers filter business traffic that isn't registered, consumer SIM plans forbid application-to-person sending, and the TCPA puts the legal exposure on whoever sends the text. This post covers how gateways actually work, what each kind costs once everything is counted, and when a hosted API is the better choice. We make Ready, a messaging API, so we have a stake in the answer. We'll say plainly where a raw carrier API costs less.

What an SMS gateway actually is

A gateway is any system that takes a message from software and hands it to the mobile network. There are three common types:

  1. Modem or phone-based gateways. A GSM/LTE modem or an old Android phone with a SIM card. Your software talks to it over AT commands or a local app, and it sends texts the same way a person's phone does.
  2. SMPP connections. SMPP (Short Message Peer-to-Peer) is the binary protocol carriers and aggregators use between systems. It needs a contract with an aggregator, a persistent bind, and your own handling of delivery receipts and retries.
  3. Hosted HTTP APIs. A provider runs the SMPP side, the numbers and the carrier registration. You send JSON over HTTPS. Twilio, Telnyx, Plivo, Bandwidth and Ready all sit here, with different amounts of compliance tooling included.

All three end at the same place: a carrier decides whether your message is legitimate business traffic. That decision is where most homebrew gateways break.

How a message moves through the network

A US business text follows roughly this path:

  • Your app submits the message to a gateway.
  • The gateway passes it to an aggregator, which routes it to the recipient's carrier.
  • The carrier checks the sending number against its 10DLC registration: which brand owns it, which campaign it belongs to, and what that campaign said it would send.
  • Content filters scan the message body.
  • The message is delivered, and a delivery receipt comes back up the chain.

A modem gateway skips the aggregator and the registration step. It looks to the carrier like one person's phone sending a large number of nearly identical texts. Carrier systems are built to catch that pattern. If you want the background on the registration layer, our 10DLC explainer covers it.

Segments: the unit everything is billed in

Every gateway, homebrew or hosted, has to count segments correctly:

  • A single SMS segment holds 160 GSM-7 characters. Longer messages split into parts of 153 characters each.
  • One emoji or other non-GSM character drops the limit to 70 characters (67 per part in multipart messages).
  • A 140-character text with one emoji is 3 segments, not 1.

If you build your own system, you write this logic yourself, and you also handle concatenation headers so phones reassemble the parts. Ready swaps curly quotes, long dashes and ellipses for plain characters before sending, so those don't silently switch a message to unicode.

The real cost of a modem gateway

The hardware is cheap. The problems are what come after it. Here is an honest list of what a self-built modem gateway needs:

Cost itemModem gatewayHosted API
Hardware, SIMs, hostingYou buy and maintainNone
10DLC brand and campaign registrationNot available on a consumer SIMHandled by the provider
Carrier filtering of unregistered A2P trafficExpect blocking as volume growsRegistered route
ThroughputOne modem's send rate, then flaggedAbout 1 to 4 segments/sec on a fresh standard campaign, more at higher tiers
STOP/opt-out handling across campaignsBuild itIncluded (on Ready)
Quiet hours by recipient areaBuild itIncluded (on Ready)
DNC and litigator scrubbingBuy a data feed and build itOptional add-on
On-call when the SIM gets suspendedYour engineersProvider

The line that matters most is the second one. Consumer and small-business SIM plans are sold for person-to-person use. Sending application-generated traffic from them breaks the plan's terms, and carriers can suspend the line. You can't register a 10DLC brand and campaign against a prepaid SIM sitting in a modem, so the traffic stays unregistered, and unregistered traffic gets filtered. Our post on 10DLC enforcement and penalties covers what that costs in practice.

A worked example of engineering cost

Assumptions, stated plainly: building the gateway takes one engineer about four weeks. Maintaining it (modem resets, SIM swaps, segment bugs, opt-out edge cases) takes about two days a month after launch. Plug in your own loaded salary. At almost any US engineering cost, those 24 or so maintenance days a year cost more than a year of per-segment fees at modest volume. That's before you count the messages that never arrived.

SMPP: the right answer at real scale, the wrong one for most teams

SMPP is how large senders and aggregators connect, and it's a legitimate choice. It also means negotiating an aggregator contract, keeping binds alive, handling throttling responses, matching delivery receipts to message IDs, and doing 10DLC registration through whatever channel your aggregator exposes. Teams sending very high volume with dedicated messaging engineers sometimes go this route. For a SaaS platform that wants texting as a feature, it's usually months of work spent on infrastructure that customers never see.

What a hosted API costs, with the math

On Ready, the Standard rate is $0.0075 per segment plus a $0.0045 carrier fee per segment, sent or received. The carrier fee is itemized separately so you can see it. Our post on carrier fee pricing explains why that matters. The rate is the same at every volume. Enterprise pricing is custom: talk to us.

Example: 10,000 one-segment reminders a month.

  • Ready rate: 10,000 × $0.0075 = $75
  • Carrier fee: 10,000 × $0.0045
  • Registration: $25/mo for registration + $2/mo per number, so $27/mo with one number. The charge at submit is the first month, $25, and there is no setup fee.

This all-in figure excludes the compliance surcharge. TCPA/DNC scrubbing and landline validation each add $0.003 per segment when switched on for an account. Both are off by default.

Here's the honest part. Twilio lists around $0.0083 per segment, and raw CPaaS APIs like Telnyx, Plivo and Bandwidth are priced in the same low range. If your team only needs a delivery pipe and is ready to build registration flows, opt-out propagation, quiet hours and scrubbing yourself, a raw CPaaS is a fine choice. What our rate pays for is that those pieces already exist. Our comparison of the best SMS APIs for developers goes through the tradeoffs one provider at a time.

Compliance is the part you can't fake

Whatever gateway you choose, the TCPA exposure sits with the sender, at roughly $500 to $1,500 per text in statutory damages. A homebrew gateway has to rebuild every safeguard. On Ready, these come built in:

  • Self-serve 10DLC registration for brands and campaigns, in the app or through the API. Most approvals take 2 to 7 days. An account can send up to 500 texts a month at its normal per-text rate before it has to register.
  • STOP handling that spreads opt-outs across every campaign. Opted-out and numbers on your Ban list are refused before sending and aren't charged.
  • Quiet hours. A text sent during the recipient's quiet hours is held, sent later, and only charged when it goes out. Campaigns, drip campaigns and automations wait up to 24 hours for the window; a one-to-one or API text is held only if the window opens within 6 hours, otherwise it is refused with 409 QUIET_HOURS_BLOCK and must be resent; a one-to-one reply to someone who texted you in the last 24 hours goes out at any hour.
  • TCPA and DNC litigator scrubbing, at $0.005 per contact as a standalone scrub.
  • Attestation records of who sent each bulk or API send, to how many people, and when. This isn't a per-contact consent record. Your store or app still keeps each recipient's opt-in time, wording and page URL.

None of this makes you lawsuit-proof. It lowers risk, and compliance is still your responsibility. It also assumes the list was opted in. SMS is for consented contacts or leads who replied, not cold lists.

What switching to an API looks like in code

The whole send path becomes one request:

curl -X POST https://api.tryready.com/v1/messages \
  -H "X-API-Key: $READY_API_KEY" \
  -H "Idempotency-Key: 6f1c2a9e-3b7d-4e21-9a0c-1d5e8f2b7c44" \
  -H "Content-Type: application/json" \
  -d '{"to": "+12125550199", "body": "Your order #1042 has shipped.", "consent_attested": true}'

The Idempotency-Key makes sure a retried request never sends twice, a bug that homebrew gateways hit often. Our post on stopping duplicate texts covers the pattern. For sending to a list, POST /v1/messages/bulk takes up to 100 recipients per call. Platforms texting for their own customers can create sub-accounts, each with its own numbers and registration. See the messages docs and the quickstart.

The practical takeaway

Build your own gateway only if you're outside the US 10DLC system, or sending at a volume that justifies a dedicated SMPP team. For everyone else, choose between two hosted options:

  • A raw CPaaS if price per segment matters most and you'll build the compliance layer yourself.
  • A compliance-included API like Ready if you'd rather ship texting this quarter than maintain opt-out tables.

If you want to try ours, sign up and add a card. The first 20 one-to-one texts are free, so use them to test your integration before you register.