> ## Documentation Index
> Fetch the complete documentation index at: https://docs.greentick.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Flows

> Create, publish, send, and read submissions for a WhatsApp Flow.

A Flow is a form inside WhatsApp. The assistant saves a static draft, and it publishes or sends only after you ask. Standard includes 5 Flows. Premium includes unlimited Flows. Starter does not include them.

## Tools

| Tool | What it does |
| - | - |
| `validate_flow` | Checks the Flow without calling Meta. Name, screen title, heading, body, and input label must fit `get_limits`. |
| `create_flow` | Saves a draft. A draft blocks `send_flow` until `publish_flow` succeeds. |
| `update_flow` | Updates a draft. |
| `list_flows` | Lists Flows on the account. Each row includes `metaFlowId`. |
| `get_flow` | Reads one Flow and whether it is a draft or published. |
| `publish_flow` | Publishes a draft. Call it only after you ask. Optional `metaPhoneNumberId` selects the number. Validation errors stay on this tool. |
| `send_flow` | Sends a published Flow to one `to` number. `body` is required. Optional `flowCta`, `header`, and `footer`. |
| `deprecate_flow` | Stops a published Flow from being sent again. |
| `delete_flow` | Deletes a draft. A published Flow returns "Published flows can't be deleted, deprecate it instead". Only after you ask. |
| `list_flow_submissions` | Lists submissions. `limit` is at most 200. |
| `get_flow_analytics` | Reads one Flow, including submissions and completion. Optional `recentLimit` up to 100. |
| `get_flows_analytics` | Reads every Flow on the account. |
| `get_flow_phone_encryption` | Reads the phone number encryption public key Flows use. |

`create_flow` takes `name`, up to 5 `categories`, and `screens`. Each screen has `title`, optional `body` and `footerLabel`, and `fields`.

Field `type` matches the dashboard builder:

| Type | What it sends |
| - | - |
| `text`, `email`, `phone`, `number` | A one-line answer. Email, phone, and number keep WhatsApp's input check. |
| `textarea` | A multi-line answer. |
| `dropdown`, `radio`, `checkbox`, `chips` | A choice. `radio` with no options is Yes/No. Send `options` as `{ id, title }`. |
| `date`, `calendar` | A date. Optional `minDate` and `maxDate` are `YYYY-MM-DD`. |
| `optin` | A consent checkbox. |
| `photo`, `document` | An upload. One upload per screen. |
| `heading`, `subheading`, `body`, `caption` | Read-only text. These are not inputs. The screen title is the header, so do not repeat it as a heading. A caption is one line: put the words in `label` only. |
| `image`, `image_carousel` | A picture. `src` is base64. |
| `rich_text` | Formatted text. That screen can contain only rich text. |
| `embedded_link` | A link. `url` must be `https`. |
| `navigation_list` | Links to other screens. `items[].navigateTo` is a 1-based screen number. That screen cannot be last. |
| `switch`, `if` | Show or hide components from an earlier answer. Put the switch or if in `fields` directly under the input it describes. It renders above Next or Submit. `if` uses `condition`, `then`, and optional `else`. Put inputs in `then.fields`, for example a date picker when a Yes/No answer is Yes. A caption in a branch is `{ fields: [{ type: "caption", label: "..." }] }` and is not also sent as body. `switch` cases are `{ key, fields }` or `{ key, heading, body }`. The Submit button sends every answer. Choice answers are stored as their labels. |

`helperText` is the line under a field. Set `required: true` when the answer is required. Do not send screen ids.

Pass `metaFlowId` from `list_flows`, `get_flow`, or `create_flow` to every later Flow tool, including `delete_flow`. It is the numeric WhatsApp Flow id, such as `4630212380592085`. `id` in those results is the same value. Do not pass a 24-character id. A 24-character id is still accepted and resolved, so an older value does not need a second call.

The assistant does not call `send_flow` for a draft, and it does not publish while validation is failing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.