Skip to main content
POST
Send Buttons
Auth: TokenAccount or TokenInstanceRate-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

The REPLY 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.
When REPLY is mixed with other types (URL, CALL, COPY) in the same message, the REPLY button does not appear in WhatsApp Web/Desktop, it is only visible on the smartphone app. The ideal is to use only REPLY buttons or only combinations of URL/CALL/COPY, without mixing.
Classic case of a quick menu. Each button returns its id in the webhook when clicked.

With image header

When mediaUrl 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. The id carries distinct semantic values per type.

Success response

The content 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 at the webhook with message.type set to template_button_reply and the clicked button id in message.content (and also in message.interactive.selectedButtonId). Capture that via webhook to chain the flow.

Path parameters

string
required
Instance name (e.g., $Instance_Name).

Headers

string
required
TokenAccount or TokenInstance.
string
required
application/json

Request body

string
required
Destination: phone (5511999999999) or JID (@s.whatsapp.net, @lid, @g.us, @newsletter).
string
required
Main body text of the message (between header and buttons).
ButtonOption[]
required
List of buttons. Minimum 1, maximum 3 (WhatsApp limit). Each button has:
  • id (string, required), semantics vary by type: REPLY returns this ID; URL opens this URL; CALL dials this number; COPY copies this code.
  • displayText (string, required), text visible on the button.
  • type (string), REPLY (default), URL, CALL or COPY. Any other value returns 400 Button N: Type must be one of: REPLY, URL, CALL, COPY.
string
Title displayed at the top of the message. Ignored if mediaUrl is provided (the media replaces the header).
Optional text displayed below the buttons.
string
URL of a media file (image, video or document) to use as the header. When sent, mediaType becomes required.
string
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.
int
default:"0"
Time in seconds to wait before sending. During the interval, the server sends the “typing…” indicator and fires “paused” before the actual send.
string
ID of the message to be quoted (reply). The original message must belong to the same instance and have been saved in the database.
boolean
default:"false"
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).
string
default:"api"
Origin identifier for traceability (e.g., crm, bot-suporte, n8n). Saved on the message record and propagated to webhooks.

Notes

  • delay is in seconds (not milliseconds).
  • WhatsApp accepts up to 3 buttons per message. Four or more return 400 Maximum of 3 buttons allowed.
  • If mediaUrl is sent, headerText is silently ignored.
  • mediaType is normalized to uppercase internally, always send IMAGE, VIDEO or DOCUMENT.
  • For URL buttons, make sure the link starts with https:// to avoid being blocked by the client.
  • For CALL buttons, use the international format (+5511...).
  • Older devices may fall back to text and display the buttons as a regular message.

Errors

Error envelope: