Send a message
Three kinds of message, and one WhatsApp rule that decides which one you may send.
The 24-hour window
WhatsApp does not let a business message anyone it likes, whenever it likes.
- If the user messaged you in the last 24 hours, you can send free-form text.
- Otherwise you can only send a template Meta has already approved.
Sending text outside the window fails with window_expired. That is WhatsApp's rule, not ours, and
there is no way around it.
A test key ignores the window — see Test keys and the sandbox.
Text
Templates
Pre-approved messages with placeholders. These work at any time.
Only approved templates send. See Create a template.
Media
Send the med_ id you got from Upload media, not the bytes.
Delivery status
send returns immediately with status: "accepted". That means we took it, not that it arrived.
| Status | Meaning |
|---|---|
accepted | We have it. |
sent | Handed to WhatsApp. |
delivered | On the user's device. |
read | The user opened it. |
failed | It will not arrive. error says why. |
Two ways to follow it:
Or let us push it — see Receive webhooks. Webhooks are better: no polling, and you find out the moment it happens.
Inbound replies
There is no API to read what a user sends back. Replies arrive only as an inbound.received
webhook. If you need conversation history, store the events as they arrive.
Sending number
Every message from your account goes out from one sending number.