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

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

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

## 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/push`
- 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

- PushFileRequest
  - `path` string: Path relative to the sync root. Pass this or fileNodeId.
  - `fileNodeId` string
  - `commitMessage` string, required
  - `forceNewPullRequest` boolean: Open a new pull request instead of updating an open one.

## Response `200`

The file was pushed, or there was nothing to push.

- PushFileResponse
  - `path` string, required
  - `repoPath` string, required
  - `outcome` 'committed' | 'no_changes' | 'pull_request_opened' | 'pull_request_updated', required
  - `commitSha` string, nullable, required
  - `commitUrl` string, nullable, required
  - `pullRequest` object, nullable, required
    - `number` integer, required
    - `url` string, 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 file has an open conflict, or the repository changed it after your edit
- `412`: Connect a personal GitHub account with the repo scope

---

[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)
