Messages
Send Text
Send a text message with support for delay, link preview, reply, private reply and mentions
POST
Send Text
Auth:
Error envelope:
TokenAccount or TokenInstance • Rate-limit: Global (100/min) • Idempotent: no
Description
Sends a text message to a 1-on-1 contact, group (@g.us) or channel (@newsletter). Supports replyTo (quote by ID), replyPrivate (reply privately to a group message), mention / mentionAll (group chats only), linkPreview and delay (in seconds) to simulate real typing. It is the most-used endpoint and serves as a “Hello World” to validate that the instance is connected.
Examples
Minimum
Sends a text message with the minimum payload (number + message). No delay, no preview, no quoting, useful as a “Hello World” to validate that the instance is connected.
With delay and link preview
Sends a “typing…” indicator for 3 seconds and then sends the message with a preview of the detected URL.As a reply
Quotes an existing message (replyTo receives the messageId of the original). The original message must belong to the same instance and have been saved in the database (any message that flows through webhook/send is saved automatically).
As a private reply (from a group)
When someone sends a message in a group and you want to reply privately to that person (without sending the reply back to the group), usereplyPrivate: true. The number should point to the JID of the group where the original message was sent, the server extracts the original author and redirects the reply to their private chat, keeping the quote.
With member mention(s) (group)
Adds visible mentions with@5511... in the message body and lists the numbers in the mention array. The text and the array must be consistent, WhatsApp only turns into a clickable link what is in mention.
Hidden mention (group)
Pings every member of the group without listing @s in the text, usingmentionAll: true. The displayed text stays clean, but the participants receive the mention notification. Useful for silent announcements. To mention specific people in a hidden way, just use mention: ["..."] without placing @number in the text, they will also receive the notification without appearing tagged.
Success response
The response includes themessageId (use it in replyTo to quote this message in future sends), direction: "outgoing" and the chat/sender markers. The mentions and replyTo fields only appear when applicable, and chat.groupName is included in group messages.
200 OK
Path parameters
Instance name (e.g.,
$Instance_Name).Headers
TokenAccount or TokenInstance.application/jsonRequest body
Destination: phone (
5511999999999) or JID (@s.whatsapp.net, @lid, @g.us, @newsletter).Body text. Cannot be empty.
Time in seconds to wait before sending. During the interval, the server sends the “typing…” indicator to the recipient and fires “paused” before the actual send.
When
true, the server extracts the first URL from message, fetches Open Graph metadata (title, description, thumbnail) and sends the message as ExtendedTextMessage with the preview card embedded. When false or omitted, the URL appears as plain text.ID of the message to be quoted (reply). The original message must belong to the same instance and have been saved in the database. Possible errors:
reply_message_not_found, reply_message_instance_mismatch.When
true and replyTo points to a message originating from a group, the reply is redirected to the original author’s private chat (keeping the quote). Useful for answering questions individually without cluttering the group. Ignored if the original message is not from a group.List of numbers (or JIDs) to mention. Group chats only (
@g.us). Limit of 10 mentions per message; excess numbers are ignored with a warning. To appear as a clickable link, include @5511... in message. Without that, they become hidden mentions (notify only).When
true, mentions every group member (except the instance itself). Equivalent to @everyone. The server queries the participants list and injects each JID into the context’s MentionedJID, without changing the displayed text. Group chats only.Origin identifier for traceability (e.g.,
crm, bot-suporte, n8n). Saved on the message record in the database and propagated to webhooks. When omitted, defaults to "api".Notes
delayis in seconds (unlike many APIs that use ms). A value of3= 3 seconds of “typing”.- In groups, text with
@5511...alone does not become clickable, it is thementionarray that WhatsApp processes. Keep both consistent. mentionandmentionAllare exclusive to groups. If sent to a DM/channel, the response is400 Mentions are only supported in group chats.- For BR numbers (starting with
55), the service automatically tries variations with and without the 9th digit, avoiding the long-standing inconsistency in older area codes. linkPreviewrequires that the server be able to fetch the URL’s Open Graph metadata; sites with bot blocking may fall back to plain text without a visible error.- Messages sent via
replyPrivate: trueappear in the recipient’s private chat with the card of the quoted group message, they can see which conversation it came from.
Errors
| HTTP | Internal status | Message |
|---|---|---|
| 400 | , | Instance name is required |
| 400 | , | Invalid request body: <detail> |
| 400 | , | Number is required |
| 400 | , | Message is required |
| 400 | invalid_number | Invalid phone number format: <detail> |
| 400 | mentions_not_supported | Mentions are only supported in group chats |
| 400 | reply_message_not_found | Original message not found (ID: ...) |
| 400 | reply_message_instance_mismatch | Original message does not belong to this instance |
| 400 | private_reply_failed | (reason for the private redirection error) |
| 404 | , | Instance not found |
| 500 | send_failed | Failed to send message: <reason> |
| 503 | disconnected | Instance is not connected to WhatsApp |