Skip to content
Send templates

Send templates with a Flow button

A Flow button opens an interactive multi-screen experience built with WhatsApp Flows. When the template was approved with a FLOW button, you launch it at send time with sub_type: "flow".

Terminal window
curl -X POST \
https://api.kirimdev.com/v1/$PHONE_ID/messages \
-H "Authorization: Bearer $KIRIM_KEY" \
-H "Content-Type: application/json" \
-d '{
"messaging_product": "whatsapp",
"to": "+628123456789",
"type": "template",
"template": {
"name": "appointment_booking",
"language": "id",
"components": [
{
"type": "body",
"parameters": [
{ "type": "text", "text": "Andi" }
]
},
{
"type": "button",
"sub_type": "flow",
"index": 0,
"parameters": [
{
"type": "action",
"action": {
"flow_token": "tok_abc123",
"flow_action_data": {
"customer_name": "Andi",
"preferred_slot": "2026-06-01T10:00:00+07:00"
}
}
}
]
}
]
}
}'
FieldRequiredPurpose
flow_tokenYesOpaque string you generate to correlate the Flow response with this send. Echoed back in the webhook.
flow_action_dataNoJSON object pre-populating the first screen of the Flow. Schema is defined by your Flow JSON.

When the customer completes the Flow, your webhook receives an interactive message with interactive.type = "nfm_reply" containing the submitted form data plus your original flow_token. Use the token to look up which send the response belongs to.

{
"type": "interactive",
"interactive": {
"type": "nfm_reply",
"nfm_reply": {
"name": "flow",
"response_json": "{\"customer_name\":\"Andi\",\"slot\":\"...\"}",
"body": "Form submitted"
}
}
}

See Receive messages for the full webhook envelope.