Skip to main content

Add a version

POST 

/v1/flows/:flow_id/versions

Adds a version of the flow from Flow JSON. 202 with the version pending while WhatsApp processes it; poll it. Identical Flow JSON to a version that is pending, in draft or failed answers 200 with that version as it is now, so a deploy script that runs twice creates nothing — except for a version that failed before WhatsApp ever saw the document, which is resumed instead: 202, the same version, pending again. A document rejected by WhatsApp ends failed with failure_reason; post a corrected document as a new version. A version already published or deprecated is never reused. Bodies up to 5 MB. Idempotency-Key is accepted. Requires the flows:write scope.

Request​

Responses​

Nothing was created. Either the flow already has a version with this exact Flow JSON, and this is that version as it is now; or this is a replay of an earlier completed request with the same Idempotency-Key and body, carrying Idempotent-Replayed: true and the bytes of that first response.

Response Headers
    Idempotent-Replayed

    true on a replay; absent when the document simply already existed.