WhatsApp Flows

Endpoints for managing WhatsApp Flows

Getting all Flows

get

To retrieve a list of Flows under a WhatsApp Business Account (WABA), use this request.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
partner_idstringRequired

The ID of the partner.

Example: examplePA
waba_account_idstringRequired

The ID of the waba account.

Example: exampleWA
Query parameters
fieldsstring[]Optional

Flow fields to return. Available: id, name, categories, validation_errors, status, json_version, data_api_version, data_channel_uri, endpoint_uri, preview, whatsapp_business_account, metric

Default: ["id","name","categories","validation_errors","status"]Example: ["id","name","preview"]
Responses
chevron-right
200

Successful response

application/json
countintegerOptionalExample: 1
totalintegerOptionalExample: 1
get
/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows

Creating a Flow

post

New Flows are created in DRAFT status. You can then make changes to the Flow by uploading an updated JSON file.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
partner_idstringRequired

The ID of the partner.

Example: examplePA
waba_account_idstringRequired

The ID of the waba account.

Example: exampleWA
Body
namestringRequired

Flow name

Example: Sign Up
clone_flow_idstringOptional

ID of source Flow to clone. You must have permission to access the specified Flow.

Example: 2141298723942
endpoint_uristringOptional

The URL of the WA Flow Endpoint. Starting from Flow JSON version 3.0 this property should be specified .Do not provide this field if you are updating a Flow with Flow JSON version below 3.0.

Example: https://company.com/flow/signup
Responses
chevron-right
200

Successful response

application/json
idstringOptional

The unique ID of the Flow.

Example: 2141298723942
post
/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows

Migrate flows from one WABA to another.

post

Migrate Flows from one WhatsApp Business Account (WABA) to another. Migration doesn't move the source Flows, it creates copies of them with the same names in the destination WABA.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
partner_idstringRequired

The ID of the partner.

Example: examplePA
waba_account_idstringRequired

The ID of the waba account.

Example: exampleWA
Body
source_waba_account_idstringRequired

Source WhatsApp Business Account ID to copy flows from

Example: exampleWA
source_flow_namesstring[]Optional

List of source flow names to migrate. If not provided, all flows will be migrated.

Example: ["appointment-booking","lead-gen"]
Responses
chevron-right
200

Successful response

application/json
post
/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows/migrate_flows

Getting Flow details

get

This request will return a single Flow's details.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
partner_idstringRequired

The ID of the partner.

Example: examplePA
waba_account_idstringRequired

The ID of the waba account.

Example: exampleWA
flow_external_idstringRequired

Flow id.

Example: 3221498293
Query parameters
fieldsstring[]Optional

Flow fields to return. Available: id, name, categories, validation_errors, status, json_version, data_api_version, data_channel_uri, endpoint_uri, preview, whatsapp_business_account, metric

Default: ["id","name","categories","validation_errors","status"]Example: ["id","name","preview"]
Responses
chevron-right
200

Successful response

application/json
idstringOptional

The unique ID of the Flow.

Example: 2141298723942
namestringOptional

The user-defined name of the Flow which is not visible to users

Example: Sign Up
statusstringOptional

Flow status

Example: DRAFT
json_versionstringOptional

The version specified by the developer in the Flow JSON asset uploaded.

Example: 7.2
data_api_versionstringOptional

The version of the Data API specified by the developer in the Flow JSON asset uploaded. Only for Flows with an Endpoint.

Example: 3.0
data_channel_uristringOptional

The URL of the Endpoint specified by the developer in the Flow JSON asset uploaded. Only for Flows with an Endpoint.

Example: https://company.com/flow/signup/channel
endpoint_uristringOptional

The URL of the WA Flow Endpoint specified by the developer via API or in the Builder UI.

Example: https://company.com/flow/signup
get
/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows/{flow_external_id}

Deleting a Flow

delete

While a Flow is in DRAFT status, it can be deleted. Use this request for that purpose.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
partner_idstringRequired

The ID of the partner.

Example: examplePA
waba_account_idstringRequired

The ID of the waba account.

Example: exampleWA
flow_external_idstringRequired

Flow id.

Example: 3221498293
Responses
chevron-right
200

Successful response

application/json
successbooleanOptional

