Messages
Send Buttons
Send a message with up to 3 interactive buttons (REPLY, URL, CALL or COPY) and an optional media header
POST
Send Buttons
Auth:
Error envelope:
TokenAccount or TokenInstance • Rate-limit: Global (100/min) • Idempotent: no
Description
Sends a message with up to 3 interactive buttons (WhatsApp limit). Buttons accept four types:REPLY (default, returns the ID when clicked), URL (opens a link), CALL (dials a number) and COPY (copies a code). The header can be text (headerText) or media (mediaUrl + mediaType). If mediaUrl is sent, mediaType is required and must be uppercase: IMAGE, VIDEO or DOCUMENT. When media is present, headerText is ignored (the media replaces the title).
Examples
3 REPLY buttons
TheREPLY button is used to reply to a specific message inside the conversation: when the customer taps, WhatsApp sends a reply quoting the original message with the text of the button (displayText), that is what appears in the chat. In the webhook/websocket, what reaches your application is the id of the clicked button, allowing you to identify the option without depending on the displayed text.
Classic case of a quick menu. Each button returns its id in the webhook when clicked.
With image header
WhenmediaUrl is present, mediaType is required and must be uppercase (IMAGE, VIDEO, DOCUMENT). headerText is ignored in this case.
Mix of URL + CALL + COPY
Combines three different button types in a single message. Theid carries distinct semantic values per type.
Success response
Thecontent returns the contentText you sent, and messageType is fixed at buttons. The button definitions themselves do not come back in the response, store the messageId to correlate the clicks that arrive via webhook.
200 OK
When the user taps a
REPLY button, the response arrives as a text message containing the id of the clicked button, capture that via webhook to chain the flow.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).Main body text of the message (between header and buttons).
List of buttons. Minimum 1, maximum 3 (WhatsApp limit). Each button has:
id(string, required), semantics vary bytype:REPLYreturns this ID;URLopens this URL;CALLdials this number;COPYcopies this code.displayText(string, required), text visible on the button.type(string),REPLY(default),URL,CALLorCOPY. Any other value returns400 Button N: Type must be one of: REPLY, URL, CALL, COPY.
Title displayed at the top of the message. Ignored if
mediaUrl is provided (the media replaces the header).Optional text displayed below the buttons.
URL of a media file (image, video or document) to use as the header. When sent,
mediaType becomes required.Type of the media in
mediaUrl. Required if mediaUrl is present. Accepts only IMAGE, VIDEO or DOCUMENT (uppercase). Any other value returns 400 MediaType must be one of: IMAGE, VIDEO, DOCUMENT.Time in seconds to wait before sending. During the interval, the server sends the “typing…” indicator and fires “paused” before the actual send.
ID of the message to be quoted (reply). The original message must belong to the same instance and have been saved in the database.
When
true and replyTo points to a message originating from a group, the message is redirected to the original author’s private chat (keeping the quote).Origin identifier for traceability (e.g.,
crm, bot-suporte, n8n). Saved on the message record and propagated to webhooks.Notes
delayis in seconds (not milliseconds).- WhatsApp accepts up to 3 buttons per message. Four or more return
400 Maximum of 3 buttons allowed. - If
mediaUrlis sent,headerTextis silently ignored. mediaTypeis normalized to uppercase internally, always sendIMAGE,VIDEOorDOCUMENT.- For
URLbuttons, make sure the link starts withhttps://to avoid being blocked by the client. - For
CALLbuttons, use the international format (+5511...). - Older devices may fall back to text and display the buttons as a regular message.
Errors
| HTTP | Internal status | Message |
|---|---|---|
| 400 | , | Instance name is required |
| 400 | , | Invalid request body: <detail> |
| 400 | , | Number is required |
| 400 | , | ContentText is required |
| 400 | , | At least one button is required |
| 400 | , | Maximum of 3 buttons allowed |
| 400 | , | MediaType is required when MediaURL is provided |
| 400 | , | MediaType must be one of: IMAGE, VIDEO, DOCUMENT |
| 400 | , | Button N: ID is required |
| 400 | , | Button N: DisplayText is required |
| 400 | , | Button N: Type must be one of: REPLY, URL, CALL, COPY |
| 400 | invalid_number | Invalid phone number format: <detail> |
| 400 | invalid_request | (reason for the invalid request detected by the service) |
| 404 | , | Instance not found |
| 500 | send_failed | Failed to send buttons message: <reason> |
| 503 | disconnected | Instance is not connected to WhatsApp |