Docs sites
Manage your published docs sites.
Was this helpful?
Manage your published docs sites.
Was this helpful?
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.
Unique identifier of the site
The type of the site
Title of the site
Custom hostname for the site, for e.g. docs.mycompany.com
^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?[.]){2,}[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$
Basename for the site. For e.g. api
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 enginesshare-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.Whether the site is live or not. If true, the site is accessible to the audience defined by the visibility setting.
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.The unique id of the organization
Identifier of the page results to fetch.
The number of results per page
Identifier of the space to filter the sites by
Filter sites by their title
Filter sites by their published status
OK
OK
The unique id of the organization
The type of the site, defaults to Basic
Title of the site
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 enginesshare-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.ID of spaces to be added to the site
Create a new space associated to the site
Site created
Site created
The unique id of the organization
The unique id of the site
The JSON schema that defines the attributes expected from a visitor of the Adaptive content site.
No visitor attributes schema found for the site.
Unexpected Error
The unique id of the organization
The unique id of the site
The site adaptive schema has been updated.
Bad Request
Unexpected Error
The unique id of the organization
The unique id of the site
List of template conditions generated based on the site visitor schema.
List of template conditions generated based on the site visitor schema.
Get the complete profile of a site in an organization to provide the published experience. It includes site, customization, structure, integration scripts etc.
The unique id of the organization
The unique id of the site
For sites published via share-links, the share key is useful to resolve published URLs.
OK
No matching site found
The unique id of the organization
The unique id of the site
Item successfully moved
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.
Invalid move position provided
No matching item found
Unexpected Error
The unique id of the organization
The unique id of the site
Identifier of the page results to fetch.
The number of results per page
OK
Title of the site
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 enginesshare-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.Basename for the site. For e.g. api
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.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.
ID of the site-section to be used as the default.
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.
Proxy URL for the site, for e.g. company.com/docs or www.company.com/developer/docs etc.
^([\w-]+\.)*[\w-]+\.[a-zA-Z]{2,}(\/[\w-]+)+$
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"
}
}
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"
}
}