Meta result of operation

delete
/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows/{flow_external_id}

Updating a Flow

patch

After you have created your Flow, you can update the name or categories using the update request.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
partner_idstringRequired

The ID of the partner.

Example: examplePA
waba_account_idstringRequired

The ID of the waba account.

Example: exampleWA
flow_external_idstringRequired

Flow id.

Example: 3221498293
Body
namestringRequired

Flow name

Example: Sign Up
endpoint_uristringOptional

The URL of the WA Flow Endpoint. Starting from Flow JSON version 3.0 this property should be specified .Do not provide this field if you are updating a Flow with Flow JSON version below 3.0.

Example: https://company.com/flow/signup
Responses
chevron-right
200

Successful response

application/json
successbooleanOptional

Meta result of operation

patch
/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows/{flow_external_id}

Getting Flow assets

get

Returns all assets attached to a specified Flow.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
partner_idstringRequired

The ID of the partner.

Example: examplePA
waba_account_idstringRequired

The ID of the waba account.

Example: exampleWA
flow_external_idstringRequired

Flow id.

Example: 3221498293
Responses
chevron-right
200

Successful response

application/json
countintegerOptionalExample: 1
totalintegerOptionalExample: 1
get
/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows/{flow_external_id}/assets

Updating a Flow's Flow JSON

post

You can update a Flow's Flow JSON by uploading a new JSON file. The new JSON file must be a valid Flow JSON file.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
partner_idstringRequired

The ID of the partner.

Example: examplePA
waba_account_idstringRequired

The ID of the waba account.

Example: exampleWA
flow_external_idstringRequired

Flow id.

Example: 3221498293
Body
filestring · binaryRequired

Flow asset file. Currently only flow.json file is supported.

namestringRequired

Flow asset name. Currently supported value is only 'flow.json'.

asset_typestringRequired

Flow asset type. Currently only supported value is 'FLOW_JSON'.

Responses
chevron-right
200

Successful response

application/json
successbooleanOptional
post
/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows/{flow_external_id}/assets

Publish a Flow

post

This request updates the status of the Flow to "PUBLISHED". This action is not reversible. The Flow and its assets become immutable once published. To update the Flow after that, you must create a new Flow. You specify the existing Flow ID as the clone_flow_id parameter while creating to copy the existing flow.

You can publish your Flow once you have ensured that:

  • All validation errors have been fixed

  • The Flow meets the design principles of WhatsApp Flows

  • The Flow complies with WhatsApp Terms of Service, the WhatsApp Business Messaging Policy and, if applicable, the WhatsApp Commerce Policy

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
partner_idstringRequired

The ID of the partner.

Example: examplePA
waba_account_idstringRequired

The ID of the waba account.

Example: exampleWA
flow_external_idstringRequired

Flow id.

Example: 3221498293
Responses
chevron-right
200

Successful response

application/json
successbooleanOptional

Meta result of operation

post
/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows/{flow_external_id}/publish

Preview a Flow

get

In order to visualize the Flows created, you can generate a web preview URL with this request. The preview URL is public and can be shared with different stakeholders to visualize the Flow. Note: Web preview URLs are only used to visualize how the screens will look - they will not be interactive. The final screens will render slightly differently for the end user.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
partner_idstringRequired

The ID of the partner.

Example: examplePA
waba_account_idstringRequired

The ID of the waba account.

Example: exampleWA
flow_external_idstringRequired

Flow id.

Example: 3221498293
Query parameters
invalidatebooleanOptional

invalidate=true will generate a new link.

Default: falseExample: true
Responses
chevron-right
200

Successful response

application/json
idstringOptional

The unique ID of the Flow.

Example: 2141298723942
get
/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows/{flow_external_id}/preview

Deprecate a Flow

post

Once a Flow is published, it cannot be modified or deleted, but can be marked as deprecated.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
partner_idstringRequired

The ID of the partner.

Example: examplePA
waba_account_idstringRequired

The ID of the waba account.

Example: exampleWA
flow_external_idstringRequired

Flow id.

Example: 3221498293
Responses
chevron-right
200

Successful response

application/json
successbooleanOptional

Meta result of operation

post
/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows/{flow_external_id}/deprecate

Last updated

Was this helpful?