Skip to main content

Send Reply Message

POST 

/nusasms_api/1.0/wa_business/reply

Requirement

To send Reply message, you must first establish a Conversation room with the recipient. In other word, your recipient must sent a message to your gateway.

Introduction​

Reply message allow you to send free text (without template), document, image and video message.

Text​

Text is the most basic type for this endpoint.

Example
{
"recipient": "<RECIPIENT>",
"gateway_id": "<YOUR_GATEWAY_ID>",
"type": "text",
"payloads": {
"body": "this is the text message"
}
}

Document​

TypeExtensionMax SizeMIME Type
Text.txt100 MBtext/plain
Microsoft Excel.xls100 MBapplication/vnd.ms-excel
Microsoft Excel.xlsx100 MBapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Microsoft Word.doc100 MBapplication/msword
Microsoft Word.docx100 MBapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
Microsoft PowerPoint.ppt100 MBapplication/vnd.ms-powerpoint
Microsoft PowerPoint.pptx100 MBapplication/vnd.openxmlformats-officedocument.presentationml.presentation
PDF.pdf100 MBapplication/pdf
Example
{
"recipient": "<RECIPIENT>",
"gateway_id": "<YOUR_GATEWAY_ID>",
"type": "document",
"payloads": {
"link": "<YOUR DOCUMENT URL>",
"caption": "<YOUR CAPTIONS; optional>"
"filename": "<THE FILENAME; optional>"
}
}

Document Message Preview

Here is the preview when you got this type of message.

Reply message preview

Image​

TypeExtensionsMIME TypeMax Size
JPEG.jpeg, jpgimage/jpeg5 MB
PNG.pngimage/png5 MB
Example
{
"recipient": "<RECIPIENT>",
"gateway_id": "<YOUR_GATEWAY_ID>",
"type": "image",
"payloads": {
"link": "<YOUR IMAGE URL>",
"caption": "<YOUR IMAGE CAPTIONS; optional>"
}
}

Video​

TypeExtensionsMIME TypeMax Size
3GPP.3gpvide/3gpp16 MB
MP4 Video.mp4video/mp45 MB
Example
{
"recipient": "RECIPIENT",
"gateway_id": "YOUR_GATEWAY_ID",
"type": "video",
"payloads": {
"link": "<YOUR VIDEO URL; required>",
"caption": "<YOUR CAPTIONS; optional>"
}
}

Reaction​

Send reaction to message 🎉.

Example
{
"recipient": "RECIPIENT",
"gateway_id": "YOUR_GATEWAY_ID",
"type": "reaction",
"payloads": {
"message_id": "<MESSAGE_ID; required>",
"emoji": "<EMOJI; required>"
}
}

Contextual Reply​

warning

Contextual reply message can not be used on reaction message and for replying reaction message.

Contextual replies are a special way of responding to a WhatsApp user message. Sending a message as a contextual reply makes it clearer to the user which message you are replying to by quoting the previous message in a contextual bubble:

Preview:

Contextual Reply

Use message_id_context that contains message_id value from Inbox or previous message.

You can get message_id of your inbox message by subscribing Whatsapp Business Webhook feature.

Example:

info

The json content below is written short for better readibility

{
"gateway_id": "GATEWAY_ID",
"recipient": "NOMOR_PENERIMA",
"type": "text",
"payloads": {
"text": "Teks pesan"
},
"message_id_context": "wamid.RandomIdText"
}

Request​

Responses​

Successful Response