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

# Create a flow

`POST /flows`

Create a flow that binds a trigger (`triggerId`) to an ordered list of actions, with at least one action required. Optional settings include target `deviceIds`, a cooldown (`cooldownSeconds`/`cooldownScope`), and webhook notifications on success or failure.

## 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
  - `healthMonitoringEnabled` boolean
  - `selfHealingEnabled` boolean
  - `selfHealingMaxAttempts` integer
  - `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 — Deprecated: use ownerId (tenancy) / createdBy (actor).
    - `ownerId` string, uuid, required
    - `createdBy` string, uuid, nullable, 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
    - `templateResolutionVersion` integer, required — Template-resolver semantics this flow runs under (MVA-23). 1 = legacy (missing/forbidden/null all resolve to ''). 2 = typed (missing/forbidden throw, a whole-token null stays JSON null). Existing flows stay 1; new flows default to 2.
    - `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
    - `healthMonitoringEnabled` boolean, required
    - `selfHealingEnabled` boolean, required
    - `selfHealingMaxAttempts` integer, required
    - `createdAt` string, nullable, required
    - `updatedAt` string, nullable, required

## Changes

- **2026-08-13** `02da4f9ce3fd` — 6 info
  - added the new optional request property `healthMonitoringEnabled`
  - added the new optional request property `selfHealingEnabled`
  - added the new optional request property `selfHealingMaxAttempts`
  - added the required property `data/healthMonitoringEnabled` to the response with the `201` status
  - …2 more
- **2026-07-24** `618bd1cc1aed` — 1 info
  - added the required property `data/templateResolutionVersion` to the response with the `201` status
- **2026-07-07** `d5d1e5ee8188` — 3 info
  - response property `data/userId` deprecated
  - added the required property `data/createdBy` to the response with the `201` status
  - added the required property `data/ownerId` to the response with the `201` status
- **2026-06-29** `8f06726ac240` — 6 breaking
  - the request property `actions/items/children/items/overrides` became not nullable
  - the request property `actions/items/children/items/overrides/params/additionalProperties/` became not nullable
  - the request property `actions/items/overrides` became not nullable
  - the request property `actions/items/overrides/params/additionalProperties/` became not nullable
  - …2 more
- **2026-06-28** `fd8fb6b29e38` — 1 info
  - endpoint added

[Full history](https://skmtc.dev/droidrun/apis/droidrun-cloud/changes/flows/post.md)

---

[API](https://skmtc.dev/droidrun/apis/droidrun-cloud.md) · [All operations](https://skmtc.dev/droidrun/apis/droidrun-cloud/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/droidrun/droidrun-cloud/revisions/a1453ac769d4/schema)
