Skip to main content
A Flow is a form that opens inside WhatsApp. The user taps a button, fills in a few screens without leaving the chat, and submits — you get the answers as structured JSON instead of parsing free text. Keebai handles the whole cycle: create the Flow at Meta, publish it, send it, and receive the response.

The lifecycle

1

Create

POST /v1/flows registers the Flow on the channel’s WhatsApp Business Account and uploads your Flow JSON. It comes back with status: "draft" and a meta_flow_id.
2

Test as a draft

A draft only reaches phone numbers registered as testers on the WABA, and only when the send passes "mode": "draft". Iterate here — a draft can still be edited with PUT /v1/flows/{id}.
3

Publish

POST /v1/flows/{id}/publish hands the Flow JSON to Meta for validation. Publishing is one-way: a published Flow can no longer be edited.
4

Send

Either as a standalone interactive message ("type": "flow") inside the 24-hour window, or attached to a FLOW button on an approved template to reach a closed window.
5

Receive

When the user submits, Meta sends the answers back. The flow_token you chose on send is what ties the response to the send.

Two ways to send a Flow

The right one depends on whether the conversation window is open.

Standalone

curl

Attached to a template

The template must already have a FLOW button approved by Meta — create it with POST /v1/templates, setting the button’s flow_id.
curl

flow_token is your correlation id

You choose it, it must be unique per send, and Meta echoes it back verbatim when the user submits. Generate one per send and store it against whatever the Flow is about — a booking, a ticket, a lead.
Reusing a token across sends makes responses ambiguous — there is no other field that identifies which send an answer belongs to.
data_exchange needs an endpoint registered with Meta and the encrypted request handling that goes with it. Keebai does not host that endpoint for you today; navigate is the supported path end to end.

Flow JSON

The flow_data you upload is Meta’s Flow JSON: a version, a list of screens, and an optional routing_model. Keebai stores it verbatim and passes it through — it does not rewrite or validate it, so Meta’s validation errors on publish are the real check.

Scopes

Sending a Flow needs messages:send, not flows:write — it is a message like any other.

Operational notes

  • Publishing is one-way. Meta does not allow editing a published Flow. Iterate as a draft, and create a new Flow for the next version rather than trying to patch a live one.
  • Delete only works on drafts. A published Flow cannot be deleted; stop sending it and publish a replacement.
  • Flows are WhatsApp-only. Sending "type": "flow" on Instagram or Messenger fails with 422 MESSAGE_TYPE_NOT_SUPPORTED_FOR_CHANNEL.
  • flow_cta is capped at 20 characters by Meta; longer labels are truncated rather than rejected.