---
title: "Merge a branch"
method: POST
path: "/v1/projects/{slug}/branches/{name}/merge"
tags: ["versioning"]
---

# Merge a branch

`POST /v1/projects/{slug}/branches/{name}/merge`

## Request

- Base URL: `https://innernet.live/api`
- URL: `https://innernet.live/api/v1/projects/{slug}/branches/{name}/merge`
- Auth: HTTP bearer

A real 3-way merge (fork point vs trunk now vs the branch now): applies only what the branch itself changed since it forked. A page both trunk and the branch changed differently since the fork is left on trunk and reported in the response `diff.conflicts`, not overwritten. Check the response `merged` flag — false means conflicts remain and the branch was NOT marked merged; resolve them (edit the branch or trunk) and merge again. Refuses a parked or already-merged branch.

## Path parameters

- `slug` string, required
- `name` string, required

## Response `200`

Returns the commit hash, the `merged` flag (false when conflicts remain and the branch stays unmerged) and the applied `diff` (with `diff.conflicts` when some pages were skipped)

## Other responses

- `409`: Error

---

[API](https://skmtc.dev/innernet/apis/innernet-api.md) · [All operations](https://skmtc.dev/innernet/apis/innernet-api/llms.txt) · [OpenAPI document](https://skmtc.dev/innernet/apis/innernet-api/revisions/1ee09aec71a9?raw)
