To schedule a text without time-zone bugs, store the send time as a UTC instant, send it as ISO 8601 with a Z or an explicit offset, and decide in advance what "9 AM tomorrow" means on a day when the clocks change. Most scheduling bugs are the third part, not the first two.
We make Ready, so the examples use the Ready request shape. The scheduling endpoint takes message, send_at and either contact_id or to, for one text to one contact, and nothing is charged until it sends. Details are in the scheduled messages docs, and our scheduling guide covers the basics.
Store instants, not wall clocks
A wall-clock time like "9:00 AM" is meaningless without a zone, and a zone is meaningless without a date, because offsets change. Keep two things: the recipient's IANA zone (America/Chicago, not CST) and the computed UTC instant.
from datetime import datetime
from zoneinfo import ZoneInfo
def to_utc(local_date, hour, minute, tz_name):
local = datetime(*local_date, hour, minute, tzinfo=ZoneInfo(tz_name))
return local.astimezone(ZoneInfo("UTC"))
send_at = to_utc((2027, 3, 14), 9, 0, "America/Chicago").isoformat() Send send_at with an offset or Z. A string without one is ambiguous, and the server can't know what you meant.
The two daylight saving traps
On the spring-forward day, a local time such as 2:30 AM doesn't exist. On the fall-back day, 1:30 AM happens twice. Your code needs a rule for each.
| Case | Example (US) | Sensible rule |
|---|---|---|
| Gap | 2:30 AM on the March change | Move to the next valid time (3:00 AM), or earlier to the previous evening |
| Overlap | 1:30 AM on the November change | Use the first occurrence, and say so in a comment |
Python's zoneinfo accepts the nonexistent time silently and gives an odd result, so test these two days explicitly. For campaigns that repeat ("every Monday at 9"), recompute the UTC instant from the local rule each week. Don't add 7 x 24 hours to the last one, or the send drifts by an hour after each change.
Which zone, and what the platform enforces
You usually know the recipient's zone from a profile field, not from the number. An area code is a hint, since people move and keep their number. Use the stored zone, and fall back to the area code when you have nothing else.
Quiet hours are enforced for you, based on the recipient's area. A campaign waits up to 24 hours for the window. An API text is held only if the window opens within 6 hours, and otherwise it isn't sent and you send it again once the window opens (a 409 QUIET_HOURS_BLOCK). So a scheduled 7 AM text can be pushed later or refused. Pick a send time that is inside the window with room to spare, such as 10 AM local, and see our post on the first-message time-of-day filter.
Test with a fake clock
Inject the current time into your scheduler, so a test can say "it's 1:59 AM on the fall-back day" and assert what happens. Add three fixtures: a normal day, the gap and the overlap, for at least one zone with DST and one without (such as America/Phoenix).
FAQ
Should I send times as local strings instead?
No. Send an instant with an offset. Local strings leave the interpretation to the server, and the same string means different moments in different zones.
What about contacts who travel?
A stored zone reflects where they live, which is usually what you want for a reminder. For a time-critical text, such as "your table is ready", send now.
Can I schedule a campaign this way?
The scheduling endpoint is for one text to one contact. For a list, send POST /campaigns with scheduled_at (see the campaigns API docs).
The short version
UTC instants, IANA zones, a rule for the gap and the overlap, and a send time well inside the window. The messages API docs cover immediate sends.
Cost and registration
A segment on the Standard rate is $0.0075 plus a $0.0045 carrier fee, 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.