Skip to main content

Publish a version

POST 

/v1/flows/:flow_id/versions/:version_id/publish

Publishes the version: 202, and WhatsApp's publish runs in the background. Poll the version until state is published or failure_reason.stage is publish. On success the flow's current version moves to it, the flow's status becomes active, and the previously published version is deprecated. Only a draft that has finished uploading can be published (publishable): 409 not_in_draft_state names the version's state (a pending version: poll until draft; a published one is already live; a deprecated one is never republished, post its Flow JSON as a new version), 409 draft_not_yet_uploaded for a draft WhatsApp has not received, 409 plan_cap_reached when the organisation's plan has reached its published-flow cap. Idempotency-Key is accepted. Requires the flows:write scope.

Request​

Responses​

Replay of an earlier completed request with the same Idempotency-Key: the original 202 response, with Idempotent-Replayed: true. Nothing was published a second time.

Response Headers
    Idempotent-Replayed

    Always true on a replay.