# Build and send WhatsApp Flows
___

You can build WhatsApp Flows using the Meta **Flow Builder**, use the Infobip API to manage and send flows programmatically, or try our **industry-first AI flow builder**.
___

## Build a flow using the Meta Flow Builder

IMPORTANT  
To create flows using the Meta Flow Builder UI, you must have access to your WhatsApp Manager and your business must be [verified](https://www.infobip.com/docs/whatsapp/get-started/business-verification).

Use the **Flow Builder** interface inside the **WhatsApp Manager** to create, edit, or duplicate flows.

1. Go to [WhatsApp Manager](https://business.facebook.com/wa/manage/) and select **Account tools** > **Flows**.

2. Select **Start building Flows** to begin.

3. Name and categorize your flow:
    - Enter a **name** for your flow and select the appropriate **category**.
    - Choose a template to use as a starting point:
        - **Without Endpoint**: For static elements.
        - **With Endpoint**: For dynamic elements, such as data population or navigation control.
    - Preview the template on the right, then select **Create**.

4. After creating your flow, the **Flow JSON editor** opens with a live preview on the right.
    - Define screens and components for your flow.
    - Select **Run** to preview any changes, such as updating titles or other parameters.

5. Once satisfied with your flow, select **Save**.
___

To see how to build WhatsApp Flows in action, check our demo video below:
___

### Publish a flow [#publish-a-flow-build-a-flow-using-the-flow-builder]

When you create a flow or edit and save the modified flow JSON content, it remains in the **Draft** state. Draft flows are available only for testing. If you want to send your flow to a larger audience, you need to **publish** it.

To publish a flow:

- Resolve all validation errors and [publishing checks](https://developers.facebook.com/docs/whatsapp/flows/guides/healthmonitoring#publishing-checks).
- Ensure the flow meets the [design principles](https://developers.facebook.com/docs/whatsapp/flows/guides/bestpractices) of WhatsApp Flows.
- Ensure the flow complies with [WhatsApp Terms of Service](https://www.whatsapp.com/legal/terms-of-service) and [WhatsApp Business Messaging Policy](https://business.whatsapp.com/policy).
- Once ready, open the three-dot menu next to **Save** and select **Publish**.
___

### Send a flow [#send-a-flow-build-a-flow-using-the-flow-builder]

You can send WhatsApp Flows as:

- [**Template messages**](https://www.infobip.com/docs/whatsapp/message-types-and-templates/message-templates): Do not require a 24-hour customer service window between you and the recipient before the message can be sent.
- [**Free-form messages**](https://www.infobip.com/docs/whatsapp/message-types-and-templates/free-form-messages): These can only be sent to a user when a customer service window is open between you and the user.

When sending a flow, include a **flow token** (`flowToken`), which is a unique identifier for the flow session that you create yourself. It can be any value, such as a randomly generated unique ID or a timestamp. You can also use it to pass data into the flow, such as a customer phone number or a JSON string with structured data. The flow token is not generated by Meta or Infobip.

To send a flow template using **Broadcast**, you need to select it during broadcast creation. Follow the [WhatsApp over Broadcast](https://www.infobip.com/docs/whatsapp/send-a-message#whatsapp-over-broadcast) guide to send a WhatsApp flow template.

You can also use flows during chatbot creation in **Answers**.  
To do so, [create a chatbot](https://www.infobip.com/docs/whatsapp/send-a-message#whatsapp-over-answers), design it by following the guidelines set in the [Create chatbot](https://www.infobip.com/docs/answers/create-chatbot). As a channel component, add the **WhatsApp flow element** and follow the [WhatsApp flow in Answers](https://www.infobip.com/docs/answers/chatbot-elements/channels#whatsapp-flows-whatsapp) guide.

To see how to send WhatsApp Flows using Infobip solutions in action, check our demo video below:
___

## WhatsApp Flows over API

Use the Infobip API to create, update, publish, and manage WhatsApp Flows programmatically. This approach is ideal for businesses that want to automate flow management, integrate flow creation into existing systems, or trigger flows dynamically based on customer actions.

You can define flows using JSON, upload them using the API, and control their status throughout their lifecycle, from draft to published, deprecated, or throttled. Once a flow is live, you can use the API to send it as a template or an interactive message.

### Flow components [#flow-components-whatsapp-flows]

WhatsApp Flows support various interactive elements, including text fields, radio buttons, checkboxes, and menus. These components can be combined to create interactive screens that guide customers through specific journeys, such as selecting product categories, attributes, and item details.

To quickly configure and preview a basic flow, you can use Meta's [Playground](https://developers.facebook.com/docs/whatsapp/flows/playground/), which provides a library of components, layouts, and connectors that can be combined with customer data. Additionally, the Flow Builder UI within [WhatsApp Manager](https://business.facebook.com/wa/manage/) allows flow design (you will need access to your WhatsApp Business Account to use this feature).

If you are using Flow Builder, after designing your flow, you can launch it using the [API](https://www.infobip.com/docs/api/channels/whatsapp/whatsapp-service-management/publish-whatsapp-flow) or through [Answers](https://www.infobip.com/docs/answers/chatbot-elements/channels#whatsapp). However, if you are using Meta's Playground without access to your WhatsApp Business Account, you will need to [create flow templates](https://www.infobip.com/docs/api/channels/whatsapp/whatsapp-service-management/create-whatsapp-template) and add WhatsApp flow JSON before launching your flow through either of those options.
___

### Flow actions [#flow-actions-whatsapp-flows]

WhatsApp flow actions refer to a series of API requests that allow businesses to create, modify, and manage customer journeys within the WhatsApp business platform. Each action maps to a specific API endpoint, allowing you to create, update, and publish flows for customer interactions. These API requests are essential for managing the lifecycle of your flows, from initial setup to handling responses. Below is an overview of the available API actions, guiding you through the process of setting up and maintaining your WhatsApp Flows efficiently.

| API | Description |
| --- | --- |
| Get WhatsApp Flows | Retrieves all the flows for a specified sender. |
| Create WhatsApp Flow | Creates a flow. If successful, the flow is created in `DRAFT` status with the default `flow.json`. The flow structure can be modified while in `DRAFT`, and after publishing if you update metadata or JSON (the flow will return to `DRAFT`). |
| Delete WhatsApp Flow | Deletes a flow. Only flows in `DRAFT` status can be deleted. |
| Update WhatsApp Flow | Updates a flow. Flows in `DRAFT` can be modified freely. Published flows can also be modified by updating their metadata or JSON, which moves them back into `DRAFT`. |
| Publish WhatsApp Flow | Publishes a flow. If successful, the flow status changes to `PUBLISHED`. Published flows can still be updated (metadata or JSON), however, these changes return the flow to `DRAFT` and require re-publishing. |
| Get WhatsApp Flow JSON | Retrieves the `flow.json` file associated with a specified flow. |
| Add WhatsApp Flow JSON | Adds the flow JSON which will be loaded on the Meta side. The maximum file size is 10 MB.Refer to Meta's [JSON documentation](https://developers.facebook.com/docs/whatsapp/flows/reference/flowjson) for more information. |
| Deprecate WhatsApp Flow | Deprecates a flow. If successful, the flow status changes to `DEPRECATED` and the flow can no longer be sent. |
| Get WhatsApp Flow preview | Retrieves the preview URL for the flow. The link does not require a login and will expire in 30 days. |
| Upload WhatsApp sender public key | Uploads the public encryption key for a WhatsApp sender. This key is required for dynamic flows that use data exchange. |
| Get WhatsApp sender public key | Retrieves the public encryption key for a WhatsApp sender. Use this endpoint to verify the key status and confirm that the key signature is valid. |

NOTE  
Dynamic WhatsApp Flows that use data exchange require encryption. Generate a 2048-bit RSA key pair, upload the public key using the API, and use the private key to decrypt data received from your dynamic flow endpoints. If you have multiple senders linked to the same WhatsApp Business Account (WABA), upload the same public key for each sender to avoid signature mismatches. For more information about the encryption protocol, see the [Meta encryption reference](https://developers.facebook.com/docs/whatsapp/cloud-api/reference/whatsapp-business-encryption#flows-encryption).
___

## Use AI Agent to build WhatsApp Flows

Infobip's [AI Agent for WhatsApp Flows](https://www.infobip.com/whatsapp-business/flows-ai-agent) is the first industry solution that enables **automated flow generation** based on a natural language prompt. It generates Meta-compliant flow JSON to accelerate time to market, reduce development effort, and streamline integration for both business users and developers.

You can generate AI-powered WhatsApp Flows in two ways:
- **Infobip web interface**: A no-code experience for business users
- **WhatsApp API**: Programmatic access for partners and developers

Both methods use the AI Agent to generate valid flow definitions from a simple prompt.

The AI Agent builds flows using [Meta's official WhatsApp components](https://developers.facebook.com/docs/whatsapp/flows/reference/components/), including:
- Text elements (heading, subheading, caption, body)
- Input fields (text entry, radio buttons, checkboxes, dropdowns)
- Date pickers and calendars
- Navigation lists, chips, and conditional logic (*If*, *Switch*)
- Opt-ins, footers, and embedded links
- Media upload
- Image (dynamic flows only)

NOTE  
AI Agent currently supports static flows with all core components, except for images. For dynamic flows, flow screens are generated, but full functionality requires backend integration on your WhatsApp Business Account (WABA).
___

### Build flows in the Infobip web interface [#flows-in-web-interface-use-ai-agent-for-whatsapp-flows]

To create a flow using the AI Agent in the web interface:

1. Log in to the Infobip [web interface](https://portal.infobip.com/) and navigate to **Channels** > **WhatsApp**.
2. On the **Senders** tab, find your sender, select the three-dot menu, and choose **View flows**.
3. In the upper-right corner, select **Create flow**.
4. Enter a flow name and describe your use case in detail in the prompt field. Alternatively, you can choose one of the suggested prompts.
5. Select **Send prompt** to generate the structure and flow JSON.

6. Preview and edit the generated flow. If needed, update text, add logic, or generate additional steps by submitting new prompts. You can also update the JSON directly.
7. Once finalized, select **Save**.

To use the generated flow in communications, copy its **Flow ID** and **First flow screen** from the **Sender Flows** view (Step 2 above). These values are required when [sending messages](https://www.infobip.com/docs/whatsapp/whatsapp-flows/build-whatsapp-flows#send-a-flow) using **Broadcast**, **Answers**, or **WhatsApp templates**.

To see how to use our AI agent to create a flow in action, check our demo video below:
___

### Generate flows using the API [#flows-using-api-use-ai-agent-for-whatsapp-flows]

To generate a WhatsApp flow using the API, use the <apidocslink href="api/channels/whatsapp/whatsapp-service-management/generate-whatsapp-flow">Generate WhatsApp Flow</apidocslink> endpoint.  
Provide a detailed prompt in your request payload. The AI Agent returns a flow configuration that matches your intent.

If you include a `responseId` from a previous call, the Agent will treat your input as a refinement request and return an updated flow JSON, enabling step-by-step iteration.
  
> Example flow  
> Use natural language prompt to describe the flow you want to create. In this example, a retail business wants to collect product inquiries through a static flow.
  
View request JSON

```json
{
  "prompt": "Create a static flow for UrbanStyle Clothing to collect product inquiries. Ask the user to select a product category (e.g., Men’s, Women’s, Accessories), choose an item from a dropdown with images, then enter name, email, and shipping postcode. Add a text box for custom requests or sizing notes."
}
```

The API returns the generated flow configuration, including a `responseId` you can reuse for further edits.
  
View response JSON (truncated for clarity)

```json
{
  "originalPrompt": "Create a static flow for UrbanStyle Clothing to collect product inquiries...",
  "responseId": "d0ba8969ac949fbcdd9bfac4f2e2b8f6d2f6f68dd1bf6e25c71e60a556b85ad360bf4c6cd88446b28f3748298d7abe658135e7fa3e28c9457313d46c442c970b",
  "generatedFlow": {
    "version": "7.0",
    "screens": [
      {
        "id": "CATEGORY_SELECTION",
        "title": "Select Category",
        "layout": {
          "type": "SingleColumnLayout",
          "children": [
            {
              "type": "Form",
              "name": "category_form",
              "children": [
                {
                  "type": "RadioButtonsGroup",
                  "name": "product_category",
                  "label": "Product Category",
                  "required": true,
                  "data-source": [
                    { "id": "mens", "title": "Men’s" },
                    { "id": "womens", "title": "Women’s" },
                    { "id": "accessories", "title": "Accessories" }
                  ]
                },
                {
                  "type": "Footer",
                  "label": "Next",
                  "on-click-action": {
                    "name": "navigate",
                    "next": { "type": "screen", "name": "ITEM_SELECTION" }
                  }
                }
              ]
            }
          ]
        }
      },
      ...
    ]
  }
}
```

You can refine or extend an existing flow by including the `responseId` from the initial response. This allows the AI Agent to retain context and improve the generated structure.
  
View request JSON with `responseId`

```json
{
  "prompt": "Add a confirmation screen to review all inputs before submitting.",
  "responseId": "d0ba8969ac949fbcdd9bfac4f2e2b8f6d2f6f68dd1bf6e25c71e60a556b85ad360bf4c6cd88446b28f3748298d7abe658135e7fa3e28c9457313d46c442c970b"
}
```

After generation, you can use standard [flow actions](https://www.infobip.com/docs/whatsapp/whatsapp-flows/build-whatsapp-flows#flow-actions-whatsapp-flows) to register, manage, or publish the flow.
___

Ready to build WhatsApp Flows with AI?

Be the first to try the only AI-powered flow generator in the industry and turn prompts into Meta-compliant flows in seconds.

Sign up and try Infobip's AI Agent