# Get branch merge preview

```http
GET /projects/{project_reference}/branches/{branch_id}/merge-preview
```

Show the file-by-file changes a merge would apply, with conflict regions and contents. Requires project.read.

## Parameters

| Name                | In    | Required | Description                                                |
| ------------------- | ----- | -------- | ---------------------------------------------------------- |
| `project_reference` | path  | Yes      | Project slug, UUID, or domain that identifies the project. |
| `branch_id`         | path  | Yes      |                                                            |
| `target_branch_id`  | query |          | Target branch ID; omit for main.                           |

## Responses

| Status | Description                                                                                                 |
| ------ | ----------------------------------------------------------------------------------------------------------- |
| 200    | Merge preview.                                                                                              |
| 400    | Bad request                                                                                                 |
| 401    | Unauthorized                                                                                                |
| 403    | Forbidden                                                                                                   |
| 404    | Not found                                                                                                   |
| 500    | Server error                                                                                                |
| 503    | internal: authentication state is temporarily unavailable and the request was not processed; retry shortly. |
