---
title: "Branch an environment"
method: POST
path: "/projects/{projectId}/environments/{environmentId}/branch"
tags: ["Environment"]
---

# Branch an environment

`POST /projects/{projectId}/environments/{environmentId}/branch`

Create a new environment as a branch of the current environment.

## Path parameters

- `projectId` string, required
- `environmentId` string, required

## Request body

- EnvironmentBranchInput
  - `title` string, required
  - `name` string, required
  - `clone_parent` boolean, required — Clone data from the parent environment
  - `type` 'development' | 'staging', required — The type of environment (`staging` or `development`)
  - `resources` object, nullable, required
    - `init` 'default' | 'minimum' | 'parent', nullable, required — The resources used when initializing services of the new environment

## Response `default`

- AcceptedResponse
  - `status` string, required — The status text of the response
  - `code` integer, required — The status code of the response

---

[API](https://skmtc.net/upsun/apis/upsun-com-rest-api.md) · [All operations](https://skmtc.net/upsun/apis/upsun-com-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/upsun/upsun-com-rest-api/revisions/6cc88fde6435/schema)
