Explore how adaptive content transforms your docs into a dynamic, tailored experience for every user.
Read the docs
LogoLogo
ProductPricingLog inSign up
  • Documentation
  • Developers
  • Guides
  • Changelog
  • Help Center
  • Getting Started
    • Developer Documentation
    • Quickstart
    • Development
    • Publishing
  • Integrations
    • Introduction
    • Using the CLI
    • Configuration
    • ContentKit
      • Component reference
    • Integration runtime
  • Client library
  • Guides
    • Creating a custom unfurl action
    • Creating interactive blocks
    • Referencing your integration in Markdown
    • Working with HTTP requests
    • Using the CLI in CI/CD
  • GitBook API
    • Introduction
    • Authentication
    • API reference
      • Organizations
        • Organization members
        • Organization invites
        • Organization AI ask
      • Docs sites
        • Site share links
        • Site structure
        • Site auth
        • Site preview
        • Site customization
        • Site spaces
        • Site sections
        • Site section groups
        • Site redirects
        • Site MCP servers
        • Site ads
        • Site users
        • Site insights
        • Site AI ask
      • Collections
        • Collection users
        • Collection teams
      • Spaces
        • Space content
        • Space comments
        • Space embeds
        • Space users
        • Space teams
        • Space integrations
        • Git
      • Change requests
        • Change request content
        • Change request contributors
        • Change request reviewers
        • Change request comments
      • Translations
        • Glossary
      • Integrations
      • URLs
      • OpenAPI
        • OpenAPI spec versions
      • Conversations
      • Custom fonts
      • Subdomains
      • Users
      • Teams
        • Team members
      • SSO
      • Storage
      • Custom hostnames
      • System info
    • Rate limiting
    • Pagination
    • Errors
  • Marketplace
    • Overview
    • Submit your app for review
  • Resources
    • Concepts
    • Changelog
    • ContentKit playground
    • GitHub examples
Powered by GitBook
On this page
  1. GitBook API
  2. API reference

Docs sites

Manage your published docs sites.

Was this helpful?

LogoLogo

Resources

  • Showcase
  • Enterprise
  • Status

Company

  • Careers
  • Blog
  • Community

Policies

  • Subprocessors
  • Terms of Service
CtrlK

Was this helpful?

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.

  • The Site object
  • GETList all sites
  • POSTCreate a site
  • GETGet a site by its ID
  • DELETEDelete a site
  • PATCHUpdate a site
  • GETGet the JSON schema describing the attributes expected for an Adaptive content site visitor.
  • PUTUpdate the JSON schema of the attributes expected for an Adaptive content site visitor.
  • GETList templates of conditions generated based on the site visitor schema that can be used in adaptive content expressions.
  • GETGet a published site
  • POSTPublish a site
  • POSTUnpublish a site
  • PATCHMove a site space, site section or site section group to a new position in the site structure.
  • POSTSearch in a site

The Site object

Attributes
objectstring · enumRequiredPossible values:
idstringRequired

Unique identifier of the site

typestring · enumRequired

The type of the site

Possible values:
titlestring · min: 2 · max: 128Required

Title of the site

iconone ofOptional
or
or
objectOptional
or
string · enum | nullableOptionalPossible values:
hostnamestring · max: 512Optional

Custom hostname for the site, for e.g. docs.mycompany.com

