Send Messages

Send Reply Buttons

Sends clickable buttons (up to 3). Each object in the `buttons` array becomes a different button type depending on the field used: • `text` + `id` → quick reply button (the contact taps it and the text is sent) • `text` + `url` → button that opens an external link • `text` + `phone` → call button • `text` + `copy` → button that copies a code to the clipboard Without `image`, the message is sent with only text + buttons (clean header). With `image`, an image appears at the top. WhatsApp limitation: mixing reply with url/phone/copy in the same message may show an 'Open on your phone' notice.

POSThttps://api.zapzapapi.com/api/v1/{instanceId}/send/buttons

Authentication with the x-api-key and x-api-secret headers.

Parameters

NameTypeInRequiredDescription
numbertextbodyYesRecipient number (with country code)
texttextareabodyYesMessage text
buttonsjsonbodyYesButtons (up to 3). Use text+id for reply, text+url for link, text+phone for call, text+copy for copying a code
imagetextbodyNoImage URL at the top (optional)
footertextbodyNoFooter text (optional)
delaynumberbodyNoDelay in ms before sending (optional)
digitandoselectbodyNoShows an automatic "typing..." indicator, proportional to the message length, before sending. On by default (humanizes and reduces block risk). Send false to turn it off and reply faster. The response remains synchronous.

Request example

curl

curl -X POST "https://api.zapzapapi.com/api/v1/{instanceId}/send/buttons" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-api-secret: YOUR_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"number":"5511999999999","text":"Como podemos ajudar?","buttons":[{"text":"Sim","id":"yes"},{"text":"Nosso site","url":"https://exemplo.com"},{"text":"Ligar","phone":"+5511999999999"}]}'

Node.js

const res = await fetch("https://api.zapzapapi.com/api/v1/{instanceId}/send/buttons", {
  method: "POST",
  headers: {
    "x-api-key": "YOUR_API_KEY",
    "x-api-secret": "YOUR_API_SECRET",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "number": "5511999999999",
    "text": "Como podemos ajudar?",
    "buttons": [
      {
        "text": "Sim",
        "id": "yes"
      },
      {
        "text": "Nosso site",
        "url": "https://exemplo.com"
      },
      {
        "text": "Ligar",
        "phone": "+5511999999999"
      }
    ]
  }),
});
console.log(await res.json());

Python

import requests

res = requests.post(
    "https://api.zapzapapi.com/api/v1/{instanceId}/send/buttons",
    headers={"x-api-key": "YOUR_API_KEY", "x-api-secret": "YOUR_API_SECRET"},
    json={"number":"5511999999999","text":"Como podemos ajudar?","buttons":[{"text":"Sim","id":"yes"},{"text":"Nosso site","url":"https://exemplo.com"},{"text":"Ligar","phone":"+5511999999999"}]},
)
print(res.json())

Response example

JSON

{
  "messageType": "InteractiveMessage",
  "status": "Pending"
}

Values are illustrative; the fields follow the real response format.

See the full reference

Get your API keys

Create your account, connect a number in minutes and start using the API. R$15 per active number/month, with a welcome credit when you create the account, subject to the current campaign.