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

# Merge an environment

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

Merge an environment into its parent. This means that code changes
from the branch environment will be merged into the parent branch, and
the parent branch will be rebuilt and deployed with the new code changes,
retaining the existing data in the parent environment.

## Path parameters

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

## Request body

- EnvironmentMergeInput
  - `resources` object, nullable, required
    - `init` 'child' | 'default' | 'manual' | 'minimum', nullable, required — The resources used when merging an 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)