Pattern: ^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?[.]){2,}[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$
basenamestring · min: 1 · max: 100Optional

Basename for the site. For e.g. api

visibilitystring · enumRequired

The visibility setting of the site determines the audience of the site.

  • public: Anyone can access the site, and the site is indexed by search engines.
  • unlisted: Anyone can access the site, and the site is not indexed by search engines
  • share-link: Anyone with a secret token in the url can access the site.
  • visitor-auth: Anyone authenticated through a JWT token can access the site.
Possible values:
publishedbooleanRequired

Whether the site is live or not. If true, the site is accessible to the audience defined by the visibility setting.

siteSpacesnumberRequired
createdAtstring · date-timeRequired
adsone ofOptional
or
or
or
agentsContextstring · enumRequired

Defines if the site will be included in the agent's context.

  • excluded means that the agent will not be able to access the site.
  • included means that the agent will be able to access the site.
Possible values:

The Site object

List all sites

get
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

spacestringOptional

Identifier of the space to filter the sites by

titlestringOptional

Filter sites by their title

publishedbooleanOptional

Filter sites by their published status

Responses
200

OK

application/json
Responseall of
get
200

OK

Create a site

post
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

Body
typestring · enumOptional

The type of the site, defaults to Basic

Possible values:
titlestring · min: 2 · max: 128Optional

Title of the site

visibilitystring · enumOptional

The visibility setting of the site determines the audience of the site.

  • public: Anyone can access the site, and the site is indexed by search engines.
  • unlisted: Anyone can access the site, and the site is not indexed by search engines
  • share-link: Anyone with a secret token in the url can access the site.
  • visitor-auth: Anyone authenticated through a JWT token can access the site.
Possible values:
spacesone ofOptional
string[]Optional

ID of spaces to be added to the site

or
string · enumOptional

Create a new space associated to the site

Possible values:
Responses
201

Site created

application/json
post
201

Site created

Get a site by its ID

get
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

siteIdstringRequired

The unique id of the site

Responses
200

OK

application/json
404

No matching site found

application/json
get

Delete a site

delete
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

siteIdstringRequired

The unique id of the site

Responses
204

Site did not exist

205

Site has been deleted

delete

No content

Update a site

patch
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

siteIdstringRequired

The unique id of the site

Body
Responses
200

OK

application/json
patch

Get the JSON schema describing the attributes expected for an Adaptive content site visitor.

get
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

siteIdstringRequired

The unique id of the site

Responses
200

The JSON schema that defines the attributes expected from a visitor of the Adaptive content site.

application/json
404

No visitor attributes schema found for the site.

application/json
default

Unexpected Error

application/json
get

Update the JSON schema of the attributes expected for an Adaptive content site visitor.

put
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

siteIdstringRequired

The unique id of the site

Body
Responses
200

The site adaptive schema has been updated.

application/json
400

Bad Request

application/json
default

Unexpected Error

application/json
put

List templates of conditions generated based on the site visitor schema that can be used in adaptive content expressions.

get
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

siteIdstringRequired

The unique id of the site

Responses
200

List of template conditions generated based on the site visitor schema.

application/json
get
200

List of template conditions generated based on the site visitor schema.

Get a published site

get

Get the complete profile of a site in an organization to provide the published experience. It includes site, customization, structure, integration scripts etc.

Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

siteIdstringRequired

The unique id of the site

Query parameters
shareKeystringOptional

For sites published via share-links, the share key is useful to resolve published URLs.

Responses
200

OK

application/json
404

No matching site found

application/json
get

Publish a site

post
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

siteIdstringRequired

The unique id of the site

Responses
200

Site published successfully

application/json
Responseone of
or
post
200

Site published successfully

Unpublish a site

post
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

siteIdstringRequired

The unique id of the site

Responses
200

Site unpublished successfully

application/json
post
200

Site unpublished successfully

Move a site space, site section or site section group to a new position in the site structure.

patch
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

siteIdstringRequired

The unique id of the site

Body
Responses
200

Item successfully moved

application/json
Responseone of

A site structure item can be a site space, a site section or a site section group. It is used to represent the structure of a site.

or
or
400

Invalid move position provided

application/json
404

No matching item found

application/json
default

Unexpected Error

application/json
patch

Search in a site

post
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

siteIdstringRequired

The unique id of the site

Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

Body
all ofOptional
and
one ofOptional
or
or
or
Responses
200

OK

application/json
Responseall of
post
titlestring · min: 2 · max: 128Optional

Title of the site

visibilitystring · enumOptional

The visibility setting of the site determines the audience of the site.

  • public: Anyone can access the site, and the site is indexed by search engines.
  • unlisted: Anyone can access the site, and the site is not indexed by search engines
  • share-link: Anyone with a secret token in the url can access the site.
  • visitor-auth: Anyone authenticated through a JWT token can access the site.
Possible values:
basenamestring · min: 1 · max: 100Optional

Basename for the site. For e.g. api

agentsContextstring · enumOptional

Defines if the site will be included in the agent's context.

  • excluded means that the agent will not be able to access the site.
  • included means that the agent will be able to access the site.
Possible values:
defaultSiteSpacestringOptional

ID of the site-space to be used as the default at the root level. If site has sections, this will mark the default site space in the site's default section.

defaultSiteSectionstringOptional

ID of the site-section to be used as the default.

proxyone ofOptional

Configure a proxy URL for a site. For example, you can use it to host the site on a subdirectory of your domain like https://company.com/docs. Use null to remove the proxy.

string · max: 512Optional

Proxy URL for the site, for e.g. company.com/docs or www.company.com/developer/docs etc.

Pattern: ^([\w-]+\.)*[\w-]+\.[a-zA-Z]{2,}(\/[\w-]+)+$
or
string · enum | nullableOptionalPossible values:
200

OK

{
  "object": "site",
  "id": "text",
  "type": "basic",
  "title": "text",
  "icon": {
    "icon": {
      "light": "https://example.com",
      "dark": "https://example.com"
    }
  },
  "hostname": "text",
  "basename": "text",
  "proxy": {
    "origin": "text",
    "target": "text"
  },
  "visibility": "public",
  "published": true,
  "siteSpaces": 1,
  "createdAt": "2025-08-26T22:08:41.460Z",
  "adaptiveContent": {
    "enabled": true
  },
  "ads": {
    "status": "pending",
    "submittable": true
  },
  "agentsContext": "excluded",
  "features": [
    {
      "id": "sites-adaptive-content",
      "plan": "basic",
      "frozen": true,
      "customizations": [
        "header-logo"
      ]
    }
  ],
  "urls": {
    "location": "https://example.com",
    "app": "https://example.com",
    "published": "https://example.com"
  }
}
{
  "object": "site-adaptive-schema",
  "jsonSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "properties": {
      "unsigned": {
        "type": "object",
        "description": "Unsigned claims of the site visitor.",
        "properties": {
          "ANY_ADDITIONAL_PROPERTY": {
            "type": "boolean",
            "description": "text"
          }
        },
        "additionalProperties": false
      },
      "ANY_ADDITIONAL_PROPERTY": {
        "type": "boolean",
        "description": "text"
      }
    },
    "additionalProperties": false
  },
  "updatedAt": "2025-08-26T22:08:41.460Z"
}
{
  "object": "published-content-site",
  "site": {
    "object": "site",
    "id": "text",
    "type": "basic",
    "title": "text",
    "icon": {
      "icon": {
        "light": "https://example.com",
        "dark": "https://example.com"
      }
    },
    "hostname": "text",
    "basename": "text",
    "proxy": {
      "origin": "text",
      "target": "text"
    },
    "visibility": "public",
    "published": true,
    "siteSpaces": 1,
    "createdAt": "2025-08-26T22:08:41.460Z",
    "adaptiveContent": {
      "enabled": true
    },
    "ads": {
      "status": "pending",
      "submittable": true
    },
    "agentsContext": "excluded",
    "features": [
      {
        "id": "sites-adaptive-content",
        "plan": "basic",
        "frozen": true,
        "customizations": [
          "header-logo"
        ]
      }
    ],
    "urls": {
      "location": "https://example.com",
      "app": "https://example.com",
      "published": "https://example.com"
    }
  },
  "structure": {
    "type": "sections",
    "structure": [
      {
        "object": "site-section",
        "id": "text",
        "title": "text",
        "description": "text",
        "default": true,
        "path": "text",
        "condition": "text",
        "sectionGroup": "text",
        "siteSpaces": [
          {
            "object": "site-space",
            "id": "text",
            "path": "text",
            "section": "text",
            "space": {
              "object": "space",
              "id": "text",
              "title": "text",
              "emoji": "🎉",
              "visibility": "public",
              "createdAt": "2025-08-26T22:08:41.460Z",
              "updatedAt": "2025-08-26T22:08:41.460Z",
              "deletedAt": "2025-08-26T22:08:41.460Z",
              "editMode": "live",
              "urls": {
                "location": "https://example.com",
                "app": "https://example.com",
                "published": "https://example.com",
                "public": "https://example.com",
                "icon": "https://example.com"
              },
              "organization": "text",
              "parent": "text",
              "language": "en",
              "gitSync": {
                "repoName": "text",
                "installationProvider": "github",
                "integration": "text",
                "url": "text",
                "updatedAt": "2025-08-26T22:08:41.460Z"
              },
              "visitorAuth": {
                "backend": "custom"
              },
              "revision": "text",
              "defaultLevel": "admin",
              "comments": 1,
              "changeRequests": 1,
              "changeRequestsOpen": 1,
              "changeRequestsDraft": 1,
              "permissions": {
                "view": true,
                "access": true,
                "admin": true,
                "viewInviteLinks": true,
                "edit": true,
                "triggerGitSync": true,
                "comment": true,
                "merge": true,
                "review": true,
                "installIntegration": true
              }
            },
            "title": "text",
            "default": true,
            "condition": "text",
            "hasAdvancedCustomizationFeature": true,
            "urls": {
              "published": "https://example.com"
            }
          }
        ],
        "urls": {
          "published": "https://example.com"
        },
        "icon": "gear"
      }
    ]
  },
  "customizations": {
    "site": {
      "title": "text",
      "styling": {
        "theme": "clean",
        "primaryColor": {
          "light": "text",
          "dark": "text"
        },
        "tint": {
          "color": {
            "light": "text",
            "dark": "text"
          }
        },
        "infoColor": {
          "light": "text",
          "dark": "text"
        },
        "successColor": {
          "light": "text",
          "dark": "text"
        },
        "warningColor": {
          "light": "text",
          "dark": "text"
        },
        "dangerColor": {
          "light": "text",
          "dark": "text"
        },
        "corners": "straight",
        "depth": "subtle",
        "links": "default",
        "font": "ABCFavorit",
        "monospaceFont": "FiraCode",
        "icons": "regular",
        "sidebar": {
          "background": "default",
          "list": "default"
        },
        "search": "prominent"
      },
      "internationalization": {
        "locale": "en"
      },
      "favicon": {
        "icon": {
          "light": "https://example.com",
          "dark": "https://example.com"
        }
      },
      "header": {
        "logo": {
          "light": "https://example.com",
          "dark": "https://example.com"
        },
        "links": [
          {
            "title": "text",
            "style": "link",
            "to": {
              "kind": "file",
              "file": "text"
            },
            "links": [
              {
                "title": "text",
                "to": {
                  "kind": "file",
                  "file": "text"
                }
              }
            ],
            "condition": "text"
          }
        ]
      },
      "footer": {
        "logo": {
          "light": "https://example.com",
          "dark": "https://example.com"
        },
        "groups": [
          {
            "title": "text",
            "links": [
              {
                "title": "text",
                "to": {
                  "kind": "file",
                  "file": "text"
                }
              }
            ]
          }
        ],
        "copyright": "text"
      },
      "announcement": {
        "enabled": true,
        "message": "text",
        "link": {
          "title": "text",
          "to": {
            "kind": "file",
            "file": "text"
          }
        },
        "style": "info"
      },
      "themes": {
        "default": "light",
        "toggeable": true
      },
      "pdf": {
        "enabled": true
      },
      "feedback": {
        "enabled": true
      },
      "ai": {
        "mode": "none",
        "integrationId": "text"
      },
      "advancedCustomization": {
        "enabled": true
      },
      "git": {
        "showEditLink": true
      },
      "pageActions": {
        "externalAI": true,
        "markdown": true
      },
      "externalLinks": {
        "target": "self"
      },
      "pagination": {
        "enabled": true
      },
      "trademark": {
        "enabled": true
      },
      "privacyPolicy": {
        "url": "https://example.com"
      },
      "socialPreview": {
        "url": "https://example.com"
      },
      "insights": {
        "trackingCookie": true
      }
    },
    "siteSpaces": {
      "ANY_ADDITIONAL_PROPERTY": {
        "title": "text",
        "styling": {
          "theme": "clean",
          "primaryColor": {
            "light": "text",
            "dark": "text"
          },
          "tint": {
            "color": {
              "light": "text",
              "dark": "text"
            }
          },
          "infoColor": {
            "light": "text",
            "dark": "text"
          },
          "successColor": {
            "light": "text",
            "dark": "text"
          },
          "warningColor": {
            "light": "text",
            "dark": "text"
          },
          "dangerColor": {
            "light": "text",
            "dark": "text"
          },
          "corners": "straight",
          "depth": "subtle",
          "links": "default",
          "font": "ABCFavorit",
          "monospaceFont": "FiraCode",
          "icons": "regular",
          "sidebar": {
            "background": "default",
            "list": "default"
          },
          "search": "prominent"
        },
        "internationalization": {
          "locale": "en"
        },
        "favicon": {
          "icon": {
            "light": "https://example.com",
            "dark": "https://example.com"
          }
        },
        "header": {
          "logo": {
            "light": "https://example.com",
            "dark": "https://example.com"
          },
          "links": [
            {
              "title": "text",
              "style": "link",
              "to": {
                "kind": "file",
                "file": "text"
              },
              "links": [
                {
                  "title": "text",
                  "to": {
                    "kind": "file",
                    "file": "text"
                  }
                }
              ],
              "condition": "text"
            }
          ]
        },
        "footer": {
          "logo": {
            "light": "https://example.com",
            "dark": "https://example.com"
          },
          "groups": [
            {
              "title": "text",
              "links": [
                {
                  "title": "text",
                  "to": {
                    "kind": "file",
                    "file": "text"
                  }
                }
              ]
            }
          ],
          "copyright": "text"
        },
        "announcement": {
          "enabled": true,
          "message": "text",
          "link": {
            "title": "text",
            "to": {
              "kind": "file",
              "file": "text"
            }
          },
          "style": "info"
        },
        "themes": {
          "default": "light",
          "toggeable": true
        },
        "pdf": {
          "enabled": true
        },
        "feedback": {
          "enabled": true
        },
        "ai": {
          "mode": "none",
          "integrationId": "text"
        },
        "advancedCustomization": {
          "enabled": true
        },
        "git": {
          "showEditLink": true
        },
        "pageActions": {
          "externalAI": true,
          "markdown": true
        },
        "externalLinks": {
          "target": "self"
        },
        "pagination": {
          "enabled": true
        },
        "trademark": {
          "enabled": true
        },
        "privacyPolicy": {
          "url": "https://example.com"
        },
        "socialPreview": {
          "url": "https://example.com"
        },
        "insights": {
          "trackingCookie": true
        }
      }
    }
  },
  "scripts": [
    {
      "script": "https://example.com",
      "contentSecurityPolicy": "text",
      "cookies": true
    }
  ]
}
{
  "object": "site-space",
  "id": "text",
  "path": "text",
  "section": "text",
  "space": {
    "object": "space",
    "id": "text",
    "title": "text",
    "emoji": "🎉",
    "visibility": "public",
    "createdAt": "2025-08-26T22:08:41.460Z",
    "updatedAt": "2025-08-26T22:08:41.460Z",
    "deletedAt": "2025-08-26T22:08:41.460Z",
    "editMode": "live",
    "urls": {
      "location": "https://example.com",
      "app": "https://example.com",
      "published": "https://example.com",
      "public": "https://example.com",
      "icon": "https://example.com"
    },
    "organization": "text",
    "parent": "text",
    "language": "en",
    "gitSync": {
      "repoName": "text",
      "installationProvider": "github",
      "integration": "text",
      "url": "text",
      "updatedAt": "2025-08-26T22:08:41.460Z"
    },
    "visitorAuth": {
      "backend": "custom"
    },
    "revision": "text",
    "defaultLevel": "admin",
    "comments": 1,
    "changeRequests": 1,
    "changeRequestsOpen": 1,
    "changeRequestsDraft": 1,
    "permissions": {
      "view": true,
      "access": true,
      "admin": true,
      "viewInviteLinks": true,
      "edit": true,
      "triggerGitSync": true,
      "comment": true,
      "merge": true,
      "review": true,
      "installIntegration": true
    }
  },
  "title": "text",
  "default": true,
  "condition": "text",
  "hasAdvancedCustomizationFeature": true,
  "urls": {
    "published": "https://example.com"
  }
}
200

