---
title: "attach an existing workspace as the dev workspace of this (prod) workspace"
method: POST
path: "/w/{workspace}/workspaces/attach_dev_workspace"
tags: ["workspace"]
---

# attach an existing workspace as the dev workspace of this (prod) workspace

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

## Path parameters

- `workspace` string, required

## Request body

- object
  - `dev_workspace_id` string, required
  - `lock_prod_deploy` boolean
  - `lock_prod_forking` boolean
  - `dev_workspace_label` 'dev' | 'qa' | 'test' | 'uat' | 'staging' | 'demo' | 'sandbox' | 'preprod' — Environment label; also names the branch the dev workspace deploys to. Omitted defaults to 'dev'

## Response `200`

dev workspace attached

## Changes

> 176 revisions in range; 7 could not be searched.

- **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-06-30** `1319dda7bbc5` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/windmill/apis/windmill-api/changes/w/:workspace/workspaces/attach_dev_workspace/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)
