Skip to Content
WhatsAppSend WhatsApp

Send WhatsApp

POST /v1/whatsapp

Validates and queues one WhatsApp message for asynchronous delivery from a number connected to your organization. Retransmit normalizes the recipient number and detects its destination country. Poll Get WhatsApp or subscribe to Webhooks for the outcome.

Request body

FieldTypeRequiredDescription
fromstringNoConnected number to send from, in E.164 format. Required only when your organization has more than one number.
tostringYesOne recipient in international E.164 format.
typestringNotext (default), template, image, or document.
textstringFor textMessage body, from 1 to 4,096 characters. Also used as the caption for media when the media object has none.
preview_urlbooleanNoRender a preview for the first link in a text message. Defaults to false.
templateobjectFor template{ name, language, components? }. components is passed to WhatsApp verbatim.
imageobjectFor image{ link, caption? }. The link must be a public HTTPS URL.
documentobjectFor document{ link, caption?, filename? }.

Example

const { data, error } = await retransmit.whatsapp.send({ to: "+237670000000", text: "Your verification code is 482913", });

Template example

const { data, error } = await retransmit.whatsapp.send({ to: "+237670000000", type: "template", template: { name: "verification_code", language: "en_US", components: [ { type: "body", parameters: [{ type: "text", text: "482913" }] }, ], }, });

Response

202 Accepted

{ "id": "wa_xxxxxxxxxxxx", "status": "queued", "type": "text", "from": "+237650000000", "country": "CM", "created_at": "2026-09-01T12:00:00.000Z" }

country is the detected ISO 3166-1 alpha-2 destination.

Errors

StatusCodeMeaning
400invalid_jsonThe request body is not valid JSON.
401unauthorizedThe API key is missing, invalid, or revoked.
422validation_errorA field is invalid, the phone number is malformed, the object required by type is missing, or from is needed to choose between several numbers.
422no_whatsapp_accountNo connected WhatsApp number matches. Connect one in the dashboard.
500internal_errorThe message could not be created.
Last updated on