OK

{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "id": "text",
      "title": "text",
      "pages": [
        {
          "id": "text",
          "title": "text",
          "path": "text",
          "sections": [
            {
              "id": "text",
              "title": "text",
              "path": "text",
              "body": "text",
              "urls": {
                "app": "https://example.com"
              }
            }
          ],
          "urls": {
            "app": "https://example.com"
          }
        }
      ]
    }
  ]
}
{
  "object": "site",
  "id": "text",
  "type": "basic",
  "title": "text",
  "icon": {
    "icon": {
      "light": "https://example.com",
      "dark": "https://example.com"
    }
  },
  "hostname": "text",
  "basename": "text",
  "proxy": {
    "origin": "text",
    "target": "text"
  },
  "visibility": "public",
  "published": true,
  "siteSpaces": 1,
  "createdAt": "2025-08-26T22:08:41.460Z",
  "adaptiveContent": {
    "enabled": true
  },
  "ads": {
    "status": "pending",
    "submittable": true
  },
  "agentsContext": "excluded",
  "features": [
    {
      "id": "sites-adaptive-content",
      "plan": "basic",
      "frozen": true,
      "customizations": [
        "header-logo"
      ]
    }
  ],
  "urls": {
    "location": "https://example.com",
    "app": "https://example.com",
    "published": "https://example.com"
  }
}
GET /v1/orgs/{organizationId}/sites HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
POST /v1/orgs/{organizationId}/sites HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "type": "basic",
  "title": "text",
  "visibility": "public",
  "spaces": [
    "text"
  ]
}
GET /v1/orgs/{organizationId}/sites/{siteId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "site",
  "id": "text",
  "type": "basic",
  "title": "text",
  "icon": {
    "icon": {
      "light": "https://example.com",
      "dark": "https://example.com"
    }
  },
  "hostname": "text",
  "basename": "text",
  "proxy": {
    "origin": "text",
    "target": "text"
  },
  "visibility": "public",
  "published": true,
  "siteSpaces": 1,
  "createdAt": "2025-08-26T22:08:41.460Z",
  "adaptiveContent": {
    "enabled": true
  },
  "ads": {
    "status": "pending",
    "submittable": true
  },
  "agentsContext": "excluded",
  "features": [
    {
      "id": "sites-adaptive-content",
      "plan": "basic",
      "frozen": true,
      "customizations": [
        "header-logo"
      ]
    }
  ],
  "urls": {
    "location": "https://example.com",
    "app": "https://example.com",
    "published": "https://example.com"
  }
}
DELETE /v1/orgs/{organizationId}/sites/{siteId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
PATCH /v1/orgs/{organizationId}/sites/{siteId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 187

{
  "title": "text",
  "visibility": "public",
  "basename": "text",
  "adaptiveContent": {
    "enabled": true
  },
  "agentsContext": "excluded",
  "defaultSiteSpace": "text",
  "defaultSiteSection": "text",
  "proxy": "text"
}
GET /v1/orgs/{organizationId}/sites/{siteId}/adaptive-schema HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "site-adaptive-schema",
  "jsonSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "properties": {
      "unsigned": {
        "type": "object",
        "description": "Unsigned claims of the site visitor.",
        "properties": {
          "ANY_ADDITIONAL_PROPERTY": {
            "type": "boolean",
            "description": "text"
          }
        },
        "additionalProperties": false
      },
      "ANY_ADDITIONAL_PROPERTY": {
        "type": "boolean",
        "description": "text"
      }
    },
    "additionalProperties": false
  },
  "updatedAt": "2025-08-26T22:08:41.460Z"
}
PUT /v1/orgs/{organizationId}/sites/{siteId}/adaptive-schema HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 386

