---
title: "Create a flow"
method: POST
path: "/flows"
tags: ["Flows"]
---

# Create a flow

`POST /flows`

## Request body

- CreateFlowBody
  - `name` string, required
  - `description` string
  - `triggerId` string, uuid, required
  - `enabled` boolean
  - `deviceIds` string[]
  - `cooldownSeconds` integer, nullable
  - `cooldownScope` 'flow' | 'device'
  - `notifyWebhookId` string, uuid, nullable
  - `notifyOnSuccess` boolean
  - `notifyOnFailure` boolean
  - `actions` FlowActionInput[], required
    - `actionId` string, uuid, required
    - `position` integer, required
    - `continueOnError` boolean
    - `nameOverride` string
    - `overrides` FlowActionOverrides, nullable
      - `params` object
    - `children` FlowChildActionInput[]
      - `actionId` string, uuid, required
      - `position` integer, required
      - `continueOnError` boolean
      - `nameOverride` string
      - `overrides` FlowActionOverrides, nullable
        - `params` object

## Response `201`

Flow created

- object
  - `data` Flow, required
    - `id` string, uuid, required
    - `userId` string, uuid, required
    - `name` string, required
    - `description` string, nullable, required
    - `triggerId` string, uuid, required
    - `enabled` boolean, required
    - `deviceIds` string[], required
    - `cooldownSeconds` integer, nullable, required
    - `cooldownScope` 'flow' | 'device', required
    - `notifyWebhookId` string, uuid, nullable, required
    - `notifyOnSuccess` boolean, required
    - `notifyOnFailure` boolean, required
    - `lastTriggeredAt` string, nullable, required
    - `status` 'healthy' | 'failing' | 'blocked', required
    - `consecutiveFailures` integer, required
    - `lastFailureCode` 'device_not_found' | 'permission_denied' | 'client_error' | 'transient' | 'logic' | 'invalid_config', nullable, required
    - `lastFailureAt` string, nullable, required
    - `blockedAt` string, nullable, required
    - `createdAt` string, nullable, required
    - `updatedAt` string, nullable, required

---

[API](https://skmtc.net/droidrun/apis/droidrun-cloud.md) · [All operations](https://skmtc.net/droidrun/apis/droidrun-cloud/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/droidrun/droidrun-cloud/versions/7f577998739b/schema)
