Space integrations

Connect external tools and plugins to enhance your space functionality.

This API handles the registration and removal of integrations, automating how data flows between GitBook and your chosen external services.

List integrations enabled in a space

get
Authorizations
Path parameters
spaceIdstringrequired

The unique id of the space

Query parameters
searchstringoptional

A search string to filter integrations by name

Responses
application/json
all ofoptional
get
GET /v1/spaces/{spaceId}/integrations HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Listing of integrations enabled in the space.

{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "object": "integration",
      "name": "text",
      "version": 1,
      "title": "text",
      "description": "text",
      "summary": "text",
      "previewImages": [
        "text"
      ],
      "target": "all",
      "verified": true,
      "visibility": "public",
      "scopes": [
        "space:views:read"
      ],
      "categories": [
        "analytics"
      ],
      "blocks": [
        {
          "id": "text",
          "title": "text",
          "description": "text",
          "icon": "text",
          "urlUnfurl": [
            "text"
          ],
          "markdown": {
            "codeblock": "text",
            "body": "text"
          }
        }
      ],
      "contentSources": [
        {
          "id": "text",
          "title": "text",
          "description": "text",
          "icon": "text",
          "configuration": {
            "componentId": "text"
          }
        }
      ],
      "configurations": {
        "account": {
          "properties": {
            "ANY_ADDITIONAL_PROPERTY": {
              "title": "text",
              "description": "text",
              "type": "string",
              "default": "text",
              "completion_url": "text",
              "enum": [
                "text"
              ]
            }
          },
          "required": [
            "text"
          ]
        },
        "space": {
          "properties": {
            "ANY_ADDITIONAL_PROPERTY": {
              "title": "text",
              "description": "text",
              "type": "string",
              "default": "text",
              "completion_url": "text",
              "enum": [
                "text"
              ]
            }
          },
          "required": [
            "text"
          ]
        },
        "site": {
          "properties": {
            "ANY_ADDITIONAL_PROPERTY": {
              "title": "text",
              "description": "text",
              "type": "string",
              "default": "text",
              "completion_url": "text",
              "enum": [
                "text"
              ]
            }
          },
          "required": [
            "text"
          ]
        }
      },
      "externalLinks": [
        {
          "url": "https://example.com",
          "label": "text"
        }
      ],
      "owner": {
        "object": "organization",
        "id": "text",
        "title": "text",
        "createdAt": "2025-04-16T04:38:07.093Z",
        "emailDomains": [
          "text"
        ],
        "hostname": "text",
        "type": "business",
        "useCase": "internalDocs",
        "communityType": "nonProfit",
        "defaultRole": "admin",
        "defaultContent": {
          "type": "site",
          "site": "text"
        },
        "sso": true,
        "ai": true,
        "inviteLinks": true,
        "plan": "free_2024",
        "billing": {
          "interval": "monthly",
          "endDate": "2025-04-16T04:38:07.093Z",
          "hasPaymentFailed": true,
          "isScheduledToCancel": true
        },
        "urls": {
          "location": "https://example.com",
          "app": "https://example.com",
          "logo": "https://example.com"
        },
        "trial": {
          "status": "notapplicable",
          "endDate": "2025-04-16T04:38:07.093Z",
          "decision": "downgrade"
        },
        "customHostname": "text",
        "blocked": {
          "reason": "security"
        },
        "internal_isOnNewTrial": true,
        "internal_billingMigration": {
          "deadline": "2025-04-16T04:38:07.093Z",
          "discountPercent": 1,
          "discountEndDate": "2025-04-16T04:38:07.093Z"
        },
        "permissions": {
          "admin": true,
          "createContent": true
        }
      },
      "urls": {
        "location": "https://example.com",
        "icon": "https://example.com",
        "app": "https://example.com",
        "assets": "https://example.com",
        "publicEndpoint": "https://example.com"
      },
      "permissions": {
        "admin": true,
        "install": true
      },
      "contentSecurityPolicy": "text"
    }
  ]
}

List all space integrations blocks

get
Authorizations
Path parameters
spaceIdstringrequired

The unique id of the space

Responses
application/json
object[]optional
get
GET /v1/spaces/{spaceId}/integration-blocks HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "name": "text",
    "blocks": [
      {
        "id": "text",
        "title": "text",
        "description": "text",
        "icon": "text",
        "urlUnfurl": [
          "text"
        ],
        "markdown": {
          "codeblock": "text",
          "body": "text"
        }
      }
    ]
  }
]

List all the scripts to embed in published content for a space

get
Authorizations
Path parameters
spaceIdstringrequired

The unique id of the space

Responses
application/json
object[]optional
get
GET /v1/spaces/{spaceId}/integration-scripts HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "script": "https://example.com",
    "contentSecurityPolicy": "text",
    "cookies": true
  }
]

Was this helpful?