---
title: "create forked workspace"
method: POST
path: "/w/{workspace}/workspaces/create_fork"
tags: ["workspace"]
---

# create forked workspace

`POST /w/{workspace}/workspaces/create_fork`

## Path parameters

- `workspace` string, required

## Request body

- CreateWorkspaceFork
  - `id` string, required
  - `name` string, required
  - `color` string
  - `forked_datatables` object[]
    - `name` string, required — Datatable name
    - `new_dbname` string, required — New database name for the fork
  - `shared_ducklakes` string[] — Lake names the fork SHARES with the parent (reads and writes the parent's lake directly). Every lake not listed gets the default isolated fork namespace with read-defer to the parent.
  - `is_dev_workspace` boolean — Create the fork as a persistent dev workspace (id not required to carry the wm-fork- prefix; at most one per parent)
  - `lock_prod_deploy` boolean — When creating a dev workspace, lock the parent (prod) against direct deployment
  - `lock_prod_forking` boolean — When creating a dev workspace, prevent forking the parent (prod)
  - `copy_members` boolean — Copy the parent's members (users + group memberships) into the fork so the team can work in it
  - `dev_workspace_label` 'dev' | 'qa' | 'test' | 'uat' | 'staging' | 'demo' | 'sandbox' | 'preprod' — Environment label for the dev workspace: its badge text and the branch it deploys to. Ignored for non-dev forks. Omitted defaults to 'dev'

## Response `201`

forked workspace created

## Changes

- **2026-08-06** `604cc6e027e1` — 6 info
  - added the new `demo` enum value to the request property `dev_workspace_label`
  - added the new `preprod` enum value to the request property `dev_workspace_label`
  - added the new `qa` enum value to the request property `dev_workspace_label`
  - added the new `sandbox` enum value to the request property `dev_workspace_label`
  - …2 more
- **2026-07-06** `705cf438a8d2` — 1 info
  - added the new optional request property `dev_workspace_label`
- **2026-07-05** `88b3716ecf04` — 1 info
  - added the new optional request property `shared_ducklakes`
- **2026-06-30** `1319dda7bbc5` — 4 info
  - added the new optional request property `copy_members`
  - added the new optional request property `is_dev_workspace`
  - added the new optional request property `lock_prod_deploy`
  - added the new optional request property `lock_prod_forking`

[Change history](https://skmtc.dev/windmill/apis/windmill-api/changes/w/:workspace/workspaces/create_fork/post.md)

---

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