To roll out a texting feature safely, put it behind a flag, assign users to cohorts with a stable hash, ramp the share in steps while you watch failures and opt-outs, and keep a kill switch that stops sends immediately. A text can't be unsent, so the rollout plan matters more than it does for a UI change.

We make Ready, so the numbers below come from how Ready bills and registers. The pattern applies to any provider, and our forecasting guide helps you size the spend first.

Stable cohorts

Use a hash of the user ID, not a random number per request. Otherwise a user flips in and out of the feature, and one person can get a text on Monday and none on Tuesday.

import hashlib

def in_rollout(user_id: str, percent: int, salt: str = "sms-reminders-v1") -> bool:
    h = int(hashlib.sha256(f"{salt}:{user_id}".encode()).hexdigest()[:8], 16)
    return (h % 100) < percent

The salt lets you reshuffle for the next feature, so the same 1 percent isn't always the guinea pig.

A ramp that watches the right numbers

StepShareHold until you've seen
0Staff onlyTexts arrive, content reads right, STOP works
11%Failure and refusal rates, support tickets
210%Opt-out rate, cost per user against forecast
350%Delivery trends, carrier filtering signs
4100%Steady state

Hold each step long enough to cover the thing you're testing. A reminder feature needs a few days of real appointments, not a few hours. Our delivery rate monitoring post lists the signals to chart, and the observability guide shows how to log sends so you can slice by cohort.

Registration changes the ramp

An account can send up to 500 texts a month before it registers for 10DLC, and most approvals take 2 to 7 days. For a platform that texts for its customers, each customer has its own sub-account and registration, so your rollout is really per customer. Don't ramp a customer past the cap before their registration is in. A refusal on the cap is a rollout bug, not a carrier problem. Our multi-tenant guide covers sub-accounts.

Caps and a kill switch

def may_send(tenant_id: str) -> bool:
    if flags.get("sms.kill_switch"):           # global, flips in seconds
        return False
    if spend_today(tenant_id) >= flags.get("sms.daily_cap_usd", 20):
        return False
    return in_rollout(tenant_id, flags.get("sms.rollout_percent", 0))

Check the switch at send time, in the worker, and not only when the job is created, so a flip also stops the queue that's already built. Decide what a blocked send does: drop it, or park it for review. Dropping a code is fine. Dropping a receipt may not be.

Make the first send small and boring

Start with a message people expect, such as a reminder for an appointment they booked. A cold first message to a big cohort is how a new sender number gets filtered. The warm-up post covers it.

FAQ

Should the flag be per user or per customer account?

On a platform, per customer account for who gets the feature, and per recipient for sampling inside it. Keep the two flags separate.

What's a good stop condition?

Set numeric ones beforehand: for example, pause if the opt-out rate in a cohort is several times your email unsubscribe rate, or if refusals jump after a template change.

Can I rehearse the rollout?

Yes. Use a test key, which simulates every send with no card, number or charge, to run the flag logic end to end.

The short version

Stable hash cohorts, a ramp with named hold criteria, a spend cap and a kill switch checked at send time. The messages API docs cover the send.

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.