Skip to main content
POST

Overview

Sends one text to one or more recipients (up to 10 per call), with automatic carrier routing. You pay per segment per recipient.

Authentication

Requires x402 payment. The first call returns a quote (402). The second call, with payment, sends.

Headers

string
Opt-in replay safety for the paid send (the request carrying X-Quote-ID). Pass any string up to 255 characters ([A-Za-z0-9_.:-]). Retrying the same key with the same to_number and message returns the original response without sending or charging again. The same key with a different to_number or message returns 422 idempotency_key_reuse, and a retry while the first request is still running returns 409 request_in_flight. The key is checked before the quote, so a retry that reuses the key replays even if it carries a new X-Quote-ID.Without a key, a quote still pays for one send: retrying with the same X-Quote-ID is rejected with 400 invalid_quote (quote already used), so you cannot tell from that retry whether the first send went out. Requesting a new quote and paying again sends the text again and charges again. Send an Idempotency-Key whenever you might retry.

Request Body

string
required
SMS message body. Maximum 1600 characters.
string | string[]
required
Phone number(s) in E.164 format (e.g., +14155551234). Maximum 10 recipients.

Quote Response (402)

string
Quote ID to include in the payment request
number
Number of recipients
number
Number of SMS segments (messages over 160 chars are split)
string
Rate per segment per recipient
string
Total cost in USD

Execution Response (202)

string
Job ID for tracking delivery
string
processing (messages are being sent)
string[]
Recipient numbers
number
Number of segments per message

Completed Job Result

number
Messages delivered
number
Failed deliveries
number
Total messages sent
string
all_delivered or partial_delivery

Message Segments

The character set decides how a message is split into segments: The carrier reassembles long messages.

Error Handling

Content Blocked
Moderation Unavailable (503)
A held send charges nothing: a payment already settled is returned as credit.
Emergency Number Blocked
See Pricing for SMS costs and segment sizing details.