Send WhatsApp messages
All WhatsApp messages are sent through the same endpoint as SMS and MMS,
POST /api/messaging/messages. Two things route a
message over WhatsApp instead of SMS/MMS:
- The
fromnumber is awhatsapp:-prefixed WhatsApp number (e.g.whatsapp:+15557654321). - You set a
message_type(for content messages) or atemplate_id(for template messages).
WhatsApp on SignalWire is in early-access alpha. You must connect a WhatsApp business number before you can send messages.
For the full request schema (every field, every message type’s body shape, and authentication),
see the Send a message API reference.
Messaging rules
Meta enforces specific rules about when and how a business can send WhatsApp messages:
Message types
Set message_type to one of the following for a content message. Each value determines the shape of
body, shown below.
Examples
Plain text
Interactive reply buttons
Send a message with tappable reply buttons, ideal for simple menus or surveys. The body.type is
button and each entry in action.buttons is a reply button (up to 3).
Template message
Use a template when reaching out to a customer
for the first time, or outside the 24-hour window. Provide the template_id and fill in any
placeholders; the template must be approved. Use an array for positional parameters or an object
for named parameters.