Create a WhatsApp Flow

Create a WhatsApp Flow on Meta for a WhatsApp Official channel account. The Flow is created as a draft unless publish is true; with publish: true Meta publishes it only when its Flow JSON has no validation errors, and published tells whether it did. The Flow appears in the platform's Flow management. Requires an API key with the whatsapp-flows:write scope and an account plan that includes WhatsApp Flows (PRO/MAX); otherwise the API answers 403 with code FEATURE_NOT_IN_PLAN. When publish is true and Meta saves the draft but refuses to publish it, the response is still 201 with published: false, the validation_errors and publish_refused_reason: the Flow exists, so fix it with POST /v2/whatsapp-flows/{flow_id} and publish it with /publish instead of creating it again. To send a Flow, use a message template with a Flow button (POST /v2/messages/template); templates are created in the platform.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
uuid
required

UUID of the WhatsApp Official channel account the Flow belongs to

string
required
length ≤ 200
categories
array of strings
required
length ≥ 1
categories*
flow_json
required

The Flow JSON (object, or a JSON string holding an object, at most 5 MB; a string is parsed and stored as an object). Must have version and at least one screen; Meta runs the full validation and returns validation_errors.

boolean
Defaults to false

Publish right after creating. Publishing is irreversible on Meta.

string

Text of the invite message (omit for the product default)

string

Label of the button that opens the Flow (omit for the product default)

Headers
string
required

API Token

Responses

details.code says which kind of refusal it was: FLOW_VALIDATION_FAILED (local or Meta validation; see details.validation_errors), INVITE_INVALID (see details.invite_errors), NOT_DRAFT (only drafts can be edited or published) or META_REJECTED (Meta's own answer, in details.reason).

401

Authentication error - invalid or missing api-token

whatsapp-flows:write scope, or (write routes) the account plan does not include WhatsApp Flows (FEATURE_NOT_IN_PLAN)

409

The channel has no valid WhatsApp Official authentication (details.code = CHANNEL_NOT_CONFIGURED). Reconnect it in the platform; retrying will not help.

500

Unexpected error on Clint's side (details.code = INTERNAL_ERROR).

details.code = UPSTREAM_ERROR). Safe to retry.

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json