After you create a WhatsApp Flow, you can send it. To send a message with a flow, we have introduced a new type of the Interactive Object called flow. These are the following properties of the Interactive Object specific to flows:
| Property | Type | Description |
|---|---|---|
| String | Value must be |
| String | Value must be |
| String | Value must be |
| String | Unique ID of the Flow provided by WhatsApp. Cannot be used with the |
| String | The name of the Flow that you created. Changing the Flow name will require updating this parameter to match the new name. Cannot be used with the |
| String | Text on the CTA button. For example: "Signup" CTA text length is advised to be 30 characters or less (no emoji). |
| String | The Flow can be in either |
| String | Flow token that is generated by the business to serve as an identifier. Default value is |
| String |
|
| String | Optional if |
| String | The Default is |
| String | Optional. The input data for the first screen of the Flow. Must be a non-empty object. |
curl -X POST \
'https://graph.facebook.com/v24.0/FROM_PHONE_NUMBER_ID/messages' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '
{
"recipient_type": "individual",
"messaging_product": "whatsapp",
"to": "PHONE_NUMBER",
"type": "interactive",
"interactive": {
"type": "flow",
"header": {
"type": "text",
"text": "Flow message header"
},
"body": {
"text": "Flow message body"
},
"footer": {
"text": "Flow message footer"
},
"action": {
"name": "flow",
"parameters": {
"flow_message_version": "3",
"flow_token": "AQAAAAACS5FpgQ_cAAAAAD0QI3s.",
"flow_id": "1",
"flow_cta": "Book!",
"flow_action": "navigate",
"flow_action_payload": {
"screen": "<SCREEN_NAME>",
"data": {
"product_name": "name",
"product_description": "description",
"product_price": 100
}
}
}
}
}
}'
{
"messaging_product": "whatsapp",
"contacts": [
{
"Input": "PHONE_NUMBER",
"wa_id": "WHATSAPP_ID"
}
],
"messages": [
{
"id": "wamid.ID"
}
]
}