---
title: "Flows · REST reference"
description: "The Flows routes. Every body is JSON, and an error always comes back as an object with a code and a message."
lang: "en-US"
canonical: "https://zaiped.com/en/developers/docs/reference/flows"
alternate: "https://zaiped.com/developers/docs/reference/flows"
---

# Flows · REST reference

## GET /v1/flows

List WhatsApp Flows

**Response (object[])**

- `id` · string (Required): Zaiped id (flows)
- `name` · string (Required)
- `categories` · string[] (Required)
- `status` · "local" | "draft" | "published" | "deprecated" | "blocked" | "throttled" (Required)
- `metaFlowId` · string
- `flowJson` · string (Required)
- `validationErrors` · object[]
- `previewUrl` · string
- `responseCount` · number (Required)
- `updatedAt` · number (Required)

```
curl -X GET "https://zaiped.com/v1/flows" \
  -H "Authorization: Bearer zp_..."
```

## POST /v1/flows

Create a Flow

**Request body**

- `name` · string (Required)
- `categories` · string[] (Required)
- `flowJson` · string
- `library` · string
- `lang` · "pt-BR" | "en-US"
- `push` · boolean

**Response (object)**

- `id` · string (Required): Zaiped id (flows)
- `name` · string (Required)
- `categories` · string[] (Required)
- `status` · "local" | "draft" | "published" | "deprecated" | "blocked" | "throttled" (Required)
- `metaFlowId` · string
- `flowJson` · string (Required)
- `validationErrors` · object[]
- `previewUrl` · string
- `responseCount` · number (Required)
- `updatedAt` · number (Required)

```
curl -X POST "https://zaiped.com/v1/flows" \
  -H "Authorization: Bearer zp_..." \
  -H "Content-Type: application/json" \
  -d '{
  "name": "…",
  "categories": []
}'
```

## GET /v1/flows/{flowId}

Get a Flow

**Path parameters**

- `flowId` · string (Required): The flow id, as returned by list_flows.

**Response (object)**

- `id` · string (Required): Zaiped id (flows)
- `name` · string (Required)
- `categories` · string[] (Required)
- `status` · "local" | "draft" | "published" | "deprecated" | "blocked" | "throttled" (Required)
- `metaFlowId` · string
- `flowJson` · string (Required)
- `validationErrors` · object[]
- `previewUrl` · string
- `responseCount` · number (Required)
- `updatedAt` · number (Required)

```
curl -X GET "https://zaiped.com/v1/flows/YOUR_FLOW_ID" \
  -H "Authorization: Bearer zp_..."
```

## PUT /v1/flows/{flowId}

Update a Flow

The JSON of a published flow is immutable at Meta; name and categories still change.

**Path parameters**

- `flowId` · string (Required): The flow id.

**Request body**

- `name` · string
- `categories` · string[]
- `flowJson` · string
- `push` · boolean

**Response (object)**

- `id` · string (Required): Zaiped id (flows)
- `name` · string (Required)
- `categories` · string[] (Required)
- `status` · "local" | "draft" | "published" | "deprecated" | "blocked" | "throttled" (Required)
- `metaFlowId` · string
- `flowJson` · string (Required)
- `validationErrors` · object[]
- `previewUrl` · string
- `responseCount` · number (Required)
- `updatedAt` · number (Required)

```
curl -X PUT "https://zaiped.com/v1/flows/YOUR_FLOW_ID" \
  -H "Authorization: Bearer zp_..." \
  -H "Content-Type: application/json" \
  -d '{}'
```

## DELETE /v1/flows/{flowId}

Delete a Flow

**Path parameters**

- `flowId` · string (Required): The flow id.

**Response (object)**

- `ok` · true (Required)

```
curl -X DELETE "https://zaiped.com/v1/flows/YOUR_FLOW_ID" \
  -H "Authorization: Bearer zp_..."
```

## POST /v1/flows/{flowId}/publish

Publish a Flow

Pushes the current JSON, requires zero validation errors and publishes.

**Path parameters**

- `flowId` · string (Required): The flow id.

**Response (object)**

- `ok` · true (Required)

```
curl -X POST "https://zaiped.com/v1/flows/YOUR_FLOW_ID/publish" \
  -H "Authorization: Bearer zp_..."
```

## POST /v1/flows/{flowId}/deprecate

Deprecate a published Flow

**Path parameters**

- `flowId` · string (Required): The flow id.

**Response (object)**

- `ok` · true (Required)

```
curl -X POST "https://zaiped.com/v1/flows/YOUR_FLOW_ID/deprecate" \
  -H "Authorization: Bearer zp_..."
```

## GET /v1/flows/{flowId}/responses

List responses to a Flow

**Path parameters**

- `flowId` · string (Required): The flow id.

**Response (object)**

- `rows` · object[] (Required)
- `truncated` · boolean (Required)

```
curl -X GET "https://zaiped.com/v1/flows/YOUR_FLOW_ID/responses" \
  -H "Authorization: Bearer zp_..."
```