Use plain REST for sending texts when your language has a decent HTTP client and you want few dependencies, and use an SDK when you need generated types, built-in retries or many endpoints. For sending an SMS (one POST with a handful of fields), REST is usually enough.
We make Ready, so we're biased, and this post uses the Ready REST API for its examples. We document the API as plain HTTPS and JSON, and the docs are the place to check whether a client library exists for your language before you rely on one.
The comparison
| Factor | REST (fetch, requests, net/http) | SDK |
|---|---|---|
| Dependencies | None beyond your HTTP client | One more package to audit and update |
| Request shape | Visible in your code | Hidden behind method names |
| Typing | You write a few types | Often generated |
| Retries and timeouts | You write them (about 15 lines) | Sometimes built in, sometimes defaults you don't want |
| New endpoints | Available the day they ship | After the SDK is released |
| Debugging | You see the raw request and response | You see the SDK's view |
| Testing | Stub HTTP | Mock the SDK class |
| Language coverage | Anything with HTTP | Only languages the vendor supports |
When REST wins
Sending an SMS is one request. The hard parts, which are retries, idempotency and queueing, are yours either way, because an SDK can't know your database. Writing 30 lines you understand beats importing a package whose retry defaults you haven't read. REST also keeps you portable: a thin function of your own is easier to swap than SDK types that spread through your codebase. Our adapter pattern post shows how to keep the call in one place. Ready answers within 30 s, so the sample waits 35 s; a 409 idempotency_in_progress on a retry means the first request is still running.
export async function sendSms(to, body, key) {
const res = await fetch('https://api.tryready.com/v1/messages', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'X-API-Key': process.env.READY_API_KEY, 'Idempotency-Key': key },
body: JSON.stringify({ to, body, consent_attested: true }),
signal: AbortSignal.timeout(35_000),
});
return res.status;
} When an SDK wins
An SDK earns its place when you use many endpoints (numbers, registration, webhooks, reporting) and want typed models for all of them, when your team lacks HTTP experience in that language, or when the SDK handles an awkward auth scheme such as request signing. If you do use one, check three things before shipping: what its default timeout is, whether it retries on its own, and whether it lets you set the idempotency header. An SDK that silently retries a send without a stable key can turn a timeout into a duplicate text.
A middle path
Write the thin client yourself, and generate types from the API's spec if one is published. You get typing without taking on someone else's retry behavior. Our TypeScript client guide shows a small typed client that stays under 100 lines.
What neither one does
Neither an SDK nor raw REST gives you queueing, an outbox, idempotent job creation or webhook verification. Those live in your app, and the retries guide and the queue design post cover them.
FAQ
Is REST slower than an SDK?
No. An SDK makes the same HTTP request. Any difference comes from connection reuse, so create one client for the process either way.
Which is easier to upgrade?
REST, usually. There's no version of a library to bump, only an API version, and breaking changes arrive as documented API changes. Read the changelog either way.
Can I try the API without writing code?
Yes. Our curl guide sends a first text from a terminal.
The short version
For one POST with a few fields, plain REST and a 30-line wrapper is usually the better trade. Use an SDK for breadth, and read its retry defaults first. The messages API docs cover the request.
Cost and registration
A segment on the Standard rate is $0.0075 plus a $0.0045 carrier fee, passed through at cost, excluding optional screening. An account can send up to 500 texts a month before it registers for 10DLC, and most approvals take 2 to 7 days. See pricing for the full list.