Send WhatsApp messages with the same API key and SDK you use for email and SMS. Messages go out from your own WhatsApp Business number, so recipients see your business name and replies come back to you.
Connect a number
Open WhatsApp in the dashboard and click Connect a number. Meta’s
signup dialog walks you through logging in with Facebook and picking or
creating your business. No Meta developer account or code is needed. Most
organizations connect one number. If you connect several, pass from when
sending.
There are two ways to add the number.
A new number. Meta verifies it by SMS or voice call. The number must not be in use in the WhatsApp or WhatsApp Business app.
The number you already use in the WhatsApp Business app. Choose that option in the dialog and scan the QR code with your phone. The number keeps working in the app, with your chats and contacts, and Retransmit sends from it as well. Meta calls this Coexistence. It needs WhatsApp Business app 2.24.17 or newer, and a few things change on the phone: linked companion devices are unlinked, and disappearing messages, view once, live location and broadcast lists are turned off in one-to-one chats. Meta limits these numbers to a lower send rate than a dedicated number. Messages you send from the app do not appear in the Retransmit log.
To unlink a WhatsApp Business app number, open Settings, Account, Business Platform in the app. Retransmit marks it disconnected when Meta tells us.
Send a message
import { Retransmit } from "retransmit.dev";
const retransmit = new Retransmit(process.env.RETRANSMIT_API_KEY);
const { data, error } = await retransmit.whatsapp.send({
to: "+237670000000",
text: "Your order is ready for pickup.",
});Recipients must be in international E.164 format. Each request targets one
recipient and returns the message id you use to track it.
Templates and the 24-hour window
A business can only start a conversation with an approved template. Once
the recipient replies, a 24-hour customer service window opens and you can
send free-form text, image, and document messages until it closes.
await retransmit.whatsapp.send({
to: "+237670000000",
type: "template",
template: {
name: "order_ready",
language: "en_US",
components: [
{ type: "body", parameters: [{ type: "text", text: "#48213" }] },
],
},
});Create templates under WhatsApp → Templates in the dashboard. Write the
header, body, footer and buttons, put {{1}}, {{2}}… where a value changes
per message, and give each placeholder an example. The preview shows the
message as the recipient will see it, and submitting sends the template to
Meta for review. Once it is approved, open it to copy the send call with one
parameters entry per placeholder.
Templates made in WhatsApp Manager show up after Sync from Meta. name
and language must match the approved template exactly.
A free-form message sent outside the window is accepted by the API but comes
back as failed with the provider’s error once the worker sends it.
Media
Images and documents are sent by public link. WhatsApp downloads the file at send time, so the URL must be reachable without authentication.
await retransmit.whatsapp.send({
to: "+237670000000",
type: "document",
document: {
link: "https://files.example.com/invoices/48213.pdf",
filename: "invoice-48213.pdf",
caption: "Your invoice",
},
});What a message costs
WhatsApp is pay as you go on every plan, so a
payment method is required
before the first send; without one a send fails with
402 quota_exceeded.
The rate depends on the destination country and on the message’s category, which follows the template it uses — marketing, utility or authentication. A free-form reply inside the 24-hour customer service window is billed at the service rate. Marketing is the dearest category by some way, so a template’s category is a pricing decision as much as an approval one.
Usage appears on your monthly invoice as a single WhatsApp line, with the running total for the period on the billing page .
Track delivery
Poll retransmit.whatsapp.get(id) or GET /v1/whatsapp/:id
for the current status and event history. For push updates, subscribe to
whatsapp.sent, whatsapp.delivered, whatsapp.read, and whatsapp.failed
webhooks.
Replies
When a recipient answers, Retransmit delivers the message to your webhook
endpoints as whatsapp.received. See Receive messages.
See Send WhatsApp for the full request contract.