---
title: "Synchronize a child environment with its parent"
method: POST
path: "/projects/{projectId}/environments/{environmentId}/synchronize"
tags: ["Environment"]
---

# Synchronize a child environment with its parent

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

This synchronizes the code and/or data of an environment with that of
its parent, then redeploys the environment. Synchronization is only
possible if a branch has no unmerged commits and it can be fast-forwarded.

If data synchronization is specified, the data in the environment will
be overwritten with that of its parent.

## Path parameters

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

## Request body

- EnvironmentSynchronizeInput
  - `synchronize_code` boolean, required — Synchronize code?
  - `rebase` boolean, required — Synchronize code by rebasing instead of merging
  - `synchronize_data` boolean, required — Synchronize data?
  - `synchronize_resources` boolean, required — Synchronize resources?

## 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)
