v1

latestOpenAPI 3.0.02026-07-2491237338.9 KB
WhatsApp Flows

Create a flow

Creates a new WhatsApp Flow. New Flows are by default created in DRAFT state. You can create a new published Flow in single request by specifying flowJson and publish parameters.

post/whatsapp/flows

Request body

wabaIdstring required

WhatsApp Business Account ID.

namestring required

Flow name.

categoriesWhatsappFlowCategory[] required

Flow categories.

flowJsonstring

JSON string of the Flow structure.

publishboolean

If true, the Flow will be created in PUBLISHED state.

cloneFlowIdstring

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

endpointUristring

The endpoint URI for the Flow.

Example request

{
  "wabaId": "whatsapp-business-account-id",
  "name": "My first flow",
  "flowJson": "{\"version\":\"5.0\",\"screens\":[{\"id\":\"WELCOME_SCREEN\",\"layout\":{\"type\":\"SingleColumnLayout\",\"children\":[{\"type\":\"TextHeading\",\"text\":\"Hello World\"},{\"type\":\"Footer\",\"label\":\"Complete\",\"on-click-action\":{\"name\":\"complete\",\"payload\":{}}}]},\"title\":\"Welcome\",\"terminal\":true,\"success\":true,\"data\":{}}]}",
  "cloneFlowId": "flow-id-to-clone",
  "endpointUri": "https://example.com/flow-endpoint"
}

Response

Successfully created a flow.

idstring

The ID of the created Flow.

successboolean

Whether the operation was successful.

Example response

{
  "id": "flow-1",
  "success": true
}