---
title: "Merge branch"
method: POST
path: "/api/v1/models/{modelId}/branch/{branchName}/merge"
tags: ["Models"]
---

# Merge branch

`POST /api/v1/models/{modelId}/branch/{branchName}/merge`

## Path parameters

- `modelId` string, uuid, required — Model UUID
- `branchName` string, required — Branch name

## Request body

- ModelsMergeBranchBody
  - `commit_message` string — Custom commit message for git sync
  - `delete_branch` boolean — Delete the branch after merging
  - `force_override_git_settings` boolean — Override PR-required or git-follower settings
  - `publish_drafts` boolean — Publish branch-attached drafts

## Response `200`

Branch merged successfully

- ModelsMergeBranchResponse
  - `failed_drafts_count` number, required — Number of drafts that failed to publish
  - `git_synced` boolean, required — Whether git was synced
  - `published_drafts_count` number, required — Number of drafts published
  - `success` boolean, required — Whether the merge succeeded

## Other responses

- `400` — Invalid request body, merge not allowed, or merge conflict
- `401` — Authentication required
- `403` — Permission denied or PR required
- `404` — Model or branch not found

---

[API](https://skmtc.net/omniapp/apis/omni-api.md) · [All operations](https://skmtc.net/omniapp/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omniapp/omni-api/versions/4701f292c621/schema)
