Skip to main content

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 + in the phone number (%2B) and inspect its campaign state:
When 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 Idempotency-Key header so network retries never double-send:
A 201 response returns the message with its id and initial status (such as queued).Useful options on POST /messages:
  • Specify from, or pass campaign_id to let the campaign pick one of its numbers.
  • body can be up to 1,600 characters.
  • max_price_micro_usd refuses the message if it would cost more than your ceiling.
  • send_at schedules delivery between 15 minutes and 35 days ahead (requires campaign_id).
  • Call GET /prices?parts=3 to 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.