Skip to Content
SMSSend SMS

Send SMS

POST /v1/sms

Validates and queues an SMS for asynchronous delivery. Retransmit normalizes the recipient numbers, detects their destination country, and selects an available provider, or uses the one you name in provider. Poll Get SMS or subscribe to Webhooks for the outcome.

Request body

FieldTypeRequiredDescription
fromstringNoSender ID shown on the recipient’s device. Must be approved for the destination country. See Sender IDs. Defaults to your approved sender for that country.
tostring | string[]YesOne recipient or up to 50 in international E.164 format. All recipients must be in the same country.
textstringYesMessage body, from 1 to 1,600 characters.
provider"sns" | "mtn" | "orange"NoPins the send to one carrier. sns covers every destination; the others only the countries we have that carrier in. Omit it to route by destination country and price. See Choosing a provider.

Example

const { data, error } = await retransmit.sms.send({ from: "Acme", to: "+237670000000", text: "Your verification code is 482913", // Optional. Leave it out to let Retransmit pick the route. provider: "sns", });

Response

202 Accepted

{ "id": "sms_xxxxxxxxxxxx", "status": "queued", "country": "CM", "segments": 1, "created_at": "2026-09-01T12:00:00.000Z" }

country is the detected ISO 3166-1 alpha-2 destination. segments is the number of billable SMS parts.

Errors

StatusCodeMeaning
400invalid_jsonThe request body is not valid JSON.
401unauthorizedThe API key is missing, invalid, or revoked.
422validation_errorA field is invalid, phone numbers are malformed, or recipients span multiple countries.
422no_routeNo SMS provider, or not the requested one, is configured for the destination country.
422sender_not_allowedfrom is not a sender ID your organization has approved for the destination country.
500internal_errorThe message could not be created.
Last updated on