v1

latestOpenAPI 3.0.32026-08-06372327.3 KB
SendMessageController

Send an interactive template button message to an WhatsApp User

The templateMessage is a special type of message that allows <br /> you to send a message with a special buttons like copyButton, <br /> urlButton, callButton, etc. <br /> <br> <strong>How to send templateMessage?</strong> <br /> <br> The messageData object requires you to specify the type of button you <br /> want to send to the user. <br /> The type of button you can send are: <br /> <br> <code>copy</code><br><br> <code>url</code><br><br> <code>call</code><br><br> <br> In the <i>payload</i> field, you have to enter the payload <br> i.e. url in case of the url or phone number in case of call <br> <br> <strong>Example of templateMessage? </strong> <br /> <br> <code><br> {<br> "messageData":{<br> "to": "918788889688@s.whatsapp.net",<br> "title": "Message Title",<br> "text": "Message Text",<br> "footer": "Message Footer",<br> "type": "image", // ("text" | "image" | "video" | "document")<br> "mediaUrl": "https://www.example.com/imagem.jpg",<br> "buttons": [<br> {<br> "type": "copy",<br> "title": "This is a copyButton"<br> "payload": "Your text for copy"<br> },<br> {<br> "type": "url",<br> "title": "This is a urlButton",<br> "payload": "https://google.com"<br> },<br> {<br> "type": "call",<br> "title": "This is a callButton",<br> "payload": "918788889688"<br> }<br> ]<br> }<br> }<br> </code> <br> <strong>NOTE: </strong> <i>Due to certain limitations from WhatsApp, when you send templateMessage to someone, <br> the message won't be visible in you phone. Also you will also see that the message has been sent <br> too your own phone number.<br> </i>

post/rest/sendMessage/{instance_key}/templateMessage

Path parameters

instance_keystring required

Request body

Response

Success