---
title: "Merge a branch into its parent branch (git-flow merge)"
method: POST
path: "/build/api/v1/deployments/{deploymentId}/merge"
tags: ["Data Model"]
---

# Merge a branch into its parent branch (git-flow merge)

`POST /build/api/v1/deployments/{deploymentId}/merge`

## Path parameters

- `deploymentId` integer, required

## Request body

- MergeIntoParentBranchRequest
  - `branchId` integer
  - `branchName` string
  - `deleteBranch` boolean, nullable
  - `message` string, nullable
  - `squashCommits` boolean, nullable
  - `switchToParentBranch` boolean, nullable

## Response `200`

- MergeResponse
  - `branchDeleted` boolean, required
  - `merged` boolean, required

## Changes

> 9 revisions in range; 1 could not be searched.

- **2026-07-31** `a0c6b1d2ac96` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/cube-js/apis/cube-cloud-rest-api/changes/build/api/v1/deployments/:deploymentId/merge/post.md)

---

[API](https://skmtc.dev/cube-js/apis/cube-cloud-rest-api.md) · [All operations](https://skmtc.dev/cube-js/apis/cube-cloud-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cube-js/cube-cloud-rest-api/revisions/97e151460143/schema)
