---
title: "Resolve a three-way file conflict after line merge and Mergiraf, using MagicMerge as last resort"
method: POST
path: "/api/v1/merge_resolutions"
tags: ["merge_resolutions"]
---

# Resolve a three-way file conflict after line merge and Mergiraf, using MagicMerge as last resort

`POST /api/v1/merge_resolutions`

## Request

- Base URL: `https://composal.com` (the document declares no server; this is the origin it was published from)
- URL: `https://composal.com/api/v1/merge_resolutions`
- Auth: HTTP bearer

## Request body

- MergeResolutionInput
  - `path` string: Repository-relative path of the conflicted file
  - `base` string, required: Common ancestor file contents
  - `ours` string, required: Current / left file contents
  - `theirs` string, required: Incoming / right file contents
  - `context` object: Optional surrounding files keyed by path

## Response `200`

Resolved file bytes, or resolved=false when the conflict is left intact

- MergeResolutionResult
  - `resolved` boolean, required
  - `action` string, required
  - `fallback` boolean, required
  - `content` string, nullable
  - `model` string
  - `duration_ms` integer, required

## Other responses

- `401`: Authentication required
- `403`: Forbidden
- `404`: Not found
- `413`: Body exceeds 4 MiB
- `422`: Input is not three UTF-8 strings
- `429`: Per-user resolution rate limit exceeded
- `502`: Bad gateway

---

[API](https://skmtc.dev/composal/apis/vex-api.md) - [All operations](https://skmtc.dev/composal/apis/vex-api/llms.txt) - [OpenAPI document](https://skmtc.dev/composal/apis/vex-api/revisions/74298a24e040?raw)
