Skip to main content
POST

Overview

Sends a WhatsApp text message to a recipient using one of your connected WhatsApp Business numbers. The number must be connected via the Magpipe dashboard before it can be used.
WhatsApp enforces a 24-hour messaging window. You can only send free-form messages within 24 hours of the recipient’s last message to you. Attempts to message outside this window will be rejected by Meta.

Request

Headers

string
required
Bearer token for authentication.
string
required
Must be application/json

Body Parameters

string
required
The Meta phone number ID for your WhatsApp Business number. Found in the Meta Business Manager or in the Magpipe Deploy tab after connecting.Example: "1026733600525693"
string
required
The recipient’s WhatsApp ID — their phone number in international format without the + prefix.Example: "14155551234"
string
required
The text message content.Example: "Hi! Your appointment is confirmed for tomorrow at 2pm."
object
Optional arbitrary JSON object (must be a plain object — arrays are ignored) stored against this message. When the recipient replies, Magpipe echoes this metadata back on the inbound event so you can attribute the reply to your own record (e.g. a schedule, project, or ticket).Example: { "schedule_id": "sch_123", "project_id": "proj_456" }

Response

boolean
Whether the message was sent successfully.
string
The WhatsApp message ID returned by Meta.
object
The stored message record from Magpipe.

Example Request

Example Response

Error Responses