const response = await fetch('https://base_url/chats/sendButtonMessage', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"jid": "receivernumber",
"imageUrl": "",
"contentText": "body text",
"footerText": "footer text",
"buttons": [
{
"buttonId": "btn1",
"buttonText": {
"displayText": "Yes"
},
"type": 1
},
{
"buttonId": "btn2",
"buttonText": {
"displayText": "No"
},
"type": 1
}
]
}),
});
const data = await response.json();