Facebook
Flow - Cloud API - Documentation - Meta for Developers

Flow Messages

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

interactive.type

String

Value must be flow

interactive.action.name

String

Value must be flow

interactive.action.parameters.mode

String

The Flow can be in either draft or published mode. published is the default value for this field.

interactive.action.parameters.flow_message_version

String

Value must be 3 .

interactive.action.parameters.flow_token

String

Flow token that is generated by the business to serve as an identifier.

interactive.action.parameters.flow_id

String

Unique ID of the Flow provided by WhatsApp.

interactive.action.parameters.flow_cta

String

Text on the CTA button. For example: "Signup"

Character limit - 20 characters (no emoji).

interactive.action.parameters.flow_action

String

navigate or data_exchange . Default value is navigate

interactive.action.parameters.flow_action_payload

String

Required if flow_action is navigate . Should be omitted otherwise.

interactive.action.parameters.flow_action_payload.screen

String

The id of the first screen.

interactive.action.parameters.flow_action_payload.data

String

Optional. The input data for the first screen of the Flow. Must be a non-empty object.

Example Request

curl -X  POST \
 'https://graph.facebook.com/v19.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
          }
        }
      }
    }
  }
}'

Example Response

{
  "messaging_product": "whatsapp",
  "contacts": [
    {
      "Input": "PHONE_NUMBER",
      "wa_id": "WHATSAPP_ID"
    }
  ],
  "messages": [
    {
      "id": "wamid.ID"
    }
  ]
}
Design a Mobile Website
View Site in Mobile | Classic
Share by: