Get the Git Sync configuration and status for a space
Returns metadata about the Git Sync provider connected to the space. Returns 404 if no Git provider is configured. Use this to check sync state before triggering an import or export.
A unique entity identifier
^[a-zA-Z0-9_-]+$The Git Sync info for the space
Repository name.
The provider of the Git Sync installation.
The integration name providing the Git Sync.
The ID of the Git Sync installation.
The ID of the parent Git Sync installation, if any.
The URL to the repository tree, used when rendering public content.
Directory in the repository this content syncs from, resolved against the parent installation when the installation is managed by a site. Absent when the content syncs from the root of the repository.
How long an operation is allowed to run before it is terminated (in milliseconds).
When the Git provider details were last updated
No Git provider currently set up on the space
GET /v1/spaces/{spaceId}/git/info HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"repoName": "text",
"installationStatus": "unauthenticated",
"installationProvider": "github",
"installationId": "text",
"parentInstallationId": "text",
"url": "text",
"installationProjectDirectory": "text",
"operation": {
"state": "running",
"direction": "export",
"startedAt": "2026-01-01T00:00:00.000Z",
"endedAt": "2026-01-01T00:00:00.000Z",
"error": "text",
"errorAction": {
"label": "text",
"url": "https://example.com"
}
},
"operationTimeout": 1,
"updatedAt": "2026-01-01T00:00:00.000Z"
}Last updated
Was this helpful?