GitBook Sites API

The Docs Sites API lets you programmatically manage published documentation sites within your organization. You can list and update all sites created under a specific organization, making it easy to audit or interact with site metadata at scale. {% openapi-schemas spec="gitbook" schemas="Site" grouped="false" %} The Site object {% endopenapi-schemas %}

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 21

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 /orgs/{organizationId}/sites List documentation sites in an organization · List all documentation sites in an organization #
Ask an LLM
“Which documentation sites exist in my organization?”
“Can I filter an organization's sites by title or published status?”
Tell an agent
List all documentation sites in organization {organizationId}.
Find sites in {organizationId} titled {title}.
POST /orgs/{organizationId}/sites Create a documentation site · Create a new documentation site in an organization #
Ask an LLM
“How do I create a new documentation site in an organization?”
“Can I link existing spaces to a site when I create it?”
Tell an agent
Create a documentation site {title} in organization {organizationId}.
Create site {title} in {organizationId} linked to spaces {spaces}.
GET /orgs/{organizationId}/sites/{siteId} Get a documentation site · Get a documentation site by its ID #
Ask an LLM
“What are the details of one documentation site?”
“Can I look up a site by its ID?”
Tell an agent
Get documentation site {siteId} in organization {organizationId}.
Show the details of site {siteId} in {organizationId}.
PATCH /orgs/{organizationId}/sites/{siteId} Update a documentation site's properties · Update the properties of a documentation site #
Ask an LLM
“How do I rename a documentation site or change its visibility?”
“Can I point a site at a custom subdirectory path?”
Tell an agent
Rename documentation site {siteId} in {organizationId} to {title}.
Set the visibility of site {siteId} in {organizationId} to {visibility}.
DELETE /orgs/{organizationId}/sites/{siteId} Delete a documentation site · Delete a site #
Ask an LLM
“How do I delete a documentation site?”
“Can I remove a site I no longer need?”
Tell an agent destructive · confirm first
Delete documentation site {siteId} in organization {organizationId}.
Remove site {siteId} from {organizationId}.
GET /orgs/{organizationId}/sites/{siteId}/adaptive-schema Get the visitor attributes schema of an adaptive site · Get the visitor attributes JSON schema for an adaptive content site #
Ask an LLM
“What visitor attributes does an adaptive content site expect?”
“How do I see the JSON schema behind adaptive content conditions?”
Tell an agent
Get the adaptive content schema of site {siteId} in organization {organizationId}.
Show the visitor attributes schema for adaptive site {siteId} in {organizationId}.
PUT /orgs/{organizationId}/sites/{siteId}/adaptive-schema Update a site's visitor attributes schema · Update the visitor attributes JSON schema for an adaptive content site #
Ask an LLM
“How do I change the visitor attributes a site accepts for adaptive content?”
“Can I add a new attribute to the adaptive content schema?”
Tell an agent
Replace the adaptive content schema of site {siteId} in {organizationId} with {jsonSchema}.
Update the visitor attributes schema of site {siteId} in {organizationId} to {jsonSchema}.
GET /orgs/{organizationId}/sites/{siteId}/adaptive-schema/template-conditions List adaptive content condition templates · List condition templates for adaptive content expressions in a site #
Ask an LLM
“What condition templates are available for adaptive content expressions?”
“Which visitor attributes can I use to show or hide content?”
Tell an agent
List the adaptive content condition templates for site {siteId} in organization {organizationId}.
Show the available adaptive condition templates of site {siteId} in {organizationId}.
GET /orgs/{organizationId}/sites/{siteId}/published Get a site's published profile · Get the full published profile of a site including structure and customization #
Ask an LLM
“What does a site look like when it's published?”
“Can I get the full published profile of a site in one call?”
Tell an agent
Get the published profile of site {siteId} in organization {organizationId}.
Fetch the published site {siteId} in {organizationId} with share key {shareKey}.
POST /orgs/{organizationId}/sites/{siteId}/publish Publish a documentation site · Publish a site to make it publicly accessible #
Ask an LLM
“How do I make a documentation site publicly accessible?”
“What happens if I need to upgrade my plan before publishing a site?”
Tell an agent
Publish documentation site {siteId} in organization {organizationId}.
Make site {siteId} in {organizationId} publicly accessible.
GET /orgs/{organizationId}/sites/{siteId}/setup Get a site's setup steps · Get the setup steps of a site #
Ask an LLM
“What steps are left to set up a new documentation site?”
“Has my site been published yet?”
Tell an agent
Show the setup steps for site {siteId} in organization {organizationId}.
Check what remains before site {siteId} in {organizationId} is published.
POST /orgs/{organizationId}/sites/{siteId}/unpublish Take a documentation site offline · Take a site offline by unpublishing it #
Ask an LLM
“How do I temporarily hide a documentation site?”
“Can I unpublish a site and bring it back later?”
Tell an agent
Unpublish documentation site {siteId} in organization {organizationId}.
Take site {siteId} in {organizationId} offline.
PATCH /orgs/{organizationId}/sites/{siteId}/structure/sort Reorder an item in a site's structure · Move a site structure item to a new position #
Ask an LLM
“How do I move a section or space to a new position in a site?”
“Can I reorder sibling items at the same structure level?”
Tell an agent
Move site structure item {item} in site {siteId} of {organizationId} to position {position}.
Reorder sibling {item} in site {siteId} of {organizationId} at position {position}.
GET /orgs/{organizationId}/sites/{siteId}/integration-scripts List scripts injected into a site's pages · List custom scripts injected into a site's published pages #
Ask an LLM
“Which analytics or chat scripts are running on a site?”
“How do I audit the custom scripts on a published site?”
Tell an agent
List the integration scripts on site {siteId} in organization {organizationId}.
Show every script injected into site {siteId} in {organizationId}.
GET /orgs/{organizationId}/sites/{siteId}/integrations List third-party integrations on a site · List third-party integrations enabled on a site #
Ask an LLM
“Which third-party integrations are enabled on a site?”
“Can I search a site's integrations by name?”
Tell an agent
List the integrations enabled on site {siteId} in organization {organizationId}.
Find integrations on site {siteId} in {organizationId} matching {search}.
POST /orgs/{organizationId}/sites/{siteId}/search Search a site's content · Full-text search across all content in a site #
Ask an LLM
“How do I search all content in a multi-section documentation site?”
“Can I restrict a site search to specific spaces or sections?”
Tell an agent
Search site {siteId} in organization {organizationId} for {query}.
Find pages in site {siteId} of {organizationId} matching {query}.
POST /orgs/{organizationId}/sites/{siteId}/search/prewarm Prewarm a site's search cache · Prewarm a site's search cache #
Ask an LLM
“How do I reduce search latency when a visitor opens a site's search?”
“Can I hint the search backend before a visitor starts searching?”
Tell an agent
Prewarm the search cache for site {siteId} in organization {organizationId}.
Warm up site {siteId} search in {organizationId} so queries feel fast.
POST /orgs/{organizationId}/sites/{siteId}/template Populate a site with the default documentation template · Apply the default documentation template to a site #
Ask an LLM
“How do I give an empty site a ready-to-edit documentation structure?”
“Can I seed a new site with the default template?”
Tell an agent
Apply the default documentation template to site {siteId} in organization {organizationId}.
Populate empty site {siteId} in {organizationId} with the default template.
POST /orgs/{organizationId}/sites/{siteId}/styleguide Create or get a site's style guide · Create or retrieve the style guide space for a site #
Ask an LLM
“How do I get a dedicated style guide space for a site?”
“Can I seed a site's style guide with a template?”
Tell an agent
Create or retrieve the style guide for site {siteId} in organization {organizationId}.
Seed the style guide of site {siteId} in {organizationId} with template {template}.
POST /orgs/{organizationId}/sites/{siteId}/styleguide/runs Start a style guide check on spaces · Start a style guide check run for a site #
Ask an LLM
“How do I check a set of spaces against my site's style guide?”
“Can I run a style guide check on several spaces at once?”
Tell an agent
Start a style guide check on spaces {spaces} in site {siteId}.
Run style guide checks on {spaces} in organization {organizationId}.
GET /orgs/{organizationId}/sites/{siteId}/styleguide/runs List a site's style guide check runs · List the style guide check runs of a site #
Ask an LLM
“Which style guide checks has my site run?”
“Can I see the style guide check runs for a site?”
Tell an agent
List the style guide check runs for site {siteId} in organization {organizationId}.
Show the style guide runs of 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-sites-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-sites-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GitBook Sites 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 (244 KB total) ---
# Full source: https://artifacts.apis.io/gitbook/openapi/gitbook-sites-api-openapi.yml