The Messages API is the primary way to send WhatsApp messages from your own scripts and automations. Rather than working with internal conversation IDs, you pass an E.164 phone number and Wacrm handles everything else — looking up or creating the contact and conversation before dispatching the message through the WhatsApp Business API.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ArnasDon/wacrm/llms.txt
Use this file to discover all available pages before exploring further.
POST /api/v1/messages
Required scope: messages:send
Sends a WhatsApp message to any E.164 phone number. The endpoint finds or creates the contact and conversation associated with that number and then runs the send. Because contact and conversation resolution is part of the request, a single call is enough for any automation — no separate contact-creation step is needed.
Request body
The recipient’s phone number in E.164 format (e.g.
+14155550123). This is the only required field. The endpoint resolves or creates the contact and conversation automatically.The message type. One of:
text, template, image, video, document, audio. Defaults to text when omitted.The message body for
type: text, or the caption for media types (image, video, document, audio). Required when type is text.A publicly accessible URL for the media file. Required when
type is image, video, document, or audio.An optional display filename for
type: document (e.g. invoice.pdf). Ignored for other types.Required when
type is template. Describes the approved WhatsApp template to send.The UUID of a message in the same conversation to reply to. The referenced message must belong to the resolved conversation or the request will be rejected.
An optional display name to set when a new contact is created for the given phone number. Has no effect when the contact already exists.
Examples
Sending a plain text message:Response (201)
The internal UUID of the created message row.
The
wamid.* identifier returned by the WhatsApp Business API. Use this to correlate delivery status webhooks.The UUID of the conversation the message was sent in (found or created).
The UUID of the contact associated with the given phone number (found or created).
true when a new contact record was created for the number; false when an existing contact was matched.Domain error codes
Beyond the standard error codes, the Messages API may return:| HTTP | code | Meaning |
|---|---|---|
| 400 | whatsapp_not_configured | No WhatsApp Business integration is connected to this account. |
| 502 | meta_error | The request reached Meta’s servers but was rejected — check your template approval and phone number. |
| 500 | template_malformed | The template payload could not be serialized into a valid API request. |