---
title: "Check if branches are mergeable"
method: GET
path: "/api/repos/{namespace}/{repo_name}/merge/{base_head}"
tags: ["Merge"]
---

# Check if branches are mergeable

`GET /api/repos/{namespace}/{repo_name}/merge/{base_head}`

## Request

- Base URL: `https://hub.oxen.ai`
- URL: `https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/merge/{base_head}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/oxen/apis/oxen-server/docs/api/repos/:namespace/:repo_name/merge/:base_head/get.ts> (a function with typed inputs; its response is checked against the schema)

Check if two branches can be merged and list any conflicts.

## Path parameters

- `namespace` string, required
- `repo_name` string, required
- `base_head` string, required

## Response `200`

Merge status returned successfully

- MergeableResponse
  - `oxen_version` string, nullable
  - `status` string, required
  - `status_message` string, required
  - `commits` Commit[], required
    - `author` string, required
    - `email` string, required
    - `id` string, required
    - `message` string, required
    - `parent_ids` string[], required
    - `timestamp` string, date-time, required
  - `conflicts` MergeConflictFile[], required
    - `path` string, required
  - `is_mergeable` boolean, required

## Other responses

- `404`: Repository or one of the revisions not found

---

[API](https://skmtc.dev/oxen/apis/oxen-server.md) - [All operations](https://skmtc.dev/oxen/apis/oxen-server/llms.txt) - [OpenAPI document](https://skmtc.dev/oxen/apis/oxen-server/revisions/8021aa6fa5bc?raw)
