Skip to content

Interactive Message

Interactive message using type: "interactive" and support several action types. These messages can only be sent within the 24-hour window (the recipient has previously sent a message to your number).

Type actionDescriptionMax Items
buttonQuick reply buttons (up to 3 buttons)3 buttons
listInteractive list menu10 sections, 10 rows per section
cta_urlButton that directs to a URL1 button
flowButton that opens a WhatsApp Flow1 button
send_location Request the recipient to send a location-
{
"messaging_product": "whatsapp",
"to": "6281234567890",
"type": "interactive",
"interactive": {
"type": "button",
"body": {
"text": "Apakah Anda ingin melanjutkan?"
},
"action": {
"buttons": [
{ "type": "reply", "reply": { "id": "btn_yes", "title": "Ya" } },
{ "type": "reply", "reply": { "id": "btn_no", "title": "Tidak" } }
]
}
}
}
FieldTypeRequiredDescription
typestringYes"button" for quick reply
headerobjectNoText, image, video, or document header
bodyobjectYesMessage body, field text required
footerobjectNoFooter, field text
actionobjectYesAction object with array buttons
FieldTypeDescription
typestringAlways "reply"
reply.idstringButton ID (sent back in the webhook when clicked)
reply.titlestringButton label, max 20 characters
{
"messaging_product": "whatsapp",
"to": "6281234567890",
"type": "interactive",
"interactive": {
"type": "list",
"body": {
"text": "Pilih layanan yang Anda butuhkan:"
},
"footer": {
"text": "Ketuk untuk melihat pilihan"
},
"action": {
"button": "Pilih Layanan",
"sections": [
{
"title": "Perbankan",
"rows": [
{ "id": "svc_check_balance", "title": "Cek Saldo", "description": "Lihat saldo rekening Anda" },
{ "id": "svc_transfer", "title": "Transfer", "description": "Kirim uang ke rekening lain" }
]
},
{
"title": "Informasi",
"rows": [
{ "id": "svc_promo", "title": "Promo", "description": "Lihat promo terbaru" }
]
}
]
}
}
}
FieldTypeDescription
buttonstringButton label that opens the list, max 20 characters
sections[]arrayArray of sections
sections[].titlestringSection title
sections[].rows[]arrayList of options within the section
sections[].rows[].idstringRow ID (sent back when selected)
sections[].rows[].titlestringRow title, max 24 characters
sections[].rows[].descriptionstringOptional description, max 72 characters
{
"messaging_product": "whatsapp",
"to": "6281234567890",
"type": "interactive",
"interactive": {
"type": "cta_url",
"body": {
"text": "Selesaikan pembayaran Anda sekarang."
},
"action": {
"name": "cta_url",
"parameters": {
"display_text": "Bayar Sekarang",
"url": "https://pay.example.com/checkout/abc123"
}
}
}
}
{
"messaging_product": "whatsapp",
"to": "6281234567890",
"type": "interactive",
"interactive": {
"type": "flow",
"body": {
"text": "Silakan isi formulir pendaftaran."
},
"action": {
"name": "flow",
"parameters": {
"flow_message_version": "3",
"flow_token": "tx_abc123",
"flow_id": "1234567890",
"flow_cta": "Mulai",
"flow_action": "navigate",
"flow_action_payload": {
"screen": "WELCOME",
"data": { "user_name": "Budi" }
}
}
}
}
}
FieldTypeDescription
flow_message_versionstringAlways "3"
flow_tokenstringCorrelation token to match with nfm_reply
flow_idstringID of the Flow already published on Meta
flow_ctastringCTA button label
flow_actionstring"navigate" (open the initial screen) or "data_exchange"
flow_action_payloadobjectPayload for flow_action="navigate"
{
"messaging_product": "whatsapp",
"to": "6281234567890",
"type": "interactive",
"interactive": {
"type": "button",
"body": {
"text": "Kirim lokasi Anda untuk menemukan cabang terdekat."
},
"action": {
"name": "send_location"
}
}
}
Terminal window
curl -X POST https://messaging.cpaas.id/v1/YOUR_PHONE_NUMBER_ID/messages \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"messaging_product": "whatsapp",
"to": "6281234567890",
"type": "interactive",
"interactive": {
"type": "button",
"body": { "text": "Konfirmasi pesanan Anda?" },
"action": {
"buttons": [
{ "type": "reply", "reply": { "id": "confirm", "title": "Ya, konfirmasi" } },
{ "type": "reply", "reply": { "id": "cancel", "title": "Batalkan" } }
]
}
}
}'
{
"messaging_product": "whatsapp",
"messages": [
{
"id": "msg_f7a816e2-8397-11f0-8e34-010203040506"
}
]
}
  1. message.status.sent — The interactive message was sent successfully
  2. message.status.delivered — Message reached the recipient’s device
  3. message.status.read — Message read by the recipient

If it fails, you receive message.status.failed.

When the recipient presses a button or selects an item from the list, you will receive a webhook message.inbound containing button_reply or list_reply with an ID you specify.

See the page Webhook for details on the payload format of each event.