---
title: "POST /api/v1/two-way-sync/{spaceId}/files/conflict/resolve"
method: POST
path: "/api/v1/two-way-sync/{spaceId}/files/conflict/resolve"
---

# POST /api/v1/two-way-sync/{spaceId}/files/conflict/resolve

`POST /api/v1/two-way-sync/{spaceId}/files/conflict/resolve`

## Request

- Base URL: `https://falconer.com` (the document declares no server; this is the origin it was published from)
- URL: `https://falconer.com/api/v1/two-way-sync/{spaceId}/files/conflict/resolve`
- Auth: none declared

## Path parameters

- `spaceId` integer, required: Space id, from GET /spaces.

## Headers

- `x-organization-id` string: Required when using OAuth bearer tokens.

## Request body

- ResolveFileConflictRequest
  - `path` string: Path relative to the sync root. Pass this or fileNodeId.
  - `fileNodeId` string
  - `conflictId` string: Conflict id from list_two_way_sync_conflicts, instead of a path.
  - `updatedAt` string, date-time, required
  - `resolution` union, required
    - object
      - `kind` 'keep_local', required: Keep the Falconer page after a repository delete.
    - object
      - `kind` 'archive_local', required: Accept the repository delete and archive the page.
    - object
      - `kind` 'apply_full', required: Take the repository version.
    - object
      - `kind` 'reject', required: Keep the Falconer version and discard the repository edit.
    - object
      - `kind` 'apply_merged', required
      - `decisions` object, required: Side to keep for each changed block hunk id.
      - `blockHunksFingerprint` string, required
  - `push` boolean: Push the result to the repository after resolving. Only reject and apply_merged push; keep_local queues the file to be recreated, so push it afterwards with push_file.

## Response `200`

The conflict was resolved.

- ResolveFileConflictResponse
  - `conflictId` string, required
  - `path` string, required
  - `resolution` 'keep_local' | 'archive_local' | 'apply_full' | 'reject' | 'apply_merged', required
  - `push` object, nullable, required
    - `ok` boolean, required
    - `commitSha` string, nullable, required
    - `reason` string, nullable, required

## Other responses

- `400`: Bad request, or a folder that is not the sync root
- `403`: Permission is missing
- `404`: Folder not synced, or file not found
- `409`: The conflict or page changed since it was read
- `412`: Connect a personal GitHub account with the repo scope
- `422`: Not a markdown page

---

[API](https://skmtc.dev/falconer/apis/falconer-public-api.md) · [All operations](https://skmtc.dev/falconer/apis/falconer-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/falconer/apis/falconer-public-api/revisions/7b303b7ddf6a?raw)
