Sign-up & onboarding
Lead capture
Surveys & feedback
Bookings & reservations
flowId. This page covers how to send one through the API.
Sending a flow
A flow is delivered as a message whose single call-to-action button opens the flow. Send it withmessage.flowMessage:
WhatsApp only allows a pre-approved template as the first message to a customer you have not been messaging. To reach someone new, put the flow on a template as a flow button, see Opening a conversation with a template.
navigate vs data_exchange
A flow opens in one of two modes. Choose based on how the first screen is built.
These two mistakes return a
400 from the API, instead of a 200 that fails silently at WhatsApp:
data_exchangewith aflowActionPayload.screen. The endpoint owns the first screen, so no screen may be specified.navigatewithout aflowActionPayload.screen, or omittingflowAction(it defaults tonavigate). Navigate always needs the entry screen.
navigate example, opening at a specific screen:
flowActionPayload.data passes starting values to that screen — useful for pre-filling context the flow should carry, like a phone number or your own session reference:
Every property in
flowActionPayload.data must be declared in the entry screen’s data schema in the Flow JSON. To correlate the flow response back to a specific send, prefer a unique flowToken per send — it is echoed unchanged in the response webhook.Endpoints (data_exchange)
Adata_exchange flow calls an endpoint you host to build each screen. Your endpoint implements the WhatsApp Flows data-exchange contract: WhatsApp calls it (encrypted) when the flow opens and on each screen submit, and it returns the next screen and its data.
See WhatsApp Flow endpoints for the full contract: request lifecycle, encryption, dynamic screen data, a complete example implementation, and troubleshooting.
Opening a
data_exchange flow triggers a call to your endpoint. If it is unreachable or errors, WhatsApp shows “Something went wrong” when the customer opens the flow. The send itself still succeeded; only the open failed.flow_token
flowToken is any string you generate to identify a send, for example an order or record id. It is not a credential and does not need to be secret. WhatsApp stores it and returns it unchanged in the flow response webhook when the customer completes the flow, so you can tie the response back to the right customer and context.
Opening a conversation with a template
WhatsApp requires the first message to a customer to be a pre-approved template. To start a flow with someone you have not been messaging, attach the flow to a template as a flow button in WhatsApp Manager, where it is bound to yourflowId, mode, and entry screen. Then send the template:
button_N_custom_wa_flow_action_data (where N is the flow button’s position, 1-based) passes starting data for the first screen as a JSON string. It is optional. See Send template messages for the full parameter reference.