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

Pull content into a space from a connected Git repository

Triggers an import from the linked Git repository into the space, updating the space's content to match the repository. This is an async operation — it runs in the background after the request returns 204. Use getSpaceGitInfo to check 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 import. It can contain basic auth credentials.

refstringRequired

Git ref to import in the format "refs/heads/main"

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 import. 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 import will generate a revision without updating the space primary content.

Responses
204

Operation to import the repository has been started.

No content

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

Operation to import the repository has been started.

No content

Last updated

Was this helpful?

Powered by GitBook