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).
For the full request schema (every field, every message type’s body shape, and authentication),
see the Send a message API reference. To send SMS and
MMS from the same endpoint, or to handle incoming texts, see
Send and receive messages.
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.
Send a plain text WhatsApp message. Allowed only within the 24-hour customer service window.
Send a call-to-action URL interactive message. The body.type is cta_url and action carries the button's display text and URL.
Send a list interactive message (up to 10 items).
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.