---
title: "POST /v1/flows"
method: POST
path: "/v1/flows"
tags: ["flows"]
---

# POST /v1/flows

`POST /v1/flows`

Create a flow

## Request body

- object
  - `displayName` string, required
  - `folderName` string
  - `projectId` string, required

## Response `201`

Default Response

- object
  - `id` string, required
  - `created` string, required
  - `updated` string, required
  - `projectId` string, required
  - `folderId` string, nullable
  - `status` union, required
    - 'ENABLED'
    - 'DISABLED'
  - `schedule` object, nullable
    - `type` 'CRON_EXPRESSION', required
    - `cronExpression` string, required
    - `timezone` string, required
    - `failureCount` number
  - `publishedVersionId` string, nullable
  - `version` object, required
    - `id` string, required
    - `created` string, required
    - `updated` string, required
    - `flowId` string, required
    - `displayName` string, required
    - `trigger` union, required
      - object
        - `name` string, required
        - `valid` boolean, required
        - `displayName` string, required
        - `nextAction` unknown
        - `type` 'PIECE_TRIGGER', required
        - `settings` object, required
          - `pieceName` string, required
          - `pieceVersion` string, required
          - `pieceType` union, required
            - 'CUSTOM'
            - 'OFFICIAL'
          - `packageType` union, required
            - 'ARCHIVE'
            - 'REGISTRY'
          - `triggerName` string
          - `input` object, required
          - `inputUiInfo` object, required
            - `currentSelectedData` unknown
            - `customizedInputs` object
            - `lastTestDate` string
      - object
        - `name` string, required
        - `valid` boolean, required
        - `displayName` string, required
        - `nextAction` unknown
        - `type` 'EMPTY', required
        - `settings` unknown, required
    - `updatedBy` string, nullable
    - `valid` boolean, required
    - `state` union, required
      - 'LOCKED'
      - 'DRAFT'

## Changes

> 38 revisions in range; 1 could not be searched.

- **2024-09-03** `b95c8c8e8262` — 1 breaking
  - the response property `version/trigger/anyOf[subschema #1]/settings/triggerName` became optional for the status `201`
- **2024-08-14** `ed47604969c3` — 1 info
  - added the optional property `schedule/failureCount` to the response with the `201` status
- **2024-04-17** `2127db57a884` — 1 warning, 1 info
  - removed the request property `folderId`
  - added the new optional request property `folderName`
- **2024-03-25** `49bc5504bd5f` — 1 info
  - removed `subschema #1` from the `version/trigger` response property `anyOf` list for the response status `201`
- **2024-02-22** `b8aa27750656` — 1 info
  - the endpoint scheme security `apiKey` was added to the API

[Full history](https://skmtc.dev/rantirai/apis/activepieces-documentation/changes/v1/flows/post.md)

---

[API](https://skmtc.dev/rantirai/apis/activepieces-documentation.md) · [All operations](https://skmtc.dev/rantirai/apis/activepieces-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rantirai/activepieces-documentation/revisions/225ff954244e/schema)
