---
title: "Clone a flow"
method: POST
path: "/flows/{flowId}/clone"
tags: ["Flows"]
---

# Clone a flow

`POST /flows/{flowId}/clone`

Create a copy of an existing flow, including its actions and settings. The optional body can override the new flow's `name` and target `deviceIds`. Returns 404 if the source flow does not exist.

## Path parameters

- `flowId` string, uuid, required

## Request body

- CloneFlowBody
  - `name` string
  - `deviceIds` string[]

## Response `201`

Flow cloned

- 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
    - `createdAt` string, nullable, required
    - `updatedAt` string, nullable, required

## Other responses

- `404` — Not Found

## Changes

- **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-28** `fd8fb6b29e38` — 1 info
  - endpoint added
- **2026-06-27** `99b4ade46263` — 1 breaking
  - api path removed without deprecation
- **2026-06-19** `7f577998739b` — 1 info
  - endpoint added

[Full history](https://skmtc.dev/droidrun/apis/droidrun-cloud/changes/flows/:flowId/clone/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/cd80ab1b29b0/schema)
