Send SMS
POST /v1/smsValidates 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
| Field | Type | Required | Description |
|---|---|---|---|
from | string | No | Sender 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. |
to | string | string[] | Yes | One recipient or up to 50 in international E.164 format. All recipients must be in the same country. |
text | string | Yes | Message body, from 1 to 1,600 characters. |
provider | "sns" | "mtn" | "orange" | No | Pins 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
Node.js
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
| Status | Code | Meaning |
|---|---|---|
400 | invalid_json | The request body is not valid JSON. |
401 | unauthorized | The API key is missing, invalid, or revoked. |
422 | validation_error | A field is invalid, phone numbers are malformed, or recipients span multiple countries. |
422 | no_route | No SMS provider, or not the requested one, is configured for the destination country. |
422 | sender_not_allowed | from is not a sender ID your organization has approved for the destination country. |
500 | internal_error | The message could not be created. |
Last updated on