Prerequisites
- A credential with
messages:send(see Authentication). - A US number on your account assigned to an approved 10DLC campaign with carrier confirmation. See Register a number for SMS if your number is not registered yet.
- Available balance. The price of a message is held when it is accepted.
Send a message
1
Check that the number can send
Percent-encode the When
+ in the phone number (%2B) and inspect its campaign state:sms.enabled is false, sms.blocked_reason explains why: no_campaign, campaign_not_approved, carrier_assignment_pending, number_not_active, or channel_not_supported.2
Send the SMS
Include a unique A
Idempotency-Key header so network retries never double-send:201 response returns the message with its id and initial status (such as queued).Useful options on POST /messages:- Specify
from, or passcampaign_idto let the campaign pick one of its numbers. bodycan be up to 1,600 characters.max_price_micro_usdrefuses the message if it would cost more than your ceiling.send_atschedules delivery between 15 minutes and 35 days ahead (requirescampaign_id).- Call
GET /prices?parts=3to preview the estimated charge for a 3-part message before sending.
3
Follow delivery
Subscribe a webhook to
message.sent, message.delivered, and message.failed, or fetch the message directly:status moves through queued → sending → sent → delivered, or ends as undelivered or failed with an error_code. segments and price populate once known.Common refusals
Register a number for SMS
US carriers require 10DLC registration before a local number can send SMS. Every step runs through this API:Carrier review times are estimates, not guarantees. You can purchase numbers before or after campaign approval — voice works immediately without registration. Subscribe to
brand.updated, campaign.updated, and number.updated webhooks instead of polling.A rejected campaign fee is not refunded. Submitting a corrected campaign requires a new POST /campaigns request with a new Idempotency-Key and fee.