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

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

`POST /api/v1/two-way-sync/{spaceId}/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}/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

- PushAllChangesRequest
  - `commitMessage` string
  - `paths` string[]: Markdown pages to push instead of every change. Pull request folders only.
  - `pullRequestTarget` union
    - object
      - `mode` 'new', required
    - object
      - `mode` 'existing', required
      - `number` integer, required

## Response `200`

Every pushable change was attempted; per-file failures are listed.

- PushAllChangesResponse
  - `pushed` integer, required
  - `failed` integer, required
  - `skipped` integer, required
  - `failures` object[], required
    - `path` string, nullable, required
    - `reason` string, required
  - `heldBack` object[], required: Files left out because the repository changed them too.
    - `path` string, nullable, required
  - `pullRequestUrl` string, nullable, required
  - `pullRequestUpdated` boolean, required
  - `repositoryChangesPushed` boolean, required
  - `commitUrl` 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
- `412`: Connect a personal GitHub account with the repo scope
- `422`: A selected path is 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)
