To move SMS sending code from Twilio to Ready, replace the send call, the webhook handlers and the opt-out lookup, and change nothing about your queue or product logic. The send itself is a small change. The work is in registration, numbers and webhooks.

We make Ready, so weigh this accordingly. We describe Twilio only in general terms here, so check the details of your own account against its docs. Our alternatives comparison covers cost and fit, and the number port checklist covers the phone numbers. This post covers the code.

The mapping

Your Twilio code does thisIn Ready
Create a message with to, from and bodyPOST /v1/messages with to, body and consent_attested. from is optional, and when it's left out Ready picks the number
Authenticate with account credentialsOne header, X-API-Key
Retry on your own, risking duplicatesSend an Idempotency-Key header (any UUID), so a repeated key means the request isn't sent twice
Send to a sender poolLeave from out. Ready uses the number this contact already texts with, or your number closest to their area code
A status callback URL per messageWebhooks, configured for the account. Event names are in the docs
Inbound webhook for repliesAn inbound webhook, same idea. See the receive guide
A subaccount per customerA sub-account per customer, with its own numbers and registration. See the sub-accounts docs
Your own opt-out tableGET /v1/opt-outs, and STOP is honored automatically

Before and after

If your current code is a function that takes a number and a body, this is the whole change:

def send_sms(to, body, key):
    return requests.post(
        "https://api.tryready.com/v1/messages",
        json={"to": to, "body": body, "consent_attested": True},
        headers={"X-API-Key": os.environ["READY_API_KEY"], "Idempotency-Key": key},
        timeout=15,
    )

Keep your queue, your retry policy and your outbox table. If you haven't stored an idempotency key on each job, this is the time to add one. Our idempotency post explains why.

What's different, and needs a decision

  • Consent. consent_attested is your statement that the recipient agreed to texts. An API send without it still goes out today, with a warning and no attestation recorded, so set it deliberately.
  • Registration. Ready registers 10DLC for you and you submit through the app or the registration API. Don't switch traffic until the registration for each customer is approved. Most approvals take 2 to 7 days.
  • Quiet hours. Ready enforces them. An API text is held only if the window opens within 6 hours, otherwise it's refused with a 409 QUIET_HOURS_BLOCK. Add that to your error mapping.
  • Opt-outs. Export your opt-out history before you cut over and import it, so nobody who said STOP gets a text. See preserving opt-out history.

Cut over in stages

  1. Put the send behind a flag, as in our rollout guide, and start with staff numbers.
  2. Run a test key in CI for the contract test.
  3. Move one low-risk message type, such as receipts, for 1 percent of users, then more.
  4. Move webhooks once sends are stable, and keep the old handler until traffic stops.
  5. Port numbers last, per the checklist.

Run both sides in parallel only for different message types or different customers. Sending the same text through both is how people get two.

FAQ

Do I have to port my numbers?

No, but texting from a new number means a new registration and a cold sender reputation, so most teams port. See the checklist.

Will my webhook handler work unchanged?

No. The payload shape and the signature scheme are different, so write a new handler and keep the old one until traffic stops.

How long does a migration take?

The code change is days. Registration and number porting set the schedule, since most approvals take 2 to 7 days.

The short version

One request to rewrite, one header to add, webhooks and opt-outs to carry over, and a staged cutover. 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.