---
title: "Create flow"
method: POST
path: "/v1/whatsapp/flows"
tags: ["WhatsApp Flows"]
---

# Create flow

`POST /v1/whatsapp/flows`

Create a new WhatsApp Flow in DRAFT status. Optionally clone an existing flow.
After creating, upload a Flow JSON definition, then publish to make it sendable.

## Request body

- object
  - `accountId` string, required — WhatsApp social account ID
  - `name` string, required — Flow display name
  - `categories` string[], required — Flow categories
  - `cloneFlowId` string — Optional: ID of an existing flow to clone the Flow JSON from
  - `asVersion` boolean — When cloning, true keeps the clone in cloneFlowId's version lineage (auto-numbered next version); false/absent creates an independent flow. Ignored without cloneFlowId.

## Response `200`

Flow created

- object
  - `success` boolean
  - `flow` object
    - `id` string
    - `name` string
    - `status` string
    - `categories` string[]
    - `version` integer — Version within the clone lineage
    - `lineageId` string — Version-lineage group key

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `404` — WhatsApp account not found

---

[API](https://skmtc.net/zernio/apis/zernio-api.md) · [All operations](https://skmtc.net/zernio/apis/zernio-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zernio/zernio-api/versions/51932b099b2f/schema)
