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.
https://api.zapzapapi.com/api/v1/{instanceId}/send/buttonsAuthentication with the x-api-key and x-api-secret headers.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
number | text | body | Yes | Recipient number (with country code) |
text | textarea | body | Yes | Message text |
buttons | json | body | Yes | Buttons (up to 3). Use text+id for reply, text+url for link, text+phone for call, text+copy for copying a code |
image | text | body | No | Image URL at the top (optional) |
footer | text | body | No | Footer text (optional) |
delay | number | body | No | Delay in ms before sending (optional) |
digitando | select | body | No | Shows 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.
Other endpoints in this category
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.
