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

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.

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

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Responses
200

The Git Sync info for the space

application/json
repoNamestringOptional

Repository name.

installationStatusstring · enumRequiredPossible values:
installationProviderstring · enumRequired

The provider of the Git Sync installation.

Possible values:
integrationstringOptionalDeprecated

The integration name providing the Git Sync.

installationIdstringRequired

The ID of the Git Sync installation.

parentInstallationIdstringOptional

The ID of the parent Git Sync installation, if any.

urlstringOptional

The URL to the repository tree, used when rendering public content.

operationTimeoutintegerOptional

How long an operation is allowed to run before it is terminated (in milliseconds).

updatedAtstring · date-timeOptional

When the Git provider details were last updated

get/spaces/{spaceId}/git/info
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",
  "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?

Powered by GitBook