{
  "jsonSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "properties": {
      "unsigned": {
        "type": "object",
        "description": "Unsigned claims of the site visitor.",
        "properties": {
          "ANY_ADDITIONAL_PROPERTY": {
            "type": "boolean",
            "description": "text"
          }
        },
        "additionalProperties": false
      },
      "ANY_ADDITIONAL_PROPERTY": {
        "type": "boolean",
        "description": "text"
      }
    },
    "additionalProperties": false
  }
}
GET /v1/orgs/{organizationId}/sites/{siteId}/adaptive-schema/template-conditions HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "items": [
    {
      "description": "text",
      "condition": "text"
    }
  ]
}
GET /v1/orgs/{organizationId}/sites/{siteId}/published HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
POST /v1/orgs/{organizationId}/sites/{siteId}/publish HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "site",
  "id": "text",
  "type": "basic",
  "title": "text",
  "icon": {
    "icon": {
      "light": "https://example.com",
      "dark": "https://example.com"
    }
  },
  "hostname": "text",
  "basename": "text",
  "proxy": {
    "origin": "text",
    "target": "text"
  },
  "visibility": "public",
  "published": true,
  "siteSpaces": 1,
  "createdAt": "2025-08-26T22:08:41.460Z",
  "adaptiveContent": {
    "enabled": true
  },
  "ads": {
    "status": "pending",
    "submittable": true
  },
  "agentsContext": "excluded",
  "features": [
    {
      "id": "sites-adaptive-content",
      "plan": "basic",
      "frozen": true,
      "customizations": [
        "header-logo"
      ]
    }
  ],
  "urls": {
    "location": "https://example.com",
    "app": "https://example.com",
    "published": "https://example.com"
  }
}
POST /v1/orgs/{organizationId}/sites/{siteId}/unpublish HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "site",
  "id": "text",
  "type": "basic",
  "title": "text",
  "icon": {
    "icon": {
      "light": "https://example.com",
      "dark": "https://example.com"
    }
  },
  "hostname": "text",
  "basename": "text",
  "proxy": {
    "origin": "text",
    "target": "text"
  },
  "visibility": "public",
  "published": true,
  "siteSpaces": 1,
  "createdAt": "2025-08-26T22:08:41.460Z",
  "adaptiveContent": {
    "enabled": true
  },
  "ads": {
    "status": "pending",
    "submittable": true
  },
  "agentsContext": "excluded",
  "features": [
    {
      "id": "sites-adaptive-content",
      "plan": "basic",
      "frozen": true,
      "customizations": [
        "header-logo"
      ]
    }
  ],
  "urls": {
    "location": "https://example.com",
    "app": "https://example.com",
    "published": "https://example.com"
  }
}
PATCH /v1/orgs/{organizationId}/sites/{siteId}/structure/sort HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 140

