> For the complete documentation index, see [llms.txt](https://docs.lipachat.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lipachat.com/api/whatsapp-flows/create-flow.md).

# Creating a flow

```
POST https://gateway.lipachat.com/api/v1/whatsapp/manage/flow
```

**Headers**

| Name         | Value                                                                           |
| ------------ | ------------------------------------------------------------------------------- |
| Content-Type | multipart/form-data                                                             |
| apiKey       | Get apiKey from app portal settings tab <https://app.lipachat.com/app/settings> |

**Body**

| Name        | Type   | Description                                                          |
| ----------- | ------ | -------------------------------------------------------------------- |
| phoneNumber | string | Sandbox number +254110090747 or your own WABA phone number.          |
| name        | string | Name of your flow                                                    |
| categories  | string | Category of the flow: Example: OTHERS                                |
| file        | file   | The file containing your whatsapp flow. File should be of type .json |

**Example Request**

```json
{
  "phoneNumber": "254712345678",
  "name": "BANK_TEST_FLOW_V2",
  "categories": "OTHER",
  "file": "filename.json"
}
```

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "timestamp": "2024-03-12T10:01:04.71248",
  "data": {
    "id": 4,
    "waFlowId": "2044724355999872",
    "name": "BANK_TEST_FLOW_V2",
    "status": "DRAFT",
    "categories": [
      "OTHER"
    ],
    "createdAt": "2024-03-12T07:00:55.887+00:00",
    "updatedAt": "2024-03-12T07:00:58.598+00:00"
   },
  "status": "success",
  "message": "",
  "errors": null
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "timestamp": "2024-09-15T20:06:38.675567555",
    "data": null,
    "status": "error",
    "message": "Request failed.",
    "errors": null
}
```

{% endtab %}

{% tab title="401" %}

```json
{
    "timestamp": "2024-09-15T20:07:23.464199513",
    "data": null,
    "status": "success",
    "message": "Invalid credentials",
    "errors": null
}
```

{% endtab %}
{% endtabs %}
