---
title: "Diff Branch"
method: GET
path: "/api/v1/apps/{app_id}/branches/{branch_id}/diff"
tags: ["apps"]
---

# Diff Branch

`GET /api/v1/apps/{app_id}/branches/{branch_id}/diff`

The diff the user approves before landing.

`against` only accepts `main` today, and is a parameter rather than an
implicit assumption so a future branch-to-branch comparison is an added
value rather than a changed route.

## Path parameters

- `app_id` string, uuid, required
- `branch_id` string, uuid, required

## Query parameters

- `against` string

## Response `200`

Successful Response

- AppBranchDiff — What landing this branch would change on main — the review artifact. `diff` is a unified diff of MAIN's head against the branch head (not against the fork point): it answers "what will main look like afterwards", which is what a reviewer is approving. It is computed by the same `diff_file_sets` the rebase payload uses, so the review modal and the server never drift apart.
  - `against` 'main', required
  - `branch_id` string, uuid, required
  - `branch_head_version_id` string, uuid, nullable, required
  - `main_head_version_id` string, uuid, nullable, required
  - `is_behind` boolean, required
  - `changed_files` string[], required
  - `diff` string, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-08-28** `eed6fb164abd` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/netter/apis/dmi-backend/changes/api/v1/apps/:app_id/branches/:branch_id/diff/get.md)

---

[API](https://skmtc.dev/netter/apis/dmi-backend.md) · [All operations](https://skmtc.dev/netter/apis/dmi-backend/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/netter/dmi-backend/revisions/eed6fb164abd/schema)
