Send WhatsApp message
POST/message-server/whatsapp/send
Sends a WhatsApp message. The content is one of the following, mutually exclusive: one of the two is required.
- Approved template (
template): a template approved by Meta. - Free-form message (
body): only within the 24h window from the user's last message.
Fallback and tracked links:
- Fallback: if the message cannot be delivered via WhatsApp, a fallback to RCS (
fallbackRcs) and/or SMS (fallbackSms) can be configured. The fallbacks apply only if your account supports mixed-channel sending; otherwise they are ignored. - Tracked links in the body: for templates with
{shortLinkT1}in the body, insert theshortLinkT1placeholder in theplaceholdersmap with the actual destination URL. - Tracked URL buttons: the URL buttons of templates created with
trackButtonLinks: trueare tracked automatically, and there is nothing to pass.
Request
Responses
- 202
- 400
- 401
- 403
- 500
- 511
Request accepted. Check results.whatsapp.accepted to see whether the message was accepted.
accepted: truemeans the message was accepted for sending, not that it was delivered. Delivery confirmation arrives via webhook.- With fallbacks,
resultsalso carriesrcsand/orsms: those messages are prepared now and sent only if the previous channel fails. In that caseresults.whatsapp.acceptedandresults.rcs.acceptedare alwaystrue, and only the SMS can be rejected at this stage. - Omitted values: the results of the channels not involved, and
reasonswhen the message is accepted.
Invalid request. Fields that fail validation are listed in data, an object that maps the path of each invalid field (such as sendWhatsAppMessage.request.destination) to its messages; a body that cannot be read gives data: "Invalid request body". A number, template or RCS agent that your account cannot use gives message and code instead.
Missing or invalid credentials. The body is empty.
The platform cannot find your account: the message is not stored. Contact support
Unexpected error while handling the message
The calling IP address is outside the IP ranges configured for your account