For the complete documentation index, see llms.txt. This page is also available as Markdown.

Push space content to a connected Git repository

Triggers an export of the space's current content to the linked Git repository. This is an async operation — the export runs in the background after the request returns 204. Use getSpaceGitInfo to check the current git sync status. The space must already have a Git provider configured.

Available in MCP
post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
spaceIdstringRequired

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Body
urlstringRequired

URL of the Git repository to export to. It can contain basic auth credentials.

refstringRequired

Git ref to push the commit to in the format "refs/heads/main"

commitMessagestringRequired

Message for the commit generated by the export

repoCacheIDstringOptionalDeprecated

Unique identifier to use to cache the Git repository across multiple operations.

repoTreeURLstringOptional

URL to use as a prefix for external file references.

repoCommitURLstringOptional

URL to use as a prefix for the commit URL.

repoProjectDirectorystringOptional

Path to a root directory for the project in the repository.

timestampstring · date-timeOptional

The timestamp of the event that triggered this export. It ensures that Git sync import and export operations are executed in the same order on GitBook and on the remote repository.

forcebooleanOptional
standalonebooleanOptional

If true, the export will be done in a standalone mode, meaning that the exported content will not be linked to the Git repository. This is useful for creating a snapshot of the space's content.

Responses
204

Operation to export the space has been started.

No content

post/spaces/{spaceId}/git/export
204

Operation to export the space has been started.

No content

Last updated

Was this helpful?

Powered by GitBook