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

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

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

## 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}/export`
- 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

- ExportSpaceRequest
  - `allowNonEmpty` boolean: Write into a base path that already holds files.

## Response `200`

The folder was written to the repository.

- ExportSpaceResponse
  - `commitSha` string, nullable, required
  - `exported` integer, required
  - `unresolved` string[], required
  - `linkedDocuments` integer, required

## Other responses

- `400`: Bad request, or a folder that is not the sync root
- `403`: Two-way sync is not enabled or permission is missing
- `404`: Folder or repository not found
- `409`: The base path already holds files
- `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/c00420511526?raw)
