---
title: "Fork a workflow"
method: POST
path: "/api/workflows/{workflow_id}/fork"
tags: ["workflows"]
---

# Fork a workflow

`POST /api/workflows/{workflow_id}/fork`

Creates a new workflow by forking from an existing version.

## Path parameters

- `workflow_id` string, required

## Request body

- ForkWorkflowRequest — Request body for forking an existing workflow into the user's account.
  - `name` string — Name for the forked workflow
  - `source_version` integer, required — Version number to fork from

## Response `201`

Workflow forked successfully

- WorkflowResponse — Full workflow entity including metadata and version history.
  - `created_at` string, date-time, required
  - `created_by` string, required
  - `default_view` 'workflow' | 'app'
  - `description` string
  - `forked_from` WorkflowForkedFrom — Reference to the parent workflow from which this workflow was forked.
    - `workflow_id` string
    - `workflow_version_id` string
  - `id` string, required
  - `latest_version` integer, required
  - `name` string
  - `updated_at` string, date-time, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Source workflow or version not found
- `422` — Validation error
- `500` — Internal server error

---

[API](https://skmtc.dev/comfy-org/apis/comfyui-api.md) · [All operations](https://skmtc.dev/comfy-org/apis/comfyui-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/comfy-org/comfyui-api/revisions/da017caf56f1/schema)
