GitBook Spaces API

Manage spaces which are containers for documentation or knowledge base content.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 9

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /spaces/{spaceId} Get a documentation space · Get full details of a space by its ID #
Ask an LLM
“How do I get the full metadata for a documentation space?”
“Can I resolve a space ID into a complete space object?”
Tell an agent
Get space {spaceId}.
Resolve space {spaceId} to a full space object.
PATCH /spaces/{spaceId} Rename or reconfigure a space · Update a space's title, icon, or settings #
Ask an LLM
“How do I change the title or icon of a documentation space?”
“Can I lock a space so no one edits it?”
Tell an agent
Rename space {spaceId} to {title}.
Set the edit mode of space {spaceId} to {editMode}.
DELETE /spaces/{spaceId} Delete a documentation space · Delete a space #
Ask an LLM
“How do I permanently remove a documentation space?”
“How long do deleted spaces stay before they are gone?”
Tell an agent destructive · confirm first
Delete space {spaceId}.
Permanently remove the documentation space {spaceId}.
POST /spaces/{spaceId}/duplicate Copy a documentation space · Create a full copy of a space #
Ask an LLM
“How do I make a full copy of a documentation space?”
“Does a duplicate include all pages and content?”
Tell an agent
Duplicate space {spaceId}.
Make a copy of the documentation space {spaceId}.
POST /spaces/{spaceId}/restore Restore a deleted space · Restore a recently deleted space from the trash #
Ask an LLM
“How do I bring back a documentation space I deleted?”
“How long after deletion can a space still be restored?”
Tell an agent
Restore deleted space {spaceId}.
Bring back the documentation space {spaceId} from the trash.
POST /spaces/{spaceId}/move Move a space in the hierarchy · Move a space to a different collection or position #
Ask an LLM
“How do I move a documentation space under a different parent collection?”
“Can I change a space's position in the hierarchy?”
Tell an agent
Move space {spaceId} under parent {parent}.
Insert space {spaceId} at position {position}.
GET /orgs/{organizationId}/spaces List an organization's documentation spaces · List all spaces in an organization #
Ask an LLM
“Which documentation spaces belong to my organization?”
“Can I page through all the spaces in an organization?”
Tell an agent
List all spaces in organization {organizationId}.
Show {limit} spaces per page for organization {organizationId}.
POST /orgs/{organizationId}/spaces Create a documentation space · Create a new documentation space in an organization #
Ask an LLM
“How do I create a new documentation space in an organization?”
“Can I set the language and edit mode when creating a space?”
Tell an agent
Create a space titled {title} in organization {organizationId}.
Create a {language} space in organization {organizationId}.
POST /orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/duplicate Copy a space within a site · Duplicate a space in a site #
Ask an LLM
“How do I duplicate a space that is part of a site?”
“Will a site-space duplicate go into a new sibling section?”
Tell an agent
Duplicate site space {siteSpaceId} on site {siteId} in organization {organizationId}.
Create a draft copy of site space {siteSpaceId} on site {siteId} in {organizationId}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/gitbook:gitbook-spaces-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

gitbook-spaces-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GitBook Spaces API
  description: The GitBook API
  termsOfService: https://policies.gitbook.com
  contact:
    name: API Support
    url: https://gitbook.com/support
    email: support@gitbook.com
  version: 0.0.1-beta
servers:
- url: '{host}/v1'
  variables:
    host:
      default: https://api.gitbook.com
security:
- user: []
- user-internal: []
- user-staff: []
- integration: []
- integration-installation: []
tags:


# --- truncated at 32 KB (55 KB total) ---
# Full source: https://artifacts.apis.io/gitbook/openapi/gitbook-spaces-api-openapi.yml