{
  "item": {
    "type": "site-space",
    "id": "text"
  },
  "position": {
    "before": {
      "type": "site-space",
      "id": "text"
    },
    "after": {
      "type": "site-space",
      "id": "text"
    }
  }
}
POST /v1/orgs/{organizationId}/sites/{siteId}/search HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 73

{
  "query": "text",
  "scope": {
    "mode": "default",
    "includedSiteSpaces": [
      "text"
    ]
  }
}
{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "object": "site",
      "id": "text",
      "type": "basic",
      "title": "text",
      "icon": {
        "icon": {
          "light": "https://example.com",
          "dark": "https://example.com"
        }
      },
      "hostname": "text",
      "basename": "text",
      "proxy": {
        "origin": "text",
        "target": "text"
      },
      "visibility": "public",
      "published": true,
      "siteSpaces": 1,
      "createdAt": "2025-08-26T22:08:41.460Z",
      "adaptiveContent": {
        "enabled": true
      },
      "ads": {
        "status": "pending",
        "submittable": true
      },
      "agentsContext": "excluded",
      "features": [
        {
          "id": "sites-adaptive-content",
          "plan": "basic",
          "frozen": true,
          "customizations": [
            "header-logo"
          ]
        }
      ],
      "urls": {
        "location": "https://example.com",
        "app": "https://example.com",
        "published": "https://example.com"
      }
    }
  ]
}
{
  "object": "site",
  "id": "text",
  "type": "basic",
  "title": "text",
  "icon": {
    "icon": {
      "light": "https://example.com",
      "dark": "https://example.com"
    }
  },
  "hostname": "text",
  "basename": "text",
  "proxy": {
    "origin": "text",
    "target": "text"
  },
  "visibility": "public",
  "published": true,
  "siteSpaces": 1,
  "createdAt": "2025-08-26T22:08:41.460Z",
  "adaptiveContent": {
    "enabled": true
  },
  "ads": {
    "status": "pending",
    "submittable": true
  },
  "agentsContext": "excluded",
  "features": [
    {
      "id": "sites-adaptive-content",
      "plan": "basic",
      "frozen": true,
      "customizations": [
        "header-logo"
      ]
    }
  ],
  "urls": {
    "location": "https://example.com",
    "app": "https://example.com",
    "published": "https://example.com"
  }
}