René's URL Explorer Experiment


Title: ` tag. When set, it replaces the page title in the composed `` (`<tagTitle || title> | <section> | <site>`), while the page's visible heading and navigation title remain unchanged. Use this when the search result or browser tab should use a different title from the page itself.", "type": "string", "maxLength": 100 }, "pages": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/RevisionPageDocument" }, { "$ref": "#/components/schemas/RevisionPageLink" }, { "$ref": "#/components/schemas/RevisionPageComputed" } ] } }, "git": { "$ref": "#/components/schemas/GitSyncBlob" }, "layout": { "$ref": "#/components/schemas/RevisionPageLayoutOptions" }, "cover": { "$ref": "#/components/schemas/RevisionPageDocumentCover" }, "variables": { "$ref": "#/components/schemas/Variables" }, "hidden": { "type": "boolean", "description": "If true, the page is not displayed in the navigation, while still being accessible.", "default": false }, "noIndex": { "type": "boolean", "description": "If true, the page is not indexable in the search and ask features.", "default": false }, "noRobotsIndex": { "type": "boolean", "description": "If true, the page is not indexable by search engine robots.", "default": false }, "metaLinks": { "description": "Meta links associated with the page.", "$ref": "#/components/schemas/RevisionPageMetaLinks" }, "tags": { "type": "array", "description": "A list of all the tags added to this page", "items": { "$ref": "#/components/schemas/RevisionPageTag" } } }, "required": [ "kind", "type", "urls", "slug", "path", "pages", "layout", "tags" ] }, { "oneOf": [ { "type": "object", "description": "Defined when the page was generated by a computed content.", "properties": { "computed": { "$ref": "#/components/schemas/ComputedContentSourceDocument" }, "computedSeed": { "type": "string", "description": "Seed to use for the generation of IDs." } }, "required": [ "computed", "computedSeed" ] }, { "type": "object", "properties": { "documentId": { "type": "string", "description": "ID of the document with the page body. If undefined, the page is empty." } } } ] } ] }, "RevisionPageLink": { "allOf": [ { "$ref": "#/components/schemas/RevisionPageBase" }, { "type": "object", "properties": { "kind": { "type": "string", "deprecated": true, "enum": [ "link" ] }, "type": { "type": "string", "enum": [ "link" ] }, "target": { "$ref": "#/components/schemas/ContentRef" }, "href": { "type": "string" }, "hidden": { "type": "boolean", "description": "If true, the page is not displayed in the navigation, while still being accessible.", "default": false } }, "required": [ "kind", "type", "target" ] } ] }, "OpenAPISpecVisibility": { "type": "string", "description": "The visibility setting of the OpenAPI spec.\n* `private`: The spec is not publicly available.\n* `public`: The spec is available to anyone with a public link.\n", "enum": [ "private", "public" ] }, "ComputedContentDependencyOpenAPI": { "type": "object", "properties": { "ref": { "$ref": "#/components/schemas/ContentRefOpenAPI" }, "value": { "type": [ "object", "null" ], "description": "See `OpenAPI` schema component.", "properties": { "object": { "type": "string", "enum": [ "openapi-spec" ] }, "id": { "type": "string" }, "slug": { "type": "string" }, "lastVersion": { "type": "string" }, "visibility": { "$ref": "#/components/schemas/OpenAPISpecVisibility" } }, "required": [ "object", "id", "slug" ] } }, "required": [ "ref", "value" ] }, "ComputedContentSourceOpenAPIBase": { "type": "object", "description": "Generic parameters from an OpenAPI computed content source", "properties": { "type": { "type": "string", "enum": [ "builtin:openapi" ] }, "dependencies": { "type": "object", "required": [ "spec" ], "properties": { "spec": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "ref" ], "properties": { "ref": { "$ref": "#/components/schemas/ContentRefOpenAPI" } } }, { "$ref": "#/components/schemas/ComputedContentDependencyOpenAPI" } ] } } } }, "required": [ "type", "dependencies" ] }, "ComputedContentSourceRevisionOpenAPI": { "allOf": [ { "$ref": "#/components/schemas/ComputedContentSourceOpenAPIBase" }, { "type": "object", "description": "Parameters for an OpenAPI computed revision", "required": [ "props" ], "properties": { "props": { "type": "object", "properties": { "models": { "type": "boolean" }, "downloadLink": { "type": "boolean", "description": "Whether to show a link to download the OpenAPI spec." }, "grouping": { "type": "string", "enum": [ "by-tag", "by-operation" ], "description": "How GitBook will group generated pages. \"by-tag\" groups operations under their tag; \"by-operation\" creates a separate page per operation. Defaults to \"by-tag\" when absent." } }, "required": [ "models" ] } } } ] }, "TranslationRef": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "translation" ] }, "translation": { "type": "string", "description": "ID of the translation sync" } }, "required": [ "kind", "translation" ] }, "TranslationResult": { "type": "object", "description": "Result of a translation.", "properties": { "space": { "type": "string", "description": "ID of the space containing the result of the translation" }, "revision": { "type": "string", "description": "ID of the revision generated by the translation" }, "language": { "$ref": "#/components/schemas/TranslationLanguage" } }, "required": [ "space", "revision", "language" ] }, "ComputedContentDependencyTranslation": { "type": "object", "properties": { "ref": { "$ref": "#/components/schemas/TranslationRef" }, "value": { "oneOf": [ { "$ref": "#/components/schemas/TranslationResult" }, { "type": "null", "description": "Translation has not been run yet" } ] } }, "required": [ "ref", "value" ] }, "ComputedContentSourceRevisionTranslation": { "type": "object", "description": "Parameters for a translation computed content source", "properties": { "type": { "type": "string", "enum": [ "builtin:translation" ] }, "props": { "type": "object", "additionalProperties": false, "properties": {} }, "dependencies": { "type": "object", "required": [ "translation" ], "properties": { "translation": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "ref" ], "properties": { "ref": { "$ref": "#/components/schemas/TranslationRef" } } }, { "$ref": "#/components/schemas/ComputedContentDependencyTranslation" } ] } } } }, "required": [ "type", "props", "dependencies" ] }, "ComputedContentDependency": { "type": "object", "description": "Dependency for a computation, before its resolution.", "additionalProperties": false, "properties": { "ref": { "oneOf": [ { "$ref": "#/components/schemas/ContentRefSpace" }, { "$ref": "#/components/schemas/ContentRefOpenAPI" }, { "$ref": "#/components/schemas/TranslationRef" } ] } }, "required": [ "ref" ] }, "ComputedContentDependencySpace": { "type": "object", "properties": { "ref": { "$ref": "#/components/schemas/ContentRefSpace" }, "value": { "type": [ "object", "null" ], "description": "See `Space` schema component.", "properties": { "object": { "type": "string", "enum": [ "space" ] }, "id": { "type": "string" }, "revision": { "type": "string" } }, "required": [ "object", "id", "revision" ] } }, "required": [ "ref", "value" ] }, "ComputedContentDependencyResolved": { "description": "Dependency for a computation, with its resolved value.", "oneOf": [ { "$ref": "#/components/schemas/ComputedContentDependencySpace" }, { "$ref": "#/components/schemas/ComputedContentDependencyOpenAPI" }, { "$ref": "#/components/schemas/ComputedContentDependencyTranslation" } ] }, "ComputedContentSourceIntegration": { "type": "object", "description": "Parameters for a computed content managed by an integration", "properties": { "type": { "type": "string", "description": "Type of the computed source", "pattern": "^integration:[^:]+:[^:]+$", "x-typescript": "`integration:${string}:${string}`" }, "props": { "description": "Properties to be passed to the computation", "$ref": "#/components/schemas/PlainObject" }, "dependencies": { "type": "object", "description": "Dependencies the computation depends on.\nThe state of the dependencies will be passed to the computation.\nWhen the dependency's targets are updated, the computation will be updated.\n", "additionalProperties": { "anyOf": [ { "$ref": "#/components/schemas/ComputedContentDependency" }, { "$ref": "#/components/schemas/ComputedContentDependencyResolved" } ] } } }, "required": [ "type", "props" ] }, "ComputedContentSourceRevision": { "oneOf": [ { "$ref": "#/components/schemas/ComputedContentSourceRevisionOpenAPI" }, { "$ref": "#/components/schemas/ComputedContentSourceRevisionTranslation" }, { "$ref": "#/components/schemas/ComputedContentSourceIntegration" } ] }, "RevisionPageComputed": { "allOf": [ { "$ref": "#/components/schemas/RevisionPageBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "computed" ] }, "computed": { "$ref": "#/components/schemas/ComputedContentSourceRevision" } }, "required": [ "type", "computed" ] } ] }, "GitSyncBlob": { "type": "object", "properties": { "oid": { "type": "string", "description": "SHA for the blob" }, "path": { "type": "string", "description": "Path of the blob in the Git tree" } }, "required": [ "oid", "path" ] }, "RevisionPageLayoutOptionsWidth": { "type": "string", "description": "Width of the page.", "enum": [ "default", "wide" ] }, "RevisionPageLayoutOptionsCoverSize": { "type": "string", "description": "Size of the cover image.", "enum": [ "hero", "full", "background" ] }, "RevisionPageLayoutOptionsCoverMask": { "type": "string", "description": "Mask applied to the cover image.", "enum": [ "none", "radial" ] }, "RevisionPageLayoutOptions": { "type": "object", "properties": { "width": { "$ref": "#/components/schemas/RevisionPageLayoutOptionsWidth" }, "cover": { "type": "boolean", "description": "Should the cover be visible?" }, "coverSize": { "$ref": "#/components/schemas/RevisionPageLayoutOptionsCoverSize" }, "coverMask": { "$ref": "#/components/schemas/RevisionPageLayoutOptionsCoverMask" }, "title": { "type": "boolean", "description": "Should the title be visible?" }, "description": { "type": "boolean", "description": "Should the description be visible?" }, "tableOfContents": { "type": "boolean", "description": "Should the table of contents be visible?" }, "outline": { "type": "boolean", "description": "Should the outline be visible?" }, "pagination": { "type": "boolean", "description": "Should the pagination be visible?" }, "metadata": { "type": "boolean", "description": "Should the page metadata (last modified, author, etc.) be visible?" }, "tags": { "type": "boolean", "description": "Should the tags be visible on the page?" }, "actions": { "type": "boolean", "description": "Should the page actions be visible on the page?" }, "anchors": { "type": "boolean", "description": "Should the anchor links on headings and other linkable blocks be visible?" } }, "required": [ "width", "cover", "coverSize", "coverMask", "title", "description", "tableOfContents", "outline", "pagination", "metadata", "tags", "actions", "anchors" ] }, "RevisionPageDocumentCoverTextColor": { "type": "string", "enum": [ "black", "white" ] }, "RevisionPageDocumentCover": { "type": "object", "properties": { "ref": { "description": "Content reference pointing to the source image.", "oneOf": [ { "$ref": "#/components/schemas/ContentRefFile" }, { "$ref": "#/components/schemas/ContentRefURL" } ] }, "refDark": { "description": "Content reference pointing to the source image for dark mode.", "oneOf": [ { "$ref": "#/components/schemas/ContentRefFile" }, { "$ref": "#/components/schemas/ContentRefURL" } ] }, "textColor": { "description": "Text color to use on top of the cover image when in background mode.", "$ref": "#/components/schemas/RevisionPageDocumentCoverTextColor" }, "textColorDark": { "description": "Text color to use on top of the dark mode cover image when in background mode.", "$ref": "#/components/schemas/RevisionPageDocumentCoverTextColor" }, "yPos": { "description": "Vertical position of the cover image.", "type": "number", "default": 0 }, "height": { "description": "Height of the cover image in pixels.", "type": "number", "minimum": 10, "maximum": 700, "default": 240 } }, "required": [ "yPos" ] }, "VariableValue": { "anyOf": [ { "type": "string", "maxLength": 256 }, { "type": "number" }, { "type": "boolean" } ] }, "Variables": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/VariableValue" } }, "RevisionPageMetaLinkTarget": { "oneOf": [ { "$ref": "#/components/schemas/ContentRefPage" }, { "$ref": "#/components/schemas/ContentRefURL" } ] }, "RevisionPageMetaLinks": { "type": "object", "properties": { "canonical": { "$ref": "#/components/schemas/RevisionPageMetaLinkTarget" }, "alternates": { "type": "array", "items": { "$ref": "#/components/schemas/RevisionPageMetaLinkTarget" } } } }, "RevisionPageTag": { "type": "object", "description": "A reference to a tag with optional primary flag for page-level tags.", "properties": { "tag": { "$ref": "#/components/schemas/ContentRefTag" }, "primary": { "type": "boolean", "description": "Whether this is the primary tag for display in table of contents." } }, "required": [ "tag" ] }, "ComputedContentSourceDocumentOpenAPI": { "allOf": [ { "$ref": "#/components/schemas/ComputedContentSourceOpenAPIBase" }, { "type": "object", "description": "Parameters for an OpenAPI computed document", "required": [ "props" ], "properties": { "props": { "oneOf": [ { "type": "object", "required": [ "doc" ], "properties": { "doc": { "type": "string", "enum": [ "models" ] } } }, { "type": "object", "required": [ "doc", "page" ], "properties": { "doc": { "type": "string", "enum": [ "operations", "info" ] }, "page": { "type": "string", "minLength": 1 } } }, { "type": "object", "required": [ "doc", "page", "method" ], "properties": { "doc": { "type": "string", "enum": [ "operation" ] }, "page": { "type": "string", "minLength": 1 }, "method": { "type": "string", "enum": [ "get", "post", "put", "delete", "patch", "options", "head", "trace", "hook" ] }, "deprecated": { "type": "boolean" } } }, { "type": "object", "required": [ "doc", "page" ], "properties": { "doc": { "type": "string", "enum": [ "tag" ] }, "page": { "type": "string", "minLength": 1 } } } ] } } } ] }, "ComputedContentSourceDocumentTranslation": { "type": "object", "description": "Parameters for a document translation computed content source", "required": [ "type", "props", "dependencies" ], "properties": { "type": { "type": "string", "enum": [ "builtin:translation" ] }, "props": { "type": "object", "required": [ "space", "document" ], "properties": { "space": { "type": "string" }, "document": { "type": "string" } } }, "dependencies": { "type": "object", "required": [ "translation" ], "properties": { "translation": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "ref" ], "properties": { "ref": { "$ref": "#/components/schemas/TranslationRef" } } }, { "$ref": "#/components/schemas/ComputedContentDependencyTranslation" } ] } } } } }, "ComputedContentSourceDocument": { "oneOf": [ { "$ref": "#/components/schemas/ComputedContentSourceDocumentOpenAPI" }, { "$ref": "#/components/schemas/ComputedContentSourceDocumentTranslation" }, { "$ref": "#/components/schemas/ComputedContentSourceIntegration" } ] }, "RevisionPageGroup": { "allOf": [ { "$ref": "#/components/schemas/RevisionPageBase" }, { "type": "object", "properties": { "kind": { "type": "string", "deprecated": true, "enum": [ "group" ] }, "type": { "type": "string", "enum": [ "group" ] }, "slug": { "description": "Page's slug in its direct parent", "type": "string" }, "path": { "description": "Complete path to access the page in the revision.", "type": "string" }, "hidden": { "type": "boolean", "description": "If true, the page is not displayed in the navigation, while still being accessible.", "default": false }, "noIndex": { "type": "boolean", "description": "If true, the page is not indexable in the search and ask features.", "default": false }, "noRobotsIndex": { "type": "boolean", "description": "If true, the page is not indexable by search engine robots.", "default": false }, "pages": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/RevisionPageDocument" }, { "$ref": "#/components/schemas/RevisionPageLink" }, { "$ref": "#/components/schemas/RevisionPageComputed" } ] } } }, "required": [ "kind", "type", "slug", "path", "pages" ] } ] }, "RevisionPage": { "oneOf": [ { "$ref": "#/components/schemas/RevisionPageDocument" }, { "$ref": "#/components/schemas/RevisionPageGroup" }, { "$ref": "#/components/schemas/RevisionPageLink" }, { "$ref": "#/components/schemas/RevisionPageComputed" } ], "discriminator": { "propertyName": "type" } }, "RevisionFile": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "contentType": { "type": "string" }, "downloadURL": { "type": "string" }, "size": { "type": "number" }, "dimensions": { "type": "object", "description": "For images, it contains the dimensions of it.", "properties": { "width": { "type": "number" }, "height": { "type": "number" } }, "required": [ "width", "height" ] }, "git": { "$ref": "#/components/schemas/GitSyncBlob" } }, "required": [ "id", "name", "contentType", "downloadURL", "size" ] }, "RevisionReusableContent": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "git": { "$ref": "#/components/schemas/GitSyncBlob" } }, "required": [ "id", "title" ] }, { "oneOf": [ { "type": "object", "description": "Defined when the reusable content was generated by a computed content.", "properties": { "computed": { "$ref": "#/components/schemas/ComputedContentSourceDocument" }, "computedSeed": { "type": "string", "description": "Seed to use for the generation of IDs." } }, "required": [ "computed", "computedSeed" ] }, { "type": "object", "properties": { "document": { "type": "string", "description": "ID of the document with the content body. If undefined, the reusable content is empty." } } } ] } ] }, "RevisionTag": { "type": "object", "description": "A reusable tag that different types of content can be associated to (e.g. pages, update entries)", "properties": { "slug": { "type": "string", "description": "The slug identifier for the tag, immutable after creation." }, "label": { "type": "string", "description": "Display label for the tag. Can be renamed and differ from the slug." }, "kind": { "type": "string", "enum": [ "category" ], "description": "Categories organize tags and cannot be assigned to pages or blocks. Immutable after creation." }, "parent": { "type": "string", "description": "Slug of the parent tag or category. Omitted for root tags. Normal tags nest one level beneath another normal tag; categories nest up to three levels deep." }, "color": { "$ref": "#/components/schemas/DocumentTextColor" }, "emoji": { "description": "Emoji of the tag, if one has been set. A tag has an emoji or an icon, not both.", "$ref": "#/components/schemas/Emoji" }, "icon": { "description": "Icon of the tag, if one has been set. A tag has an emoji or an icon, not both.", "$ref": "#/components/schemas/Icon" } }, "required": [ "slug", "label", "color" ] }, "GitSyncCommit": { "type": "object", "properties": { "oid": { "type": "string", "description": "SHA for the commit" }, "message": { "type": "string", "description": "Message describing the purpose of the commit" }, "createdByGitBook": { "type": "boolean", "description": "If true, the Git commit was generated by an export from GitBook" }, "url": { "type": "string", "description": "URL of the commit in the GitSync provider" }, "ref": { "type": "string", "description": "Original name of the ref where the commit originated from" } }, "required": [ "oid", "message", "createdByGitBook" ] }, "RevisionBase": { "type": "object", "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"revision\"", "enum": [ "revision" ] }, "id": { "description": "Unique identifier for the revision", "type": "string" }, "parents": { "description": "IDs of the parent revisions", "type": "array", "items": { "type": "string" } }, "pages": { "type": "array", "items": { "$ref": "#/components/schemas/RevisionPage" } }, "files": { "type": "array", "items": { "$ref": "#/components/schemas/RevisionFile" } }, "reusableContents": { "type": "array", "items": { "$ref": "#/components/schemas/RevisionReusableContent" } }, "tags": { "type": "array", "description": "Tags and categories in hierarchy order: parents before children, sibling categories by manual position, then normal tags by manual position inside a parent and by label at the top level", "items": { "$ref": "#/components/schemas/RevisionTag" } }, "variables": { "$ref": "#/components/schemas/Variables" }, "createdAt": { "description": "When the revision was created.", "$ref": "#/components/schemas/Timestamp" }, "git": { "description": "Metadata about a potential associated git commit.", "$ref": "#/components/schemas/GitSyncCommit" }, "urls": { "type": "object", "properties": { "app": { "type": "string", "format": "uri", "description": "URL in the application for the revision" }, "published": { "type": "string", "description": "URL of the published version of the revision. Only defined when the space visibility is not \"private.\"", "format": "uri" }, "public": { "type": "string", "description": "URL of the public version of the revision. Only defined when the space visibility is \"public\".", "format": "uri" } }, "required": [ "app" ] } }, "required": [ "object", "id", "parents", "pages", "files", "reusableContents", "tags", "urls", "createdAt" ] }, "RevisionTypeEdits": { "allOf": [ { "$ref": "#/components/schemas/RevisionBase" }, { "type": "object", "properties": { "type": { "type": "string", "description": "Revision created by editing the content.", "enum": [ "edits" ] } }, "required": [ "type" ] } ] }, "ChangeRequestStatus": { "type": "string", "enum": [ "draft", "open", "archived", "merged" ] }, "ChangeRequestSubject": { "type": "string", "description": "Subject of the change request", "minLength": 0, "maxLength": 100 }, "ChangeRequestChangeCountsByType": { "type": "object", "description": "Counts of entities grouped by how they changed relative to the change request base.", "properties": { "added": { "type": "integer", "minimum": 0 }, "modified": { "type": "integer", "minimum": 0 }, "deleted": { "type": "integer", "minimum": 0 } }, "required": [ "added", "modified", "deleted" ] }, "ChangeRequestChangeCounts": { "type": "object", "description": "Exact semantic entity and page-document block counts for a change request at its current head and base revisions.", "properties": { "pages": { "$ref": "#/components/schemas/ChangeRequestChangeCountsByType" }, "library": { "$ref": "#/components/schemas/ChangeRequestChangeCountsByType" }, "blocks": { "description": "Nested user-visible page-document block counts. Absent when `blocksOmittedReason` is set.", "$ref": "#/components/schemas/ChangeRequestChangeCountsByType" }, "blocksOmittedReason": { "type": "string", "enum": [ "too-many-pages", "too-many-blocks", "timeout" ], "description": "Why `blocks` is absent: too many pages changed (`too-many-pages`), the changed pages hold too many blocks to compare within the counting budget (`too-many-blocks`; this is not a count of changed blocks), or counting ran out of time (`timeout`). Page and library counts are still exact." } }, "required": [ "pages", "library" ] }, "ChangeRequestLinkTitle": { "type": "string", "description": "Optional title to display for the link.", "maxLength": 128 }, "ChangeRequestLinkInput": { "type": "object", "description": "External link associated with a change request.", "properties": { "id": { "type": "string", "description": "The ID of an existing link, as served on the change request. Pass it back to update that link, or omit it to add a new one." }, "ref": { "$ref": "#/components/schemas/ContentRefURL" }, "title": { "$ref": "#/components/schemas/ChangeRequestLinkTitle" } }, "required": [ "ref" ] }, "ChangeRequestLinkExpanded": { "description": "External ticket data resolved for this link by a configured connector.", "oneOf": [ { "type": "object", "description": "An external ticket linked to the change request.", "properties": { "kind": { "type": "string", "enum": [ "external-ticket" ] }, "provider": { "type": "string", "enum": [ "jira", "linear" ] }, "state": { "type": "string", "enum": [ "connected" ] }, "key": { "type": "string", "description": "The ticket's provider-specific key." }, "url": { "type": "string", "format": "uri", "description": "URL to open the ticket." }, "status": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "summary": { "type": "string", "description": "The ticket's summary." } }, "required": [ "kind", "provider", "state", "key", "url", "status", "summary" ] }, { "type": "object", "description": "An external ticket whose current data could not be loaded.", "properties": { "kind": { "type": "string", "enum": [ "external-ticket" ] }, "provider": { "type": "string", "enum": [ "jira", "linear" ] }, "state": { "type": "string", "enum": [ "error" ] } }, "required": [ "kind", "provider", "state" ] } ] }, "ChangeRequestLink": { "allOf": [ { "$ref": "#/components/schemas/ChangeRequestLinkInput" }, { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the link." }, "isSyncing": { "type": "boolean", "readOnly": true, "description": "Whether this link owns synchronization with the external issue. Other links are references only." }, "expanded": { "$ref": "#/components/schemas/ChangeRequestLinkExpanded", "readOnly": true } }, "required": [ "id", "isSyncing" ] } ] }, "ChangeRequestLinks": { "type": "array", "description": "External links associated with the change request.", "items": { "$ref": "#/components/schemas/ChangeRequestLink" }, "maxItems": 10 }, "ChangeRequest": { "type": "object", "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"change-request\"", "enum": [ "change-request" ] }, "id": { "type": "string", "description": "Unique identifier for the change request" }, "number": { "type": "number", "description": "Incremental identifier of the change request" }, "status": { "$ref": "#/components/schemas/ChangeRequestStatus" }, "subject": { "$ref": "#/components/schemas/ChangeRequestSubject" }, "description": { "$ref": "#/components/schemas/JSONDocument" }, "createdBy": { "$ref": "#/components/schemas/User" }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "updatedAt": { "$ref": "#/components/schemas/Timestamp" }, "mergedBy": { "$ref": "#/components/schemas/User", "description": "User who merged the change request. Only present when the change request has been merged." }, "mergedAt": { "$ref": "#/components/schemas/Timestamp", "description": "Date at which the change request was merged. Only present when the change request has been merged." }, "space": { "type": "string", "description": "ID of the space in which the change request was created." }, "revision": { "type": "string", "description": "ID of the active revision in the change request." }, "revisionInitial": { "type": "string", "description": "ID of the initial revision in the space from which the change request was created." }, "revisionMergedAncestor": { "type": "string", "description": "ID of the latest revision when updating from main space content." }, "revisionMerged": { "type": "string", "description": "When merged, ID of the revision resulting from the merge." }, "comments": { "type": "number", "description": "Count of opened comments on the change request." }, "changeCounts": { "description": "Change counts computed when the change request gets a new revision, for its current head and base revisions. Merged change requests keep their last computed counts. Absent until computed.", "$ref": "#/components/schemas/ChangeRequestChangeCounts" }, "siteTopic": { "type": "object", "description": "Site topic the change request was created from, when it came from one.", "properties": { "site": { "type": "string", "description": "ID of the site associated with the change request." }, "topic": { "type": "string", "description": "ID of the site topic associated with the change request." }, "finding": { "type": "string", "deprecated": true, "description": "ID of the site finding the change request fixes. Use `siteFindings` instead: a change request can fix a finding without belonging to a topic, and this field is absent in that case." } }, "required": [ "site", "topic" ] }, "siteFinding": { "deprecated": true, "type": "object", "description": "First linked site finding. Use `siteFindings` to read all linked findings.", "properties": { "site": { "type": "string", "description": "ID of the site the finding belongs to." }, "finding": { "type": "string", "description": "ID of the site finding the change request fixes." } }, "required": [ "site", "finding" ] }, "siteFindings": { "type": "array", "description": "Site findings linked to the change request, in link order. Absent when none are linked. Merging resolves findings once every linked change request is merged, except outbound broken links, which are resolved by the outbound checker.", "items": { "type": "object", "properties": { "site": { "type": "string", "description": "ID of the site the finding belongs to." }, "finding": { "type": "string", "description": "ID of the site finding the change request fixes." } }, "required": [ "site", "finding" ] } }, "styleguide": { "type": "object", "description": "Style guide check that opened the change request, when it came from one. A check can be run again on the change request already open on a space, rather than opening a second one, so several checks can share a change request.\n", "properties": { "site": { "type": "string", "description": "ID of the site the style guide belongs to." }, "run": { "type": "string", "description": "ID of the style guide check run that opened the change request." }, "changedPages": { "type": "number", "description": "Number of pages the check changed, recorded when it finished. Absent while it is still running, or when it never completed.\n" }, "checkedAt": { "$ref": "#/components/schemas/Timestamp", "description": "When the most recent style guide check on the change request finished. Later edits from anyone else do not move it. Absent while the first one is still running.\n" } }, "required": [ "site", "run" ] }, "outdated": { "type": "boolean", "description": "If true, the change request is not up-to-date with latest changes in the main content." }, "imports": { "description": "Import runs targeting this change request, still running or ended recently, most recent first. Only returned when fetching a single change request.\n", "type": "array", "items": { "$ref": "#/components/schemas/ContentImportRun" } }, "links": { "$ref": "#/components/schemas/ChangeRequestLinks" }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "app": { "type": "string", "description": "URL of the space in the application", "format": "uri" }, "location": { "type": "string", "description": "URL of the user in the API", "format": "uri" } }, "required": [ "app", "location" ] } }, "required": [ "object", "id", "number", "status", "subject", "createdBy", "createdAt", "updatedAt", "space", "revision", "revisionInitial", "comments", "outdated", "urls" ] }, "SiteChangeRequestMemberStatus": { "type": "string", "description": "Whether the member is part of the change request, or a tombstone kept so that a member removed and later re-added keeps its identity, comments and history.", "enum": [ "active", "removed" ] }, "SiteChangeRequestMember": { "type": "object", "description": "State shared by every resource changed by a site change request. Each resource is versioned independently; the change request reviews and merges them as one.", "properties": { "object": { "type": "string", "enum": [ "site-change-request-member" ] }, "id": { "type": "string", "description": "Unique identifier for the member" }, "status": { "$ref": "#/components/schemas/SiteChangeRequestMemberStatus" }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "updatedAt": { "$ref": "#/components/schemas/Timestamp" } }, "required": [ "object", "id", "status", "createdAt", "updatedAt" ] }, "SiteChangeRequestContentMember": { "allOf": [ { "$ref": "#/components/schemas/SiteChangeRequestMember" }, { "type": "object", "description": "Content of one space changed by a site change request.", "properties": { "space": { "type": "string", "description": "ID of the space whose content changes." }, "baseRevisionId": { "type": "string", "description": "ID of the revision in the space's main content this member diverged from." }, "headRevisionId": { "type": "string", "description": "ID of the revision currently proposed for the space." }, "mergedRevisionId": { "type": "string", "description": "ID of the revision produced in the space's main content when this member was merged. Only present once the change request has been merged." } }, "required": [ "space", "baseRevisionId", "headRevisionId" ] } ] }, "SiteSectionTitle": { "type": "string", "description": "Title of the site section", "minLength": 2, "maxLength": 128 }, "LocalizedString128": { "type": "object", "description": "Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only.", "additionalProperties": { "type": "string", "maxLength": 128 }, "propertyNames": { "$ref": "#/components/schemas/TranslationLanguage" } }, "SiteSectionDescription": { "type": "string", "description": "Description of the site section", "minLength": 0, "maxLength": 256 }, "LocalizedString256": { "type": "object", "description": "Localized string value with a 256 character limit, keyed by locale. Contains overrides for non-default languages only.", "additionalProperties": { "type": "string", "maxLength": 256 }, "propertyNames": { "$ref": "#/components/schemas/TranslationLanguage" } }, "SiteSectionPath": { "type": "string", "description": "Path to the section on the site", "minLength": 1, "maxLength": 100 }, "SiteSpacePath": { "type": "string", "description": "Path to the space on the site", "minLength": 1, "maxLength": 100 }, "SiteSpace": { "type": "object", "properties": { "object": { "type": "string", "description": "The object type, which is always \"site-space\"", "enum": [ "site-space" ] }, "id": { "type": "string", "description": "Unique identifier of the site-space" }, "path": { "$ref": "#/components/schemas/SiteSpacePath" }, "section": { "type": "string", "description": "ID of the section the space belongs to in the site" }, "space": { "$ref": "#/components/schemas/Space" }, "title": { "type": "string" }, "localizedTitle": { "$ref": "#/components/schemas/LocalizedString128" }, "default": { "type": "boolean", "description": "Whether this is the default space for the site" }, "condition": { "description": "Conditional expression used to evaluate whether the site space should be shown to the site's visitor.", "$ref": "#/components/schemas/Expression" }, "pageId": { "oneOf": [ { "type": "string" }, { "type": "null" } ], "description": "Custom home page within the space, rendered at the site space's path root instead of the space's default landing page." }, "draft": { "type": "boolean", "description": "Whether the site space is draft and not live." }, "hasAdvancedCustomizationFeature": { "type": "boolean", "description": "Whether the space has advanced customization feature enabled" }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "published": { "type": "string", "description": "URL of the published version of the site-space. Only defined when site is published.", "format": "uri" } } }, "hidden": { "type": "boolean", "description": "Whether the site space is hidden. If true, the site space will not be shown in the site's navigation." } }, "required": [ "object", "id", "space", "title", "path", "draft", "urls" ] }, "SiteSection": { "type": "object", "properties": { "object": { "type": "string", "description": "The object type, which is always \"site-section\"", "enum": [ "site-section" ] }, "id": { "type": "string", "description": "Unique identifier of the site section" }, "title": { "$ref": "#/components/schemas/SiteSectionTitle" }, "localizedTitle": { "$ref": "#/components/schemas/LocalizedString128" }, "description": { "$ref": "#/components/schemas/SiteSectionDescription" }, "localizedDescription": { "$ref": "#/components/schemas/LocalizedString256" }, "default": { "type": "boolean", "description": "Whether this is the default section for the site" }, "draft": { "type": "boolean", "description": "Whether the site section is draft and not live." }, "hidden": { "type": "boolean", "description": "Whether the site section is hidden. It is hidden when all of its site spaces are hidden, in which case it is not shown in the site's navigation." }, "path": { "$ref": "#/components/schemas/SiteSectionPath" }, "condition": { "description": "Conditional expression used to evaluate whether the site section should be shown to the site's visitor.", "$ref": "#/components/schemas/Expression" }, "sectionGroup": { "type": "string", "description": "ID of the section group the section belongs to in the site" }, "siteSpaces": { "type": "array", "items": { "$ref": "#/components/schemas/SiteSpace" } }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "published": { "type": "string", "description": "URL of the published version of the site section. Only defined when site is published.", "format": "uri" } } }, "icon": { "$ref": "#/components/schemas/Icon" } }, "required": [ "object", "id", "title", "path", "draft", "siteSpaces", "urls" ] }, "SiteSectionGroupTitle": { "type": "string", "description": "Title of the site section group", "minLength": 1, "maxLength": 100 }, "SiteSectionGroup": { "type": "object", "properties": { "object": { "type": "string", "description": "The object type, which is always \"site-section-group\"", "enum": [ "site-section-group" ] }, "id": { "type": "string", "description": "Unique identifier of the site section group" }, "title": { "$ref": "#/components/schemas/SiteSectionGroupTitle" }, "localizedTitle": { "$ref": "#/components/schemas/LocalizedString128" }, "sections": { "type": "array", "deprecated": true, "description": "List of site section ids that are members of the group. Use `children` instead.", "items": { "$ref": "#/components/schemas/SiteSection" } }, "condition": { "description": "Conditional expression used to evaluate whether the site section group should be shown to the site's visitor.", "$ref": "#/components/schemas/Expression" }, "sectionGroup": { "type": "string", "description": "ID of the parent section group this group belongs to" }, "draft": { "type": "boolean", "description": "Whether the site section group is draft and not live." }, "children": { "type": "array", "description": "List of all child sections, groups, and external links nested under this group", "items": { "oneOf": [ { "$ref": "#/components/schemas/SiteSection" }, { "$ref": "#/components/schemas/SiteSectionGroup" }, { "$ref": "#/components/schemas/SiteExternalLink" } ] } }, "icon": { "$ref": "#/components/schemas/Icon" } }, "required": [ "object", "id", "title", "draft", "sections", "children" ] }, "SiteExternalLink": { "type": "object", "properties": { "object": { "type": "string", "description": "The object type, which is always \"site-external-link\"", "enum": [ "site-external-link" ] }, "id": { "type": "string", "description": "Unique identifier of the external link" }, "title": { "$ref": "#/components/schemas/SiteSectionTitle" }, "localizedTitle": { "$ref": "#/components/schemas/LocalizedString128" }, "description": { "$ref": "#/components/schemas/SiteSectionDescription" }, "localizedDescription": { "$ref": "#/components/schemas/LocalizedString256" }, "icon": { "$ref": "#/components/schemas/Icon" }, "url": { "$ref": "#/components/schemas/URL", "description": "Absolute HTTP or HTTPS URL opened by the external link" }, "sectionGroup": { "type": "string", "description": "ID of the section group the external link belongs to. Omitted for a root link." }, "draft": { "type": "boolean", "description": "Whether the external link is draft and not live" }, "condition": { "description": "Conditional expression used to evaluate whether the external link should be shown to the site's visitor", "$ref": "#/components/schemas/Expression" } }, "required": [ "object", "id", "title", "url", "draft" ] }, "SiteStructure": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": [ "sections" ] }, "structure": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/SiteSection" }, { "$ref": "#/components/schemas/SiteSectionGroup" }, { "$ref": "#/components/schemas/SiteExternalLink" } ] } } }, "required": [ "type", "structure" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "siteSpaces" ] }, "structure": { "type": "array", "items": { "$ref": "#/components/schemas/SiteSpace" } } }, "required": [ "type", "structure" ] } ] }, "SiteChangeRequestStructureMember": { "allOf": [ { "$ref": "#/components/schemas/SiteChangeRequestMember" }, { "type": "object", "description": "Structure of the site changed by a site change request: its space membership, sections, ordering and paths.", "properties": { "base": { "description": "The live site structure this member diverged from.", "$ref": "#/components/schemas/SiteStructure" }, "head": { "description": "The site structure currently proposed.", "$ref": "#/components/schemas/SiteStructure" } } } ] }, "SiteTitle": { "type": "string", "description": "Title of the site", "minLength": 2, "maxLength": 128 }, "CustomizationTheme": { "type": "string", "description": "The theme to apply to the site. Supercedes the old header preset themes.\n- `clean`: Modern theme featuring translucency and minimally-styled elements.\n- `muted`: Sophisticated theme with decreased contrast between elements.\n- `bold`: High-impact theme with prominent colors and strong contrasts.\n- `gradient`: Trendy theme featuring colorful gradients and splashes of color.\n", "enum": [ "clean", "muted", "bold", "gradient" ] }, "Color": { "type": "string", "pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$" }, "CustomizationThemedColor": { "type": "object", "properties": { "light": { "$ref": "#/components/schemas/Color" }, "dark": { "$ref": "#/components/schemas/Color" } }, "required": [ "light", "dark" ] }, "CustomizationTint": { "type": "object", "properties": { "color": { "$ref": "#/components/schemas/CustomizationThemedColor" } }, "required": [ "color" ] }, "CustomizationCorners": { "type": "string", "enum": [ "straight", "rounded", "circular" ] }, "CustomizationDepth": { "type": "string", "description": "The degree of visual depth (through shadows, gradients and elevation effects) of elements on the site.\n- `subtle`: Subtle shadows and minimal elevation.\n- `flat`: Flat elements, no shadows and no elevation.\n", "enum": [ "subtle", "flat" ] }, "CustomizationLinksStyle": { "type": "string", "description": "The style used for regular links in the main content, header and footer. Sidebar items are styled separately.\n- `default`: Links are colored in the primary color and feature an underline in the same color.\n- `accent`: Links are colored the same as body text and feature an underline in the primary color.\n", "enum": [ "default", "accent" ] }, "CustomizationDefaultFont": { "type": "string", "enum": [ "ABCFavorit", "Inter", "Roboto", "RobotoSlab", "OpenSans", "SourceSansPro", "Lato", "Ubuntu", "Raleway", "Merriweather", "Overpass", "NotoSans", "IBMPlexSerif", "Poppins", "FiraSans" ] }, "FontFamily": { "type": "string", "description": "The human-readable font-family name used in CSS (e.g., \"Open Sans\", \"Playfair Display\").", "minLength": 1, "maxLength": 50 }, "FontWeight": { "type": "integer", "description": "Numeric representation of the font weight (400=regular, 500=medium, 700=bold, 900=black).", "minimum": 1, "maximum": 1000 }, "FontSource": { "type": "object", "description": "A font file referenced within a font-face declaration, specifying the file's location and format.", "properties": { "url": { "description": "The absolute or relative URL pointing to the font file.", "$ref": "#/components/schemas/URL" }, "format": { "type": "string", "description": "The format of the font file. Prefer 'woff2' for modern browsers.", "enum": [ "woff2", "woff" ] } }, "required": [ "url" ] }, "FontFace": { "type": "object", "description": "A single font-face declaration specifying the weight and source files for a particular variation of the font.", "properties": { "weight": { "$ref": "#/components/schemas/FontWeight" }, "sources": { "type": "array", "description": "Font source files provided in supported formats (e.g., woff2, woff).", "items": { "$ref": "#/components/schemas/FontSource" }, "minItems": 1 } }, "required": [ "weight", "sources" ] }, "CustomizationFontDefinitionInput": { "type": "object", "description": "Defines a font family along with its various font-face declarations for use in CSS '@font-face' rules.", "properties": { "id": { "type": "string", "description": "A globally unique identifier for the font definition." }, "custom": { "type": "boolean", "description": "Whether the font is a custom font. If false, this font is provided by GitBook." }, "fontFamily": { "$ref": "#/components/schemas/FontFamily" }, "fontFaces": { "type": "array", "description": "A list of font-face definitions, specifying variations such as weight and style.", "items": { "$ref": "#/components/schemas/FontFace" }, "minItems": 1 } }, "required": [ "id", "custom", "fontFamily", "fontFaces" ] }, "CustomizationFont": { "oneOf": [ { "$ref": "#/components/schemas/CustomizationDefaultFont" }, { "$ref": "#/components/schemas/CustomizationFontDefinitionInput" } ] }, "CustomizationHeadingFont": { "description": "Font used for headings. `null` means headings use the main font (`styling.font`).", "oneOf": [ { "$ref": "#/components/schemas/CustomizationDefaultFont" }, { "$ref": "#/components/schemas/CustomizationFontDefinitionInput" }, { "type": "null" } ] }, "CustomizationDefaultMonospaceFont": { "type": "string", "enum": [ "FiraCode", "IBMPlexMono", "JetBrainsMono", "SourceCodePro", "RobotoMono", "SpaceMono", "DMMono", "Inconsolata" ] }, "CustomizationMonospaceFont": { "oneOf": [ { "$ref": "#/components/schemas/CustomizationDefaultMonospaceFont" }, { "$ref": "#/components/schemas/CustomizationFontDefinitionInput" } ] }, "CustomizationBackground": { "type": "string", "enum": [ "plain", "match" ], "deprecated": true, "description": "The background style has been deprecated and will be removed in a future release. Use the `tint` settings instead." }, "CustomizationIconsStyle": { "type": "string", "enum": [ "regular", "solid", "duotone", "light", "thin" ] }, "CustomizationCodeTheme": { "type": "string", "enum": [ "default-light", "default-dark", "monochrome-light", "monochrome-dark", "andromeeda", "aurora-x", "ayu-dark", "catppuccin-frappe", "catppuccin-latte", "catppuccin-macchiato", "catppuccin-mocha", "dark-plus", "dracula", "dracula-soft", "everforest-dark", "everforest-light", "github-dark", "github-dark-default", "github-dark-dimmed", "github-dark-high-contrast", "github-light", "github-light-default", "github-light-high-contrast", "gruvbox-dark-hard", "gruvbox-dark-medium", "gruvbox-dark-soft", "gruvbox-light-hard", "gruvbox-light-medium", "gruvbox-light-soft", "houston", "kanagawa-dragon", "kanagawa-lotus", "kanagawa-wave", "laserwave", "light-plus", "material-theme", "material-theme-darker", "material-theme-lighter", "material-theme-ocean", "material-theme-palenight", "min-dark", "min-light", "monokai", "night-owl", "nord", "one-dark-pro", "one-light", "plastic", "poimandres", "red", "rose-pine", "rose-pine-dawn", "rose-pine-moon", "slack-dark", "slack-ochin", "snazzy-light", "solarized-dark", "solarized-light", "synthwave-84", "tokyo-night", "vesper", "vitesse-black", "vitesse-dark", "vitesse-light" ] }, "CustomizationThemedCodeTheme": { "type": "object", "properties": { "light": { "$ref": "#/components/schemas/CustomizationCodeTheme" }, "dark": { "$ref": "#/components/schemas/CustomizationCodeTheme" } }, "required": [ "light", "dark" ] }, "CustomizationSidebarBackgroundStyle": { "type": "string", "description": "- `default`: No background, content sits directly against sidebar edge.\n- `filled`: Muted background color that extends to sidebar edges.\n", "enum": [ "default", "filled" ] }, "CustomizationSidebarListStyle": { "type": "string", "description": "- `default`: Simple list items without special styling, groups are inset with a line.\n- `pill`: Rounded capsule shape around selected/active items.\n- `line`: Continuous line next to all items, with colored line part for selected/active items.\n", "enum": [ "default", "pill", "line" ] }, "CustomizationSearchStyle": { "type": "string", "description": "The style of the search button.\n- `prominent`: large search bar in the middle of the header, with less room for other header items,\n- `subtle`: small search bar in the corner of the header, with more room for other header items.\n", "enum": [ "prominent", "subtle" ] }, "CustomizationLocale": { "type": "string", "description": "Language for the UI element", "deprecated": true, "enum": [ "en", "fr", "es", "zh", "ja", "de", "nl", "no", "pt-br", "ru" ] }, "CustomizationThemedURL": { "type": "object", "properties": { "light": { "$ref": "#/components/schemas/URL" }, "dark": { "$ref": "#/components/schemas/URL" } }, "required": [ "light", "dark" ] }, "CustomizationFavicon": { "oneOf": [ { "type": "object", "properties": { "icon": { "$ref": "#/components/schemas/CustomizationThemedURL" } }, "required": [ "icon" ] }, { "type": "object", "properties": { "emoji": { "$ref": "#/components/schemas/Emoji" } }, "required": [ "emoji" ] }, { "type": "object", "properties": {}, "additionalProperties": false } ] }, "CustomizationHeaderPreset": { "type": "string", "deprecated": true, "description": "The header preset to use for the site. This is a legacy setting and the site styling theme should be used instead.", "enum": [ "default", "bold", "contrast", "custom", "none" ] }, "LocalizedString": { "type": "object", "description": "Localized string value, keyed by locale. Contains overrides for non-default languages only.", "propertyNames": { "$ref": "#/components/schemas/TranslationLanguage" }, "additionalProperties": { "type": "string" } }, "CustomizationContentLinkTitle": { "type": "string", "maxLength": 64 }, "LocalizedString64": { "type": "object", "description": "Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only.", "additionalProperties": { "type": "string", "maxLength": 64 }, "propertyNames": { "$ref": "#/components/schemas/TranslationLanguage" } }, "CustomizationContentLink": { "type": "object", "properties": { "title": { "$ref": "#/components/schemas/CustomizationContentLinkTitle" }, "localizedTitle": { "description": "Localized overrides for the link title, keyed by locale.", "$ref": "#/components/schemas/LocalizedString64" }, "to": { "$ref": "#/components/schemas/ContentRef" } }, "required": [ "title", "to" ] }, "CustomizationHeaderItem": { "type": "object", "properties": { "title": { "type": "string" }, "localizedTitle": { "description": "Localized overrides for the header item title, keyed by locale.", "$ref": "#/components/schemas/LocalizedString" }, "style": { "type": "string", "enum": [ "link", "button-primary", "button-secondary" ] }, "to": { "oneOf": [ { "$ref": "#/components/schemas/ContentRef" }, { "type": "null" } ] }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/CustomizationContentLink" } }, "condition": { "description": "Conditional expression used to evaluate whether the header item should be shown to the site's visitor.", "$ref": "#/components/schemas/Expression" } }, "required": [ "title", "links", "to" ] }, "CustomizationFooterGroup": { "type": "object", "properties": { "title": { "type": "string" }, "localizedTitle": { "description": "Localized overrides for the footer group title, keyed by locale.", "$ref": "#/components/schemas/LocalizedString" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/CustomizationContentLink" } } }, "required": [ "title", "links" ] }, "CustomizationAnnouncementMessage": { "description": "The text content of the announcement.", "type": "string", "minLength": 2, "maxLength": 128 }, "CustomizationAnnouncement": { "type": "object", "properties": { "enabled": { "description": "Whether to show the site's announcement.", "type": "boolean" }, "message": { "$ref": "#/components/schemas/CustomizationAnnouncementMessage" }, "localizedMessage": { "description": "Localized overrides for the announcement message, keyed by locale.", "$ref": "#/components/schemas/LocalizedString128" }, "link": { "description": "The content or URL the announcement links to when clicked.", "$ref": "#/components/schemas/CustomizationContentLink" }, "style": { "description": "The style of the announcement. Used to style the banner with the right semantic color and enable/disable features like hiding the banner.", "type": "string", "enum": [ "info", "warning", "danger", "success" ] } }, "required": [ "enabled", "message", "style" ] }, "CustomizationDefaultThemeMode": { "type": "string", "enum": [ "light", "dark", "system" ] }, "CustomizationAIMode": { "type": "string", "enum": [ "none", "search", "assistant" ] }, "CustomizationAIGreeting": { "type": "string", "description": "Initial greeting displayed by the AI Assistant when a visitor starts a conversation.", "maxLength": 256 }, "CustomizationSuggestedQuestion": { "type": "string", "minLength": 3, "maxLength": 64 }, "CustomizationSuggestedQuestions": { "type": "array", "description": "Suggested questions to display at the start of the chosen AI mode.", "items": { "$ref": "#/components/schemas/CustomizationSuggestedQuestion" }, "maxItems": 5 }, "CustomizationAIInstructions": { "type": "string", "description": "Additional instructions for the AI Assistant, injected after the base system prompt. Use them to adjust tone of voice and contribute site-specific knowledge. These instructions refine, but never override, the assistant's built-in guardrails. Only available to site admins and never exposed on the published site.", "maxLength": 10000 }, "CustomizationPageActionType": { "type": "string", "description": "Type of a built-in page action that can be displayed in the page actions menu of a published page.", "enum": [ "assistant", "external-ai", "markdown", "mcp", "git", "pdf" ] }, "CustomizationPageActionConditions": { "type": "object", "description": "Conditions restricting page actions to the visitors matching them, keyed by page action type.\nA page action without a condition is shown to every visitor. Only enabled page actions can have\na condition, and the `assistant` action cannot have one.\n", "propertyNames": { "$ref": "#/components/schemas/CustomizationPageActionType" }, "additionalProperties": { "$ref": "#/components/schemas/Expression" } }, "SiteExternalLinksTarget": { "type": "string", "description": "How external links should open when clicked.\n- `self`: External links open in the current tab.\n- `blank`: External links open in a new browser tab.\n", "enum": [ "self", "blank" ] }, "SiteSocialAccountPlatform": { "description": "The platform of the social handle.", "type": "string", "enum": [ "twitter", "instagram", "facebook", "linkedin", "github", "discord", "slack", "youtube", "tiktok", "reddit", "bluesky", "mastodon", "threads", "medium" ] }, "SiteSocialAccountHandle": { "description": "A handle on a social platform, without prefixes like the @ symbol.", "type": "string", "minLength": 1, "maxLength": 128 }, "SiteSocialAccount": { "type": "object", "properties": { "platform": { "$ref": "#/components/schemas/SiteSocialAccountPlatform" }, "handle": { "$ref": "#/components/schemas/SiteSocialAccountHandle" }, "display": { "type": "object", "properties": { "footer": { "type": "boolean", "default": true }, "header": { "type": "boolean", "default": false } }, "required": [ "footer", "header" ] } }, "required": [ "platform", "handle", "display" ] }, "SiteSocialAccounts": { "type": "array", "description": "The social accounts of the site.", "items": { "$ref": "#/components/schemas/SiteSocialAccount" }, "maxItems": 10 }, "SiteCustomizationSettingsBase": { "type": "object", "properties": { "title": { "description": "Title to use for the published site. If not defined, it'll fallback to the default content title.", "$ref": "#/components/schemas/SiteTitle" }, "localizedTitle": { "description": "Localized titles for the site, keyed by locale. If not defined, the localized title will not be changed.", "$ref": "#/components/schemas/LocalizedString128" }, "styling": { "type": "object", "properties": { "theme": { "$ref": "#/components/schemas/CustomizationTheme" }, "primaryColor": { "$ref": "#/components/schemas/CustomizationThemedColor" }, "secondaryColor": { "description": "Secondary brand color, used for secondary buttons and for content colored with `$secondary`. When not set, these elements use the neutral colors of the site.", "$ref": "#/components/schemas/CustomizationThemedColor" }, "tint": { "$ref": "#/components/schemas/CustomizationTint" }, "infoColor": { "$ref": "#/components/schemas/CustomizationThemedColor" }, "successColor": { "$ref": "#/components/schemas/CustomizationThemedColor" }, "warningColor": { "$ref": "#/components/schemas/CustomizationThemedColor" }, "dangerColor": { "$ref": "#/components/schemas/CustomizationThemedColor" }, "corners": { "$ref": "#/components/schemas/CustomizationCorners" }, "depth": { "$ref": "#/components/schemas/CustomizationDepth" }, "links": { "$ref": "#/components/schemas/CustomizationLinksStyle" }, "font": { "$ref": "#/components/schemas/CustomizationFont" }, "headingFont": { "$ref": "#/components/schemas/CustomizationHeadingFont" }, "monospaceFont": { "$ref": "#/components/schemas/CustomizationMonospaceFont" }, "background": { "deprecated": true, "$ref": "#/components/schemas/CustomizationBackground" }, "icons": { "$ref": "#/components/schemas/CustomizationIconsStyle" }, "codeTheme": { "type": "object", "properties": { "default": { "$ref": "#/components/schemas/CustomizationThemedCodeTheme" }, "openapi": { "$ref": "#/components/schemas/CustomizationThemedCodeTheme" } }, "required": [ "default", "openapi" ] }, "sidebar": { "type": "object", "properties": { "background": { "$ref": "#/components/schemas/CustomizationSidebarBackgroundStyle" }, "list": { "$ref": "#/components/schemas/CustomizationSidebarListStyle" } }, "required": [ "background", "list" ] }, "search": { "$ref": "#/components/schemas/CustomizationSearchStyle" } }, "required": [ "theme", "primaryColor", "infoColor", "successColor", "warningColor", "dangerColor", "corners", "depth", "links", "font", "monospaceFont", "codeTheme", "background", "icons", "sidebar", "search" ] }, "internationalization": { "type": "object", "deprecated": true, "properties": { "locale": { "$ref": "#/components/schemas/CustomizationLocale" } }, "required": [ "locale" ] }, "favicon": { "$ref": "#/components/schemas/CustomizationFavicon" }, "header": { "type": "object", "properties": { "preset": { "$ref": "#/components/schemas/CustomizationHeaderPreset" }, "logo": { "$ref": "#/components/schemas/CustomizationThemedURL" }, "primaryLink": { "description": "Destination to open when visitors click the site title/logo in the header.", "$ref": "#/components/schemas/ContentRef" }, "backgroundColor": { "deprecated": true, "description": "Color of the background in the header. This value is now deprecated in favour of the new theming colors.", "$ref": "#/components/schemas/CustomizationThemedColor" }, "linkColor": { "deprecated": true, "description": "Color of the links in the header. This value is now deprecated and will be phased out in favour of the new theming colors.", "$ref": "#/components/schemas/CustomizationThemedColor" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/CustomizationHeaderItem" } } }, "required": [ "preset", "links" ] }, "footer": { "type": "object", "properties": { "logo": { "$ref": "#/components/schemas/CustomizationThemedURL" }, "groups": { "type": "array", "items": { "$ref": "#/components/schemas/CustomizationFooterGroup" } }, "copyright": { "type": "string", "maxLength": 512 } }, "required": [ "groups" ] }, "announcement": { "$ref": "#/components/schemas/CustomizationAnnouncement" }, "themes": { "description": "Customization options for the dark/light theme modes.\n", "type": "object", "properties": { "default": { "$ref": "#/components/schemas/CustomizationDefaultThemeMode" }, "toggeable": { "description": "Should the reader be able to switch between dark and light mode", "type": "boolean" } }, "required": [ "default", "toggeable" ] }, "feedback": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "If true, feedback gathering is enabled" } }, "required": [ "enabled" ] }, "ai": { "type": "object", "properties": { "mode": { "$ref": "#/components/schemas/CustomizationAIMode" }, "greeting": { "$ref": "#/components/schemas/CustomizationAIGreeting" }, "localizedGreeting": { "$ref": "#/components/schemas/LocalizedString128" }, "suggestions": { "$ref": "#/components/schemas/CustomizationSuggestedQuestions" }, "instructions": { "$ref": "#/components/schemas/CustomizationAIInstructions" }, "condition": { "description": "Conditional expression, evaluated against the site visitor, deciding whether the visitor can\nuse the site's AI (assistant or AI search), for example `visitor.isAuthenticated` or\n`visitor.claims.plan == \"enterprise\"`. AI is available to every visitor when absent or empty.\n", "$ref": "#/components/schemas/Expression" } }, "required": [ "mode" ] }, "advancedCustomization": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "If true, Advanced customization is enabled" } }, "required": [ "enabled" ] }, "pageActions": { "type": "object", "properties": { "items": { "type": "array", "description": "Ordered list of the page actions enabled in the page menu. This is the source of truth for\nwhich actions are enabled and in which order: the position defines the display order, the\nfirst action is the default one, surfaced as the main button on the page, and actions not\npresent in the list are disabled. An empty list turns the page menu off entirely: no action\nis shown, not even the `assistant`. On a non-empty list the `assistant` action follows the\n`ai.mode` setting rather than its own presence: it is kept (prepended by default if missing,\notherwise keeping its position) when the assistant is enabled and absent when it is disabled.\nWhen the menu is off, the assistant stays reachable from the header via `ai.mode`.\n", "items": { "$ref": "#/components/schemas/CustomizationPageActionType" } }, "conditions": { "description": "Conditions restricting enabled page actions to the visitors matching them. Returned by the\ncustomization endpoints when a page action has one, and left out of published content,\nwhere they are already applied to the visitor. When updating, leaving it out keeps the\ncurrent conditions and an empty object removes them.\n", "$ref": "#/components/schemas/CustomizationPageActionConditions" } }, "required": [ "items" ] }, "externalLinks": { "type": "object", "properties": { "target": { "$ref": "#/components/schemas/SiteExternalLinksTarget" } }, "required": [ "target" ] }, "pagination": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Whether the pagination navigation should be displayed on pages." } }, "required": [ "enabled" ] }, "trademark": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Whether the GitBook trademark (\"Powered by GitBook\") should be visible" } }, "required": [ "enabled" ] }, "privacyPolicy": { "type": "object", "properties": { "url": { "$ref": "#/components/schemas/URL" } } }, "socialPreview": { "type": "object", "properties": { "url": { "$ref": "#/components/schemas/URL" } } }, "socialAccounts": { "$ref": "#/components/schemas/SiteSocialAccounts" }, "insights": { "type": "object", "properties": { "trackingCookie": { "type": "boolean", "description": "Whether GitBook identifies the visitor on the site using a cookie.", "default": true } }, "required": [ "trackingCookie" ] } }, "required": [ "styling", "internationalization", "favicon", "header", "footer", "themes", "feedback", "ai", "advancedCustomization", "trademark", "externalLinks", "pagination", "pageActions", "privacyPolicy", "socialPreview", "socialAccounts", "insights" ] }, "SiteCustomizationSettings": { "allOf": [ { "$ref": "#/components/schemas/SiteCustomizationSettingsBase" }, { "type": "object", "properties": { "updatedAt": { "description": "When the customization settings were updated. If missing, customization was not updated.", "$ref": "#/components/schemas/Timestamp" } } } ] }, "SiteChangeRequestCustomizationMember": { "allOf": [ { "$ref": "#/components/schemas/SiteChangeRequestMember" }, { "type": "object", "description": "Customization settings of the site changed by a site change request.", "properties": { "base": { "description": "The live customization settings this member diverged from.", "$ref": "#/components/schemas/SiteCustomizationSettings" }, "head": { "description": "The customization settings currently proposed.", "$ref": "#/components/schemas/SiteCustomizationSettings" } } } ] }, "SiteChangeRequest": { "type": "object", "description": "A change request reviewing a site as a whole. It groups every proposed change — the site's structure and its content — into one review, one lifecycle and one merge decision.", "properties": { "object": { "type": "string", "enum": [ "site-change-request" ] }, "id": { "type": "string", "description": "Unique identifier for the change request" }, "organization": { "type": "string", "description": "ID of the organization owning the change request." }, "site": { "type": "string", "description": "ID of the site reviewed by the change request." }, "number": { "type": "number", "description": "Incremental identifier of the change request within the site." }, "version": { "type": "number", "description": "Identity of the complete set of member states currently exposed. It increments once per completed update, so a review can detect that it applies to outdated content." }, "status": { "$ref": "#/components/schemas/ChangeRequestStatus" }, "subject": { "$ref": "#/components/schemas/ChangeRequestSubject" }, "description": { "$ref": "#/components/schemas/JSONDocument" }, "links": { "$ref": "#/components/schemas/ChangeRequestLinks" }, "content": { "type": "array", "description": "Spaces whose content the change request changes, one entry per space. Empty when it only changes the site itself.", "items": { "$ref": "#/components/schemas/SiteChangeRequestContentMember" } }, "structure": { "$ref": "#/components/schemas/SiteChangeRequestStructureMember", "description": "Only present when the change request changes the site structure." }, "customization": { "$ref": "#/components/schemas/SiteChangeRequestCustomizationMember", "description": "Only present when the change request changes the site customization settings." }, "comments": { "type": "number", "description": "Count of opened comments across all members of the change request." }, "createdBy": { "$ref": "#/components/schemas/User" }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "updatedAt": { "$ref": "#/components/schemas/Timestamp" }, "mergedBy": { "$ref": "#/components/schemas/User", "description": "User who merged the change request. Only present when it has been merged." }, "mergedAt": { "$ref": "#/components/schemas/Timestamp", "description": "Date at which the change request was merged. Only present when it has been merged." }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "app": { "type": "string", "description": "URL of the change request in the application", "format": "uri" }, "location": { "type": "string", "description": "URL of the change request in the API", "format": "uri" } }, "required": [ "app", "location" ] } }, "required": [ "object", "id", "organization", "site", "number", "version", "status", "subject", "content", "comments", "createdBy", "createdAt", "updatedAt", "urls" ] }, "RevisionMergedFrom": { "description": "The change request a revision was merged from: a change request of the space, or a site change request, which publishes every space it edits at once. Absent for a site change request the caller cannot view, since a space can be part of sites it has no access to.", "oneOf": [ { "$ref": "#/components/schemas/ChangeRequest" }, { "$ref": "#/components/schemas/SiteChangeRequest" } ], "discriminator": { "propertyName": "object", "mapping": { "change-request": "#/components/schemas/ChangeRequest", "site-change-request": "#/components/schemas/SiteChangeRequest" } } }, "RevisionTypeMerge": { "allOf": [ { "$ref": "#/components/schemas/RevisionBase" }, { "type": "object", "properties": { "type": { "type": "string", "description": "Revision created when merging a change request with primary.", "enum": [ "merge" ] }, "mergedFrom": { "$ref": "#/components/schemas/RevisionMergedFrom" } }, "required": [ "type" ] } ] }, "RevisionTypeRollback": { "allOf": [ { "$ref": "#/components/schemas/RevisionBase" }, { "type": "object", "properties": { "type": { "type": "string", "description": "Revision created as a rollback of a previous revision.", "enum": [ "rollback" ] } }, "required": [ "type" ] } ] }, "RevisionTypeUpdate": { "allOf": [ { "$ref": "#/components/schemas/RevisionBase" }, { "type": "object", "properties": { "type": { "type": "string", "description": "Revision created when updating a change request with changes from primary.", "enum": [ "update" ] } }, "required": [ "type" ] } ] }, "RevisionTypeComputed": { "allOf": [ { "$ref": "#/components/schemas/RevisionBase" }, { "type": "object", "properties": { "type": { "type": "string", "description": "Virtual revision, computed from a source revision", "enum": [ "computed" ] }, "sourceRevision": { "type": "string", "description": "ID of the non-computed revision used to compute this revision." }, "mergedFrom": { "description": "The change request the source revision was merged from, when the computed revision is derived from a merge revision.", "$ref": "#/components/schemas/RevisionMergedFrom" } }, "required": [ "type", "sourceRevision" ] } ] }, "Revision": { "oneOf": [ { "$ref": "#/components/schemas/RevisionTypeEdits" }, { "$ref": "#/components/schemas/RevisionTypeMerge" }, { "$ref": "#/components/schemas/RevisionTypeRollback" }, { "$ref": "#/components/schemas/RevisionTypeUpdate" }, { "$ref": "#/components/schemas/RevisionTypeComputed" } ], "discriminator": { "propertyName": "type" } }, "SpaceTemplateParams": { "type": "object", "description": "Parameters for a space template", "properties": { "contentRefs": { "type": "object", "additionalProperties": { "type": "object", "$ref": "#/components/schemas/ContentRef" } } } }, "ApplySpaceTemplate": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the template to use for the space" }, "params": { "$ref": "#/components/schemas/SpaceTemplateParams" } }, "required": [ "id" ] }, "RevisionTagWithPageCount": { "allOf": [ { "$ref": "#/components/schemas/RevisionTag" }, { "type": "object", "required": [ "pageCount" ], "properties": { "pageCount": { "type": "integer", "minimum": 0, "description": "Number of distinct visible document pages tagged with this tag or any descendant tag. Categories count pages tagged with their descendant tags. Only this space's tag references count. Hidden pages and their descendants are excluded." } } } ] }, "ChangeRequestOrderBy": { "type": "string", "enum": [ "updatedAt", "createdAt" ], "default": "updatedAt", "description": "The field to sort change requests by. Defaults to 'updatedAt'." }, "ChangeRequestReviewStatus": { "type": "string", "description": "Status of a change request review.", "enum": [ "changes-requested", "approved" ] }, "EmojiReaction": { "type": "object", "description": "An emoji reaction by one or many users", "properties": { "emoji": { "type": "string", "description": "The Emoji of the reaction" }, "count": { "type": "number", "description": "The number of users who reacted with this emoji" }, "users": { "type": "array", "description": "The users who reacted with this emoji", "items": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User" }, "reactedAt": { "$ref": "#/components/schemas/Timestamp" } }, "required": [ "user", "reactedAt" ] } } }, "required": [ "emoji", "count", "users" ] }, "EmojiReactions": { "type": "array", "items": { "$ref": "#/components/schemas/EmojiReaction" } }, "UserContributor": { "type": "object", "description": "Contributor towards content.", "properties": { "updatedAt": { "$ref": "#/components/schemas/Timestamp" }, "count": { "type": "integer" }, "user": { "$ref": "#/components/schemas/User" } }, "required": [ "updatedAt", "count", "user" ] }, "TableCellTarget": { "type": "object", "description": "Details about the table cell this comment is attached to, if any.", "properties": { "record": { "type": "string" }, "definition": { "type": "string" } }, "required": [ "record", "definition" ] }, "Comment": { "allOf": [ { "type": "object", "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"comment\"", "enum": [ "comment" ] }, "id": { "description": "Unique identifier for the comment.", "type": "string" }, "postedBy": { "description": "The user who posted the comment.", "$ref": "#/components/schemas/User" }, "postedAt": { "description": "When the comment was posted.", "$ref": "#/components/schemas/Timestamp" }, "editedAt": { "description": "Date when the comment was edited, if it has been edited.", "$ref": "#/components/schemas/Timestamp" }, "reactions": { "description": "Any emoji reactions to the comment.", "$ref": "#/components/schemas/EmojiReactions" }, "replies": { "description": "The number of replies to this comment.", "type": "number" }, "repliers": { "description": "The users who replied to this comment.", "type": "array", "items": { "$ref": "#/components/schemas/UserContributor" } }, "body": { "description": "The content of the comment.", "$ref": "#/components/schemas/Document" }, "target": { "description": "Information about the target of the comment.", "type": "object", "properties": { "node": { "description": "The node this comment is attached to.", "type": "object", "properties": { "id": { "type": "string" } }, "required": [ "id" ] }, "tableCell": { "$ref": "#/components/schemas/TableCellTarget" }, "changeRequest": { "description": "The change request containing this comment, if the comment was made inside a change request.", "type": "string" }, "review": { "description": "The review containing this comment, if this comment was made as part of a review.", "type": "string" }, "page": { "description": "Information about the page, if this comment refers to a specific page.", "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the page" } }, "required": [ "id" ] }, "space": { "description": "The space containing this comment.", "type": "string" }, "revision": { "description": "The revision in which the target can be found in.", "type": "string" } }, "required": [ "space", "revision" ] }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "location": { "type": "string", "description": "URL of the comment in the API", "format": "uri" } }, "required": [ "location" ] }, "permissions": { "type": "object", "description": "The set of permissions for the comment", "properties": { "view": { "type": "boolean", "description": "Can the user view the comment." }, "edit": { "type": "boolean", "description": "Can the user edit the comment." }, "reply": { "type": "boolean", "description": "Can the user react or send a reply to the comment." }, "delete": { "type": "boolean", "description": "Can the user delete the comment." } }, "required": [ "view", "edit", "delete" ] } }, "required": [ "object", "id", "replies", "repliers", "body", "postedBy", "postedAt", "reactions", "target", "urls", "permissions" ] }, { "oneOf": [ { "type": "object", "title": "Resolved", "properties": { "status": { "description": "Status of the comment.", "type": "string", "enum": [ "resolved" ] }, "resolvedAt": { "description": "If the comment has been resolved, the date at which it was resolved. If this field is not defined, the comment is not resolved.", "$ref": "#/components/schemas/Timestamp" }, "resolvedBy": { "description": "If the comment has been resolved, the user who resolved it. If this field is not defined, the comment is not resolved.", "$ref": "#/components/schemas/User" } }, "required": [ "status", "resolvedAt", "resolvedBy" ] }, { "type": "object", "title": "Open", "properties": { "status": { "description": "Status of the comment.", "type": "string", "enum": [ "open" ] } }, "required": [ "status" ] } ] } ] }, "ChangeRequestReview": { "type": "object", "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"change-request-review\"", "enum": [ "change-request-review" ] }, "id": { "type": "string", "description": "Unique identifier for the review." }, "revision": { "type": "string", "description": "The revision this review was made against." }, "reviewer": { "description": "The user who performed the review.", "$ref": "#/components/schemas/User" }, "requestedBy": { "description": "The user who requested the review. If undefined, the review was left without a request.", "$ref": "#/components/schemas/User" }, "status": { "description": "The status of the review.", "$ref": "#/components/schemas/ChangeRequestReviewStatus" }, "outdated": { "type": "boolean", "description": "Whether this review has been superseded by a newer review request or submission." }, "comment": { "$ref": "#/components/schemas/Comment" }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "updatedAt": { "$ref": "#/components/schemas/Timestamp" }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "location": { "type": "string", "description": "URL of the review in the API", "format": "uri" } }, "required": [ "location" ] } }, "required": [ "object", "id", "revision", "reviewer", "status", "outdated", "createdAt", "updatedAt", "urls" ] }, "ChangeRequestReviewStats": { "type": "object", "description": "Exact review totals for the applied filters, independent of pagination. Keyed by review status, with a count of zero for a status nobody used.", "properties": { "approved": { "type": "number" }, "changes-requested": { "type": "number" } }, "additionalProperties": false, "required": [ "approved", "changes-requested" ] }, "Team": { "type": "object", "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"team\"", "enum": [ "team" ] }, "id": { "type": "string", "description": "Unique identifier for the team" } }, "required": [ "object", "id" ] }, "ChangeRequestRequestedReviewer": { "type": "object", "allOf": [ { "type": "object", "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"change-request-requested-reviewer\"", "enum": [ "change-request-requested-reviewer" ] }, "revision": { "type": "string", "description": "The revision of the content when the request was made." }, "requestedBy": { "description": "The user who made the request.", "$ref": "#/components/schemas/User" }, "createdAt": { "$ref": "#/components/schemas/Timestamp" } }, "required": [ "object", "revision", "requestedBy", "createdAt" ] }, { "type": "object", "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "user" ] }, "user": { "description": "The user who was requested to review.", "$ref": "#/components/schemas/User" } }, "required": [ "kind", "user" ] }, { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "team" ] }, "team": { "description": "The team who was requested to review.", "$ref": "#/components/schemas/Team" } }, "required": [ "kind", "team" ] } ] } ] }, "AgentConversation": { "type": "object", "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"agent-conversation\"", "enum": [ "agent-conversation" ] }, "id": { "type": "string", "description": "The unique ID of the conversation. This is the client-generated identifier used to address the conversation; for the default conversation of a change request it is \"default\"." }, "title": { "type": "string", "description": "The title of the conversation, generated from the first message. Absent until generated." }, "shared": { "type": "boolean", "description": "Whether the conversation is shared with everyone who has access to its context, rather than only its creator. Conversations are shared by default; a private conversation is only ever visible to its creator and stays private for good." }, "changeRequest": { "type": "string", "description": "The change request the conversation is currently editing in. Only set for organization agent conversations, which start without one and attach a change request the first time the agent needs to change content. Absent for change request conversations, whose change request is the conversation's context." }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "updatedAt": { "$ref": "#/components/schemas/Timestamp" } }, "required": [ "object", "id", "shared", "createdAt", "updatedAt" ] }, "PostCommentSchema": { "type": "object", "properties": { "node": { "description": "The node to which the comment is posted, if any.", "type": "string" }, "page": { "description": "The page to which the comment is posted, if any.", "type": "string" }, "body": { "description": "The content of the comment.", "$ref": "#/components/schemas/Document" }, "tableCell": { "$ref": "#/components/schemas/TableCellTarget" } }, "required": [ "body" ] }, "UpdateCommentSchema": { "type": "object", "properties": { "resolved": { "type": "boolean", "description": "Whether the comment is resolved or not." }, "body": { "description": "Content of the comment.", "$ref": "#/components/schemas/Document" }, "addedReactions": { "type": "array", "description": "Reactions to add to the comment.", "items": { "type": "string" } }, "removedReactions": { "type": "array", "description": "Reactions to remove from the comment.", "items": { "type": "string" } } } }, "CommentReply": { "type": "object", "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"comment-reply\"", "enum": [ "comment-reply" ] }, "id": { "type": "string", "description": "Unique identifier for the reply." }, "postedBy": { "$ref": "#/components/schemas/User" }, "postedAt": { "$ref": "#/components/schemas/Timestamp" }, "editedAt": { "description": "Date when the reply was edited, if it has been edited.", "$ref": "#/components/schemas/Timestamp" }, "reactions": { "$ref": "#/components/schemas/EmojiReactions" }, "body": { "$ref": "#/components/schemas/Document" }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "location": { "type": "string", "description": "URL of the comment reply in the API", "format": "uri" } }, "required": [ "location" ] }, "permissions": { "type": "object", "description": "The set of permissions for the comment reply", "properties": { "view": { "type": "boolean", "description": "Can the user view the comment reply." }, "edit": { "type": "boolean", "description": "Can the user edit the comment reply." }, "reply": { "type": "boolean", "description": "Can the user react or reply to the comment reply." }, "delete": { "type": "boolean", "description": "Can the user delete the comment reply." } }, "required": [ "view", "edit", "delete" ] } }, "required": [ "object", "id", "body", "postedBy", "postedAt", "reactions", "urls", "permissions" ] }, "PostCommentReplySchema": { "type": "object", "properties": { "body": { "description": "The content of the comment.", "$ref": "#/components/schemas/Document" } }, "required": [ "body" ] }, "ChangeRequestUserContributor": { "allOf": [ { "$ref": "#/components/schemas/UserContributor" }, { "type": "object", "properties": { "actionType": { "type": "string", "enum": [ "edit", "comment" ] } }, "required": [ "actionType" ] } ] }, "RevisionPageUpdate": { "type": "object", "description": "Page metadata that can be set when inserting or updating a page through a change request. When a markdown document is provided on the same operation, the values read from its frontmatter take precedence over these fields.", "properties": { "title": { "type": "string", "minLength": 1, "description": "Title of the page." }, "slug": { "description": "Slug of the page in its parent, used to build the page's path. When omitted, the slug is derived from the title. The slug must be unique among the page's siblings; any collision is rejected.", "$ref": "#/components/schemas/RevisionPageSlug" }, "emoji": { "description": "Emoji of the page. Set to an empty string to remove it.", "$ref": "#/components/schemas/Emoji" }, "icon": { "description": "Icon of the page. Set to an empty string to remove it.", "$ref": "#/components/schemas/Icon" }, "description": { "type": "string", "description": "Description of the page." }, "linkTitle": { "description": "Optional custom title used for the page in the table of contents and mentions instead of its page title. Set to an empty string to remove it.", "type": "string", "maxLength": 100 }, "keywords": { "type": "array", "description": "Search terms and phrases for a document page. Replaces the entire list. Use an empty array to clear it. Omit the field to keep the existing list.", "maxItems": 20, "items": { "type": "string", "maxLength": 100 } }, "tagTitle": { "description": "Optional title for the page's HTML `<title>` tag. When set, it replaces the page title in the composed `<title>` (`<tagTitle || title> | <section> | <site>`), while the page's visible heading and navigation title remain unchanged. Use this when the search result or browser tab should use a different title from the page itself. Set to an empty string to remove it.", "type": "string", "maxLength": 100 }, "hidden": { "type": "boolean", "description": "If true, the page is not displayed in the navigation, while still being accessible." }, "noIndex": { "type": "boolean", "description": "If true, the page is not indexable in the search and ask features." }, "noRobotsIndex": { "type": "boolean", "description": "If true, the page is not indexable by search engine robots." }, "condition": { "type": "string", "description": "Adaptive-content condition controlling whether the page is shown to a visitor. Set to an empty string to remove the condition." }, "variables": { "description": "Page variables, referenced in the page's content as `page.vars.<name>`. They are separate from space variables (`space.vars.<name>`). The object replaces all of the page's variables: set it to `{}` to remove them, or omit it to leave them unchanged. In a markdown document, the `vars` frontmatter sets them too. Names follow the same rules as space variables. Document pages only.", "$ref": "#/components/schemas/Variables" } } }, "ChangeRequestContentChangeUpdatePage": { "description": "Update an existing page. Its document and/or its metadata (title, icon, description, visibility, adaptive-content condition) can be changed, and it can be moved to a new parent and/or position with `into`/`at`.", "allOf": [ { "$ref": "#/components/schemas/RevisionPageUpdate" }, { "type": "object", "required": [ "operation", "page" ], "properties": { "operation": { "type": "string", "enum": [ "update_page" ] }, "page": { "type": "string", "description": "ID of the page to update." }, "document": { "description": "New document for the page. When provided as markdown, its frontmatter is read to update the page metadata. A `tags` list replaces the page's tags; each must be an existing tag slug in the space. Omit to update only the metadata fields.", "$ref": "#/components/schemas/Document" }, "into": { "description": "Move the page to be a child of this page ID. Set to `null` to move it to the root of the page tree. Omit to leave the page's parent unchanged. The target cannot be the page itself or one of its own descendants.", "oneOf": [ { "type": "string" }, { "type": "null" } ] }, "at": { "type": "integer", "minimum": 0, "description": "Zero-based index to move the page to among its new siblings (those of `into`, or the root pages when `into` is omitted or `null`). Omit to leave the page's position unchanged when its parent isn't changing, or to append it at the end when its parent is changing." } } } ], "example": { "operation": "update_page", "page": "page_id", "document": { "markdown": "# Hello World\n\nThis is a markdown document linking to [another page](/pages/page_id).\n" } } }, "ChangeRequestContentChangeInsertPage": { "description": "Insert a new page into the change request. The title is taken from `title`, or, when the document is markdown, from the document's frontmatter or leading heading (which take precedence, matching Git Sync). When no title can be resolved, the page falls back to a default title.", "allOf": [ { "$ref": "#/components/schemas/RevisionPageUpdate" }, { "type": "object", "required": [ "operation", "document" ], "properties": { "operation": { "type": "string", "enum": [ "insert_page" ] }, "into": { "type": "string", "description": "ID of the parent page to insert the new page into. If omitted, the page is inserted as a root page." }, "at": { "type": "integer", "minimum": 0, "description": "Zero-based index to insert the page at among its siblings. If omitted, the page is appended at the end." }, "ref": { "type": "string", "description": "Temporary local reference for the page, used only for the lifetime of this request and never persisted. Other pages inserted in the same batch can link to this page by its ref (e.g. `[Page](./<ref>.md)`), which resolves to the page's ID at apply time — regardless of operation order or the page's eventual slug. A ref must be unique within the batch and must not collide with an existing page's path." }, "stableKey": { "type": "string", "minLength": 1, "maxLength": 255, "description": "Stable identifier for the page's content, such as the ID of the record it is generated from. The page's ID is derived from it, so re-inserting a deleted page with the same key restores its ID and links to it keep working. The same key gives the same page ID in every space, including duplicated spaces. To change a page that exists, use `update_page`: an insert whose key matches an existing page, or another insert in the batch, is rejected, so deleting a page and re-inserting its key must be done in separate requests. A re-created page takes over the old page's comments, redirects, insights and history. When two change requests insert the same key, merging both keeps only one of the pages, without a conflict." }, "document": { "description": "Document for the new page. When provided as markdown, its frontmatter is read to set the page metadata, including its `tags` (existing tag slugs in the space).", "$ref": "#/components/schemas/Document" } } } ], "example": { "operation": "insert_page", "title": "New page", "document": { "markdown": "# New page\n\nThis is a new page.\n" } } }, "ChangeRequestContentChangeDeletePage": { "type": "object", "description": "Delete an existing page (and its subpages) from the change request.", "required": [ "operation", "page" ], "properties": { "operation": { "type": "string", "enum": [ "delete_page" ] }, "page": { "type": "string", "description": "ID of the page to delete." } }, "example": { "operation": "delete_page", "page": "page_id" } }, "ChangeRequestContentChangeRevertPage": { "type": "object", "description": "Revert a page to the state it had in a given revision. If `revision` is omitted, the page is reverted to the change request's base revision. Without `block`, the whole page is reverted — added pages are removed, deleted pages are restored, and modified pages have their document and properties (title, description, slug, tags, cover, icon and other page settings) reset; the page keeps its position. With `block`, only the listed block-level changes in the page's document are reverted (each block is removed if it was added, restored if it was deleted, or reset if it was modified or moved); other blocks and the page's properties/metadata are left untouched.", "required": [ "operation", "page" ], "properties": { "operation": { "type": "string", "enum": [ "revert_page" ] }, "page": { "type": "string", "description": "ID of the page to revert." }, "revision": { "type": "string", "pattern": "^[a-zA-Z0-9_-]+$", "description": "ID of the revision to revert the page to. If omitted, the change request's base revision is used." }, "block": { "type": "array", "items": { "type": "string" }, "description": "Keys of the specific blocks to revert within the page's document, as they appear in the page's document. If omitted, the whole page is reverted." } }, "example": { "operation": "revert_page", "page": "page_id" } }, "ChangeRequestContentChangeInsertFiles": { "type": "object", "description": "Upload files (images or attachments) into the change request. A document references one as `![Alt](/files/<fileId>)` or `[Label](/files/<fileId>)` — use a `ref` to reference it from a later change in the same batch, or read the generated IDs from `insertedFiles`.", "required": [ "operation", "files" ], "properties": { "operation": { "type": "string", "enum": [ "insert_files" ] }, "files": { "type": "array", "minItems": 1, "maxItems": 20, "items": { "type": "object", "description": "A file to upload. Set exactly one source: `url` (GitBook fetches it) or `base64` (inline bytes, max 1MB). Prefer `url`.", "required": [ "name" ], "properties": { "ref": { "type": "string", "description": "Temporary local reference for the file, used only for the lifetime of this request and never persisted. Pages inserted in the same batch can link to this file by its ref (e.g. `[File](./<ref>)`), which resolves to the file's ID at apply time — regardless of operation order or the file's eventual path. A ref must be unique within the batch and must not collide a page ref in the batch or an existing page path." }, "name": { "type": "string", "minLength": 1, "maxLength": 256, "description": "Filename to store the file under, including its extension." }, "contentType": { "type": "string", "description": "MIME type. Required with `base64`; overrides the source's own type otherwise." } }, "oneOf": [ { "type": "object", "properties": { "url": { "type": "string", "format": "uri", "maxLength": 2048, "description": "Public http(s) URL to fetch the file from. A URL resolving to a private or reserved address is rejected — send internally hosted bytes with `base64` instead." } }, "required": [ "url" ] }, { "type": "object", "properties": { "base64": { "type": "string", "description": "Base64-encoded bytes, max 1MB. Requires `contentType`." } }, "required": [ "base64" ] } ] } } }, "example": { "operation": "insert_files", "files": [ { "ref": "architecture.png", "name": "architecture.png", "url": "https://example.com/architecture.png" } ] } }, "ChangeRequestContentChangeInsertComputedPage": { "type": "object", "description": "Insert a page whose content GitBook generates from a source instead of a document: an OpenAPI spec of the organization, rendered as an API reference. GitBook replaces the page, at its position, with the pages it generates and regenerates them whenever the source changes.", "required": [ "operation", "computed" ], "properties": { "operation": { "type": "string", "enum": [ "insert_computed_page" ] }, "computed": { "$ref": "#/components/schemas/ComputedContentSourceRevisionOpenAPI" }, "title": { "type": "string", "minLength": 1, "description": "Title of the page, only shown in the editor since the generated pages take its place. Defaults to \"OpenAPI\"." }, "into": { "type": "string", "description": "ID of the parent page to insert the page into, so the generated pages are nested under it. If omitted, the page is inserted at the root." }, "at": { "type": "integer", "minimum": 0, "description": "Zero-based index to insert the page at among its siblings. If omitted, the page is appended at the end." } }, "example": { "operation": "insert_computed_page", "title": "API reference", "computed": { "type": "builtin:openapi", "props": { "models": true }, "dependencies": { "spec": { "ref": { "kind": "openapi", "spec": "my-api" } } } } } }, "ChangeRequestContentChangeInsertReusableContents": { "type": "object", "description": "Create reusable content (snippets shared by several pages) in the change request. A markdown document includes one as `{% include \"/reusable-content/<reusableContentId>\" %}` — use a `ref` to include it from a page in the same batch, or read the generated IDs from `insertedReusableContents`.", "required": [ "operation", "reusableContents" ], "properties": { "operation": { "type": "string", "enum": [ "insert_reusable_contents" ] }, "reusableContents": { "type": "array", "minItems": 1, "maxItems": 20, "items": { "type": "object", "description": "A reusable content to create.", "required": [ "title", "document" ], "properties": { "ref": { "type": "string", "description": "Temporary local reference for the reusable content, used only for the lifetime of this request and never persisted. Pages in the same batch can include it by its ref (e.g. `{% include \"./<ref>\" %}`), which resolves to the reusable content's ID at apply time — regardless of operation order. A ref must be unique among the reusable content refs of the batch." }, "title": { "type": "string", "minLength": 1, "maxLength": 100, "description": "Title of the reusable content, shown when picking it in the editor." }, "document": { "description": "Body of the reusable content.", "$ref": "#/components/schemas/Document" } } } } }, "example": { "operation": "insert_reusable_contents", "reusableContents": [ { "ref": "disclaimer", "title": "Disclaimer", "document": { "markdown": "{% hint style=\"warning\" %}\nThis feature is in beta.\n{% endhint %}\n" } } ] } }, "ChangeRequestContentChangeUpdateReusableContent": { "type": "object", "description": "Update an existing reusable content's title and/or document. Its ID is unchanged, so every page including it shows the update.", "required": [ "operation", "reusableContent" ], "properties": { "operation": { "type": "string", "enum": [ "update_reusable_content" ] }, "reusableContent": { "type": "string", "description": "ID of the reusable content to update." }, "title": { "type": "string", "minLength": 1, "maxLength": 100, "description": "New title of the reusable content. Omit to keep the current title." }, "document": { "description": "New body of the reusable content. Omit to keep the current body.", "$ref": "#/components/schemas/Document" } }, "example": { "operation": "update_reusable_content", "reusableContent": "reusable_content_id", "title": "Beta disclaimer" } }, "ChangeRequestContentChangeDeleteReusableContent": { "type": "object", "description": "Delete an existing reusable content from the change request.", "required": [ "operation", "reusableContent" ], "properties": { "operation": { "type": "string", "enum": [ "delete_reusable_content" ] }, "reusableContent": { "type": "string", "description": "ID of the reusable content to delete." } }, "example": { "operation": "delete_reusable_content", "reusableContent": "reusable_content_id" } }, "VariableName": { "type": "string", "description": "Name of a variable, referenced in content as `space.vars.<name>`. It starts with a letter, `_` or `$` and contains only letters, digits, `_` and `$`.", "minLength": 1, "maxLength": 64, "pattern": "^[a-zA-Z_$][a-zA-Z0-9_$]*$" }, "ChangeRequestContentChangeInsertVariables": { "type": "object", "description": "Create space variables in the change request (Git Sync's `.gitbook/vars.yaml`), or with `page`, variables of that page. Content references one as an expression, `<code class=\"expression\">space.vars.<name></code>` (or `page.vars.<name>` on that page) in markdown, which renders the variable's value. To replace all of a page's variables at once, set the page's `variables` or its `vars` frontmatter instead.", "required": [ "operation", "variables" ], "properties": { "operation": { "type": "string", "enum": [ "insert_variables" ] }, "page": { "type": "string", "description": "ID of a document page to add the variables to, as its own variables (`page.vars.<name>`). Omit to add space variables." }, "variables": { "type": "array", "minItems": 1, "maxItems": 50, "items": { "type": "object", "description": "A variable to create. Its name must not already be used by a space variable of the change request.", "required": [ "name", "value" ], "properties": { "name": { "$ref": "#/components/schemas/VariableName" }, "value": { "description": "Value of the variable.", "$ref": "#/components/schemas/VariableValue" } } } } }, "example": { "operation": "insert_variables", "variables": [ { "name": "version", "value": "2.0" } ] } }, "ChangeRequestContentChangeUpdateVariable": { "type": "object", "description": "Change the value of an existing space variable, or with `page`, of one of that page's own variables without resending the others. Every expression referencing it shows the new value.", "required": [ "operation", "variable", "value" ], "properties": { "operation": { "type": "string", "enum": [ "update_variable" ] }, "page": { "type": "string", "description": "ID of a document page whose own variable (`page.vars.<name>`) to update. Omit to update a space variable." }, "variable": { "description": "Name of the variable to update.", "$ref": "#/components/schemas/VariableName" }, "value": { "description": "New value of the variable.", "$ref": "#/components/schemas/VariableValue" } }, "example": { "operation": "update_variable", "variable": "version", "value": "2.1" } }, "ChangeRequestContentChangeDeleteVariable": { "type": "object", "description": "Delete an existing space variable from the change request, or with `page`, one of that page's own variables. Expressions referencing it are kept in pages, as in the editor.", "required": [ "operation", "variable" ], "properties": { "operation": { "type": "string", "enum": [ "delete_variable" ] }, "page": { "type": "string", "description": "ID of a document page whose own variable (`page.vars.<name>`) to delete. Omit to delete a space variable." }, "variable": { "description": "Name of the variable to delete.", "$ref": "#/components/schemas/VariableName" } }, "example": { "operation": "delete_variable", "variable": "version" } }, "RevisionTagLabel": { "type": "string", "description": "Display label of a tag or category.", "minLength": 1, "maxLength": 50 }, "ChangeRequestContentChangeInsertTags": { "type": "object", "additionalProperties": false, "description": "Create normal tags and categories in array order. Parents must exist or appear earlier in the array. The batch is rejected atomically if any tag is invalid. Kind cannot be changed through an update or a delete-and-reinsert within the same batch. After deletion in an earlier request, the slug can be reused for a new definition.", "required": [ "operation", "tags" ], "properties": { "operation": { "type": "string", "enum": [ "insert_tags" ] }, "tags": { "type": "array", "minItems": 1, "maxItems": 50, "items": { "type": "object", "additionalProperties": false, "required": [ "label" ], "properties": { "slug": { "type": "string", "minLength": 1, "description": "Stable tag identifier; generated from the label when omitted." }, "kind": { "type": "string", "enum": [ "category" ] }, "label": { "$ref": "#/components/schemas/RevisionTagLabel" }, "color": { "$ref": "#/components/schemas/DocumentTextColor" }, "icon": { "$ref": "#/components/schemas/Icon" }, "emoji": { "$ref": "#/components/schemas/Emoji" }, "parent": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ], "description": "Parent category or normal tag slug. Null places the tag at the root." }, "at": { "type": "integer", "minimum": 0, "description": "Zero-based position among siblings of the same kind (categories, or tags inside a category or parent tag). Top-level tags sort by label and take no position; omit to append when moving to another parent." } } } } } }, "ChangeRequestContentChangeUpdateTag": { "type": "object", "additionalProperties": false, "description": "Rename, restyle, reparent or reorder an existing tag or category. Moving a parent keeps all descendants attached. Kind cannot be changed.", "required": [ "operation", "tag" ], "properties": { "operation": { "type": "string", "enum": [ "update_tag" ] }, "tag": { "type": "string", "minLength": 1, "description": "Slug of the tag or category to update." }, "label": { "$ref": "#/components/schemas/RevisionTagLabel" }, "color": { "$ref": "#/components/schemas/DocumentTextColor" }, "icon": { "oneOf": [ { "$ref": "#/components/schemas/Icon" }, { "type": "null" } ], "description": "Icon to set. Null removes the icon; omission preserves it." }, "emoji": { "oneOf": [ { "$ref": "#/components/schemas/Emoji" }, { "type": "null" } ], "description": "Emoji to set. Null removes the emoji; omission preserves it." }, "parent": { "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ], "description": "Parent category or normal tag slug. Null places the tag at the root." }, "at": { "type": "integer", "minimum": 0, "description": "Zero-based position among siblings of the same kind (categories, or tags inside a category or parent tag). Top-level tags sort by label and take no position; omit to append when moving to another parent." } } }, "ChangeRequestContentChangeDeleteTag": { "type": "object", "additionalProperties": false, "description": "Delete an empty category or a normal tag. A normal tag's children are reparented to its parent. Page and block references to the deleted tag stop resolving.", "required": [ "operation", "tag" ], "properties": { "operation": { "type": "string", "enum": [ "delete_tag" ] }, "tag": { "type": "string", "minLength": 1 } } }, "ChangeRequestContentChange": { "oneOf": [ { "$ref": "#/components/schemas/ChangeRequestContentChangeUpdatePage" }, { "$ref": "#/components/schemas/ChangeRequestContentChangeInsertPage" }, { "$ref": "#/components/schemas/ChangeRequestContentChangeDeletePage" }, { "$ref": "#/components/schemas/ChangeRequestContentChangeRevertPage" }, { "$ref": "#/components/schemas/ChangeRequestContentChangeInsertFiles" }, { "$ref": "#/components/schemas/ChangeRequestContentChangeInsertComputedPage" }, { "$ref": "#/components/schemas/ChangeRequestContentChangeInsertReusableContents" }, { "$ref": "#/components/schemas/ChangeRequestContentChangeUpdateReusableContent" }, { "$ref": "#/components/schemas/ChangeRequestContentChangeDeleteReusableContent" }, { "$ref": "#/components/schemas/ChangeRequestContentChangeInsertVariables" }, { "$ref": "#/components/schemas/ChangeRequestContentChangeUpdateVariable" }, { "$ref": "#/components/schemas/ChangeRequestContentChangeDeleteVariable" }, { "$ref": "#/components/schemas/ChangeRequestContentChangeInsertTags" }, { "$ref": "#/components/schemas/ChangeRequestContentChangeUpdateTag" }, { "$ref": "#/components/schemas/ChangeRequestContentChangeDeleteTag" } ], "discriminator": { "propertyName": "operation", "mapping": { "update_page": "#/components/schemas/ChangeRequestContentChangeUpdatePage", "insert_page": "#/components/schemas/ChangeRequestContentChangeInsertPage", "delete_page": "#/components/schemas/ChangeRequestContentChangeDeletePage", "revert_page": "#/components/schemas/ChangeRequestContentChangeRevertPage", "insert_files": "#/components/schemas/ChangeRequestContentChangeInsertFiles", "insert_computed_page": "#/components/schemas/ChangeRequestContentChangeInsertComputedPage", "insert_reusable_contents": "#/components/schemas/ChangeRequestContentChangeInsertReusableContents", "update_reusable_content": "#/components/schemas/ChangeRequestContentChangeUpdateReusableContent", "delete_reusable_content": "#/components/schemas/ChangeRequestContentChangeDeleteReusableContent", "insert_variables": "#/components/schemas/ChangeRequestContentChangeInsertVariables", "update_variable": "#/components/schemas/ChangeRequestContentChangeUpdateVariable", "delete_variable": "#/components/schemas/ChangeRequestContentChangeDeleteVariable", "insert_tags": "#/components/schemas/ChangeRequestContentChangeInsertTags", "update_tag": "#/components/schemas/ChangeRequestContentChangeUpdateTag", "delete_tag": "#/components/schemas/ChangeRequestContentChangeDeleteTag" } } }, "ChangeRequestContentUpdatePageRef": { "type": "object", "required": [ "object", "id", "urls" ], "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"page\".", "enum": [ "page" ] }, "id": { "type": "string", "description": "Unique identifier of the page." }, "urls": { "type": "object", "required": [ "location" ], "properties": { "location": { "description": "API URL to fetch the page's full, normalized content. For a computed page, it reads the page as stored (`computed=false`), since the computed content replaces the page with the pages it generates.", "$ref": "#/components/schemas/URL" } } } } }, "ChangeRequestContentUpdateInsertedPage": { "type": "object", "description": "A page created by the operation with its resolved ID, ref as passed by the caller, and a URL to fetch its content.", "required": [ "object", "page" ], "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"created_page\".", "enum": [ "created_page" ] }, "ref": { "type": "string", "description": "The batch-local `ref` provided on the insert operation, echoed so the caller can map their reference to the created page's ID. Absent when the operation had no ref." }, "page": { "description": "Reference to the created page, with a URL to fetch its normalized content.", "$ref": "#/components/schemas/ChangeRequestContentUpdatePageRef" } } }, "ChangeRequestContentUpdateUpdatedPage": { "type": "object", "description": "A page updated by the operation, with a URL to fetch its content.", "required": [ "object", "page" ], "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"updated_page\".", "enum": [ "updated_page" ] }, "page": { "description": "Reference to the updated page, with a URL to fetch its normalized content.", "$ref": "#/components/schemas/ChangeRequestContentUpdatePageRef" } } }, "ChangeRequestContentUpdateDeletedPage": { "type": "object", "description": "A page deleted by the batch. Only its ID is returned, as it no longer has content.", "required": [ "object", "page" ], "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"deleted_page\".", "enum": [ "deleted_page" ] }, "page": { "type": "string", "description": "ID of the deleted page." } } }, "ChangeRequestContentUpdateChange": { "description": "An outcome of a content change.", "oneOf": [ { "$ref": "#/components/schemas/ChangeRequestContentUpdateInsertedPage" }, { "$ref": "#/components/schemas/ChangeRequestContentUpdateUpdatedPage" }, { "$ref": "#/components/schemas/ChangeRequestContentUpdateDeletedPage" } ], "discriminator": { "propertyName": "object", "mapping": { "created_page": "#/components/schemas/ChangeRequestContentUpdateInsertedPage", "updated_page": "#/components/schemas/ChangeRequestContentUpdateUpdatedPage", "deleted_page": "#/components/schemas/ChangeRequestContentUpdateDeletedPage" } } }, "ChangeRequestContentUpdate": { "type": "object", "description": "The result of applying a batch of content changes.", "required": [ "changeRequest", "changes" ], "properties": { "changeRequest": { "description": "The change request after the batch was applied.", "$ref": "#/components/schemas/ChangeRequest" }, "changes": { "type": "array", "description": "One entry per affected page (deduplicated), in the order the pages were first touched by the batch.", "items": { "$ref": "#/components/schemas/ChangeRequestContentUpdateChange" } }, "insertedFiles": { "type": "array", "description": "Files created by the `insert_files` changes in this batch, in the order they were inserted. Use their IDs to reference them from a document.", "items": { "$ref": "#/components/schemas/RevisionFile" } }, "insertedReusableContents": { "type": "array", "description": "Reusable contents created by the `insert_reusable_contents` changes in this batch, in the order they were inserted. Use their IDs to include them from a document.", "items": { "$ref": "#/components/schemas/RevisionReusableContent" } } } }, "RevisionPageType": { "type": "string", "enum": [ "document", "group", "link", "computed" ] }, "ChangedRevisionPage": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "$ref": "#/components/schemas/RevisionPageType" }, "title": { "type": "string" }, "path": { "type": "string" } }, "required": [ "id", "type", "title" ] }, "RevisionSemanticChangePageCreated": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "page_created" ] }, "page": { "$ref": "#/components/schemas/ChangedRevisionPage" } }, "required": [ "type", "page" ] }, "ChangeAttributeString": { "type": "object", "properties": { "before": { "type": "string" }, "after": { "type": "string" } } }, "ChangeAttributeRevisionPageDocumentCover": { "type": "object", "properties": { "before": { "$ref": "#/components/schemas/RevisionPageDocumentCover" }, "after": { "$ref": "#/components/schemas/RevisionPageDocumentCover" } } }, "RevisionPageLayoutPreset": { "type": "string", "description": "The core layout presets for a page.", "enum": [ "docs", "editorial", "landing" ] }, "RevisionPageLayout": { "oneOf": [ { "$ref": "#/components/schemas/RevisionPageLayoutPreset" }, { "$ref": "#/components/schemas/RevisionPageLayoutOptions" } ] }, "ChangeAttributeRevisionPageLayout": { "type": "object", "properties": { "before": { "$ref": "#/components/schemas/RevisionPageLayout" }, "after": { "$ref": "#/components/schemas/RevisionPageLayout" } } }, "ChangeAttributeVariables": { "type": "object", "properties": { "before": { "$ref": "#/components/schemas/Variables" }, "after": { "$ref": "#/components/schemas/Variables" } } }, "RevisionPageDocumentChangeAttributes": { "type": "object", "minProperties": 1, "properties": { "title": { "$ref": "#/components/schemas/ChangeAttributeString" }, "description": { "$ref": "#/components/schemas/ChangeAttributeString" }, "keywords": { "type": "object", "properties": { "before": { "type": "array", "items": { "type": "string" } }, "after": { "type": "array", "items": { "type": "string" } } } }, "slug": { "$ref": "#/components/schemas/ChangeAttributeString" }, "document": { "$ref": "#/components/schemas/ChangeAttributeString" }, "cover": { "$ref": "#/components/schemas/ChangeAttributeRevisionPageDocumentCover" }, "emoji": { "$ref": "#/components/schemas/ChangeAttributeString" }, "layout": { "$ref": "#/components/schemas/ChangeAttributeRevisionPageLayout" }, "variables": { "$ref": "#/components/schemas/ChangeAttributeVariables" } } }, "RevisionPageGroupChangeAttributes": { "type": "object", "minProperties": 1, "properties": { "title": { "$ref": "#/components/schemas/ChangeAttributeString" }, "emoji": { "$ref": "#/components/schemas/ChangeAttributeString" }, "slug": { "$ref": "#/components/schemas/ChangeAttributeString" } } }, "ChangeAttributeContentReference": { "type": "object", "properties": { "before": { "$ref": "#/components/schemas/ContentRef" }, "after": { "$ref": "#/components/schemas/ContentRef" } } }, "RevisionPageLinkChangeAttributes": { "type": "object", "minProperties": 1, "properties": { "title": { "$ref": "#/components/schemas/ChangeAttributeString" }, "emoji": { "$ref": "#/components/schemas/ChangeAttributeString" }, "target": { "$ref": "#/components/schemas/ChangeAttributeContentReference" } } }, "RevisionSemanticChangePageEdited": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "page_edited" ] }, "page": { "$ref": "#/components/schemas/ChangedRevisionPage" }, "attributes": { "oneOf": [ { "$ref": "#/components/schemas/RevisionPageDocumentChangeAttributes" }, { "$ref": "#/components/schemas/RevisionPageGroupChangeAttributes" }, { "$ref": "#/components/schemas/RevisionPageLinkChangeAttributes" } ] } }, "required": [ "type", "page", "attributes" ] }, "RevisionSemanticChangePageDeleted": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "page_deleted" ] }, "page": { "$ref": "#/components/schemas/ChangedRevisionPage" } }, "required": [ "type", "page" ] }, "RevisionSemanticChangePageMoved": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "page_moved" ] }, "page": { "$ref": "#/components/schemas/ChangedRevisionPage" }, "parent": { "type": "object", "properties": { "before": { "$ref": "#/components/schemas/ChangedRevisionPage" }, "after": { "$ref": "#/components/schemas/ChangedRevisionPage" } } } }, "required": [ "type", "page", "parent" ] }, "ChangedRevisionFile": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "contentType": { "type": "string" }, "downloadURL": { "type": "string" } }, "required": [ "id", "name", "contentType", "downloadURL" ] }, "RevisionSemanticChangeFileCreated": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "file_created" ] }, "file": { "$ref": "#/components/schemas/ChangedRevisionFile" } }, "required": [ "type", "file" ] }, "ChangeAttributeNumber": { "type": "object", "properties": { "before": { "type": "number" }, "after": { "type": "number" } } }, "RevisionFileImageDimensions": { "type": "object", "properties": { "height": { "type": "number" }, "width": { "type": "number" } }, "required": [ "height", "width" ] }, "ChangeAttributeRevisionFileImageDimensions": { "type": "object", "properties": { "before": { "$ref": "#/components/schemas/RevisionFileImageDimensions" }, "after": { "$ref": "#/components/schemas/RevisionFileImageDimensions" } } }, "RevisionFileChangeAttributes": { "type": "object", "minProperties": 1, "properties": { "name": { "$ref": "#/components/schemas/ChangeAttributeString" }, "downloadURL": { "$ref": "#/components/schemas/ChangeAttributeString" }, "size": { "$ref": "#/components/schemas/ChangeAttributeNumber" }, "contentType": { "$ref": "#/components/schemas/ChangeAttributeString" }, "dimensions": { "$ref": "#/components/schemas/ChangeAttributeRevisionFileImageDimensions" } } }, "RevisionSemanticChangeFileEdited": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "file_edited" ] }, "file": { "$ref": "#/components/schemas/ChangedRevisionFile" }, "attributes": { "$ref": "#/components/schemas/RevisionFileChangeAttributes" } }, "required": [ "type", "file", "attributes" ] }, "RevisionSemanticChangeFileDeleted": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "file_deleted" ] }, "file": { "$ref": "#/components/schemas/ChangedRevisionFile" } }, "required": [ "type", "file" ] }, "ChangeAttributeVariable": { "type": "object", "properties": { "before": { "$ref": "#/components/schemas/VariableValue" }, "after": { "$ref": "#/components/schemas/VariableValue" } } }, "RevisionSemanticChangeVariablesEdited": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "variables_edited" ] }, "variables": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/ChangeAttributeVariable" } } }, "required": [ "type", "variables" ] }, "ChangedRevisionReusableContent": { "type": "object", "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "document": { "type": "string" } }, "required": [ "id", "title" ] }, "RevisionSemanticChangeReusableContentCreated": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "reusable_content_created" ] }, "reusableContent": { "$ref": "#/components/schemas/ChangedRevisionReusableContent" } }, "required": [ "type", "reusableContent" ] }, "RevisionSemanticChangeReusableContentDeleted": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "reusable_content_deleted" ] }, "reusableContent": { "$ref": "#/components/schemas/ChangedRevisionReusableContent" } }, "required": [ "type", "reusableContent" ] }, "RevisionReusableContentChangeAttributes": { "type": "object", "minProperties": 1, "properties": { "title": { "$ref": "#/components/schemas/ChangeAttributeString" }, "document": { "$ref": "#/components/schemas/ChangeAttributeString" } } }, "RevisionSemanticChangeReusableContentEdited": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "reusable_content_edited" ] }, "reusableContent": { "$ref": "#/components/schemas/ChangedRevisionReusableContent" }, "attributes": { "$ref": "#/components/schemas/RevisionReusableContentChangeAttributes" } }, "required": [ "type", "reusableContent", "attributes" ] }, "ChangedRevisionTag": { "type": "object", "properties": { "slug": { "type": "string" }, "label": { "type": "string" }, "kind": { "type": "string", "enum": [ "category" ], "description": "Present for categories; omitted for normal tags." }, "parent": { "type": "string", "description": "Parent tag or category slug. Omitted for root tags." } }, "required": [ "slug", "label" ] }, "RevisionSemanticChangeTagCreated": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "tag_created" ] }, "tag": { "$ref": "#/components/schemas/ChangedRevisionTag" } }, "required": [ "type", "tag" ] }, "RevisionSemanticChangeTagDeleted": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "tag_deleted" ] }, "tag": { "$ref": "#/components/schemas/ChangedRevisionTag" } }, "required": [ "type", "tag" ] }, "RevisionTagChangeAttributes": { "type": "object", "minProperties": 1, "properties": { "label": { "$ref": "#/components/schemas/ChangeAttributeString" }, "kind": { "$ref": "#/components/schemas/ChangeAttributeString" }, "parent": { "$ref": "#/components/schemas/ChangeAttributeString" }, "orderIndex": { "$ref": "#/components/schemas/ChangeAttributeString" }, "color": { "$ref": "#/components/schemas/ChangeAttributeString" }, "icon": { "type": "object", "properties": { "before": { "$ref": "#/components/schemas/Icon" }, "after": { "$ref": "#/components/schemas/Icon" } } }, "emoji": { "type": "object", "properties": { "before": { "$ref": "#/components/schemas/Emoji" }, "after": { "$ref": "#/components/schemas/Emoji" } } } } }, "RevisionSemanticChangeTagEdited": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "tag_edited" ] }, "tag": { "$ref": "#/components/schemas/ChangedRevisionTag" }, "attributes": { "$ref": "#/components/schemas/RevisionTagChangeAttributes" } }, "required": [ "type", "tag", "attributes" ] }, "RevisionSemanticChange": { "oneOf": [ { "$ref": "#/components/schemas/RevisionSemanticChangePageCreated" }, { "$ref": "#/components/schemas/RevisionSemanticChangePageEdited" }, { "$ref": "#/components/schemas/RevisionSemanticChangePageDeleted" }, { "$ref": "#/components/schemas/RevisionSemanticChangePageMoved" }, { "$ref": "#/components/schemas/RevisionSemanticChangeFileCreated" }, { "$ref": "#/components/schemas/RevisionSemanticChangeFileEdited" }, { "$ref": "#/components/schemas/RevisionSemanticChangeFileDeleted" }, { "$ref": "#/components/schemas/RevisionSemanticChangeVariablesEdited" }, { "$ref": "#/components/schemas/RevisionSemanticChangeReusableContentCreated" }, { "$ref": "#/components/schemas/RevisionSemanticChangeReusableContentDeleted" }, { "$ref": "#/components/schemas/RevisionSemanticChangeReusableContentEdited" }, { "$ref": "#/components/schemas/RevisionSemanticChangeTagCreated" }, { "$ref": "#/components/schemas/RevisionSemanticChangeTagDeleted" }, { "$ref": "#/components/schemas/RevisionSemanticChangeTagEdited" } ] }, "RevisionSemanticChanges": { "type": "object", "properties": { "mergedFrom": { "description": "The change request object that initiated the changes in the case of a merge revision.", "$ref": "#/components/schemas/ChangeRequest" }, "changes": { "type": "array", "items": { "$ref": "#/components/schemas/RevisionSemanticChange" } }, "more": { "type": "number", "description": "How many changes were omitted because above the result limit" } }, "required": [ "changes" ] }, "UpdateCommentReplySchema": { "type": "object", "properties": { "body": { "description": "Content of the comment.", "$ref": "#/components/schemas/Document" }, "addedReactions": { "type": "array", "description": "Reactions to add to the comment.", "items": { "type": "string" } }, "removedReactions": { "type": "array", "description": "Reactions to remove from the comment.", "items": { "type": "string" } } } }, "MemberDisabledReason": { "type": "string", "description": "Why a member is disabled in an organization.\n\"billing\": The organization's plan has reached its maximum number of members.\n\"scim\": The member was deactivated by the organization's identity provider.\n\"admin\": An organization admin disabled the member.\n\"gitbook\": GitBook blocked the organization.\n", "enum": [ "billing", "scim", "admin", "gitbook" ] }, "MemberDisabled": { "description": "Why the member is disabled, or false when the member is active. A disabled member cannot access the organization or its content.", "oneOf": [ { "type": "boolean", "enum": [ false ] }, { "$ref": "#/components/schemas/MemberDisabledReason" } ] }, "OrganizationMember": { "type": "object", "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"member\"", "enum": [ "member" ] }, "id": { "type": "string", "description": "Unique identifier for the user." }, "role": { "$ref": "#/components/schemas/MemberRoleOrGuest" }, "user": { "$ref": "#/components/schemas/User" }, "disabled": { "$ref": "#/components/schemas/MemberDisabled" }, "directoryManagedBy": { "type": "string", "description": "Label of the identity provider connection that manages this membership." }, "joinedAt": { "description": "Date at which the user joined the organization.", "$ref": "#/components/schemas/Timestamp" }, "lastSeenAt": { "description": "Date at which the user was last seen active in the organization.", "$ref": "#/components/schemas/Timestamp" }, "sso": { "type": "boolean", "description": "Whether the user can login with SSO." }, "spaces": { "type": "number" }, "teams": { "type": "number" }, "sites": { "type": "number" } }, "required": [ "object", "id", "role", "user", "disabled", "joinedAt", "sso", "spaces", "teams", "sites" ] }, "IntegrationTitle": { "type": "string", "description": "Title of the integration", "minLength": 2, "maxLength": 30 }, "IntegrationDescription": { "type": "string", "description": "Description of the integration", "maxLength": 100 }, "IntegrationSummary": { "type": "string", "description": "Long form markdown summary of the integration", "maxLength": 2048 }, "IntegrationTarget": { "type": "string", "description": "The target on which the integration can operate and needs to be configured for", "enum": [ "all", "site", "space", "organization" ] }, "IntegrationVisibility": { "type": "string", "enum": [ "public", "private", "unlisted" ] }, "IntegrationScope": { "type": "string", "enum": [ "space:content:read", "space:content:write", "space:metadata:read", "space:metadata:write", "space:git:sync", "page:feedback:read", "site:metadata:read", "site:views:read", "site:script:inject", "site:script:cookies", "site:visitor:auth", "site:visitor:claims", "site:adaptive:read", "site:adaptive:write", "conversations:ingest", "openapi:read", "openapi:write" ] }, "IntegrationScopes": { "type": "array", "description": "Permissions that should be granted to the integration", "items": { "$ref": "#/components/schemas/IntegrationScope" } }, "IntegrationCategory": { "type": "string", "enum": [ "analytics", "collaboration", "content", "marketing", "visitor-auth", "other" ] }, "IntegrationCategories": { "type": "array", "description": "Categories for which the integration is listed in the marketplace", "items": { "$ref": "#/components/schemas/IntegrationCategory" } }, "IntegrationBlocks": { "type": "array", "description": "Custom blocks defined by this integration.", "items": { "$ref": "#/components/schemas/IntegrationBlock" } }, "IntegrationConfigurationComponent": { "type": "object", "description": "ContentKit component for configuration", "properties": { "componentId": { "type": "string", "description": "ID of the ContentKit component defined in the integration" } }, "required": [ "componentId" ] }, "IntegrationContentSource": { "type": "object", "description": "Definition of a content source provided by the integration.", "properties": { "id": { "type": "string", "description": "Unique ID in the integration for the source." }, "title": { "type": "string", "description": "Short descriptive title for the source.", "minLength": 2, "maxLength": 40 }, "description": { "type": "string", "description": "Long descriptive text for the source.", "minLength": 0, "maxLength": 150 }, "icon": { "type": "string", "description": "URL of the icon to represent this source." }, "configuration": { "$ref": "#/components/schemas/IntegrationConfigurationComponent" } }, "required": [ "id", "title", "configuration" ] }, "IntegrationPropertyTitle": { "type": "string", "description": "Property title for an integration configuration property", "minLength": 2, "maxLength": 50 }, "IntegrationConfigurationSchema": { "type": "object", "description": "Schema for a configuration", "properties": { "properties": { "type": "object", "additionalProperties": { "allOf": [ { "type": "object", "properties": { "title": { "$ref": "#/components/schemas/IntegrationPropertyTitle" }, "description": { "type": "string", "maxLength": 100 } } }, { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": [ "string" ] }, "default": { "type": "string" }, "completion_url": { "description": "If specified, this URL will be called to fetch suggestions for auto-completing the property.", "type": "string" }, "enum": { "type": "array", "description": "If specified, only values from this array are allowed as inputs.", "items": { "type": "string" } } }, "required": [ "type" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "number" ] }, "default": { "type": "number" } }, "required": [ "type" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "boolean" ] }, "default": { "type": "boolean" } }, "required": [ "type" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "button" ] }, "callback_url": { "type": "string" }, "button_text": { "type": "string" } }, "required": [ "type", "callback_url", "button_text" ] } ] } ] } }, "required": { "type": "array", "uniqueItems": true, "items": { "type": "string" } } }, "required": [ "properties" ] }, "IntegrationConfiguration": { "oneOf": [ { "$ref": "#/components/schemas/IntegrationConfigurationSchema" }, { "$ref": "#/components/schemas/IntegrationConfigurationComponent" } ] }, "IntegrationConfigurations": { "type": "object", "properties": { "account": { "$ref": "#/components/schemas/IntegrationConfiguration" }, "space": { "$ref": "#/components/schemas/IntegrationConfiguration" }, "site": { "$ref": "#/components/schemas/IntegrationConfiguration" } } }, "IntegrationExternalLinks": { "type": "array", "description": "External urls configured by the developer of the integration", "maxItems": 5, "items": { "type": "object", "properties": { "url": { "$ref": "#/components/schemas/URL" }, "label": { "type": "string" } }, "required": [ "url", "label" ] } }, "OrganizationTitle": { "type": "string", "description": "Name of the organization", "minLength": 2, "maxLength": 255, "pattern": "\\S.*\\S" }, "OrganizationEmailDomains": { "type": "array", "items": { "type": "string" } }, "OrganizationHostname": { "type": "string", "description": "Default hostname for the organization's public content, e.g. <org-hostname>.gitbook.io", "minLength": 3, "maxLength": 32 }, "OrganizationType": { "type": "string", "enum": [ "business", "community" ] }, "OrganizationUseCase": { "type": "string", "enum": [ "internalDocs", "docsSite", "audienceControlledSite", "productDocs", "teamKnowledgeBase", "designSystem", "openSourceDocs", "notes", "other" ] }, "OrganizationCommunityType": { "type": "string", "enum": [ "nonProfit", "openSource", "education" ] }, "SitePointer": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "site" ] }, "site": { "type": "string", "description": "Unique identifier for the site" } }, "required": [ "type", "site" ] }, "OrganizationDefaultContent": { "description": "The default content for the organization", "oneOf": [ { "$ref": "#/components/schemas/SitePointer" } ] }, "AICreditThreshold": { "description": "An AI credit threshold from 5% to 50%, or null when disabled.", "oneOf": [ { "type": "number", "minimum": 5, "maximum": 50 }, { "type": "null" } ] }, "OrganizationAISettings": { "type": "object", "description": "AI preferences. Missing feature keys leave features enabled, subject to the master AI setting and feature eligibility.", "additionalProperties": false, "properties": { "ai-agent": { "type": "boolean", "enum": [ false ] }, "ai-assistant": { "type": "boolean", "enum": [ false ] }, "ai-broken-links": { "type": "boolean", "enum": [ false ] }, "ai-content-gap": { "type": "boolean", "enum": [ false ] }, "ai-insight": { "type": "boolean", "enum": [ false ] }, "ai-import": { "type": "boolean", "enum": [ false ] }, "ai-platform": { "type": "boolean", "enum": [ false ] }, "ai-style-guide": { "type": "boolean", "enum": [ false ] }, "ai-translation": { "type": "boolean", "enum": [ false ] }, "aiCreditAlertThreshold": { "$ref": "#/components/schemas/AICreditThreshold" }, "aiCreditPauseEnabled": { "description": "Whether AI features pause automatically once all AI credits are used, before usage is billed as overage.", "type": "boolean" }, "aiAlertNotificationAlertId": { "type": "string", "readOnly": true }, "aiPauseNotificationAlertId": { "type": "string", "readOnly": true } } }, "BillingProduct": { "type": "string", "description": "Name of the product", "enum": [ "free_2024", "plus_2024", "pro_2024", "enterprise_2024", "community_2024", "internal" ] }, "BillingInterval": { "type": "string", "description": "Interval for a billing subscription", "enum": [ "monthly", "yearly" ] }, "OrganizationPricePair": { "type": "object", "description": "Pricing pair for monthly and yearly intervals", "properties": { "monthly": { "type": "number", "description": "Monthly price in USD", "minimum": 0 }, "yearly": { "type": "number", "description": "Yearly price in USD (per month)", "minimum": 0 } }, "required": [ "monthly", "yearly" ] }, "OrganizationPricing": { "type": "object", "description": "Pricing information for an organization", "properties": { "members": { "type": "object", "description": "Pricing for members (organization plan)", "properties": { "plus_2024": { "$ref": "#/components/schemas/OrganizationPricePair" }, "pro_2024": { "$ref": "#/components/schemas/OrganizationPricePair" } }, "required": [ "plus_2024", "pro_2024" ], "additionalProperties": false }, "sites": { "type": "object", "description": "Pricing for site types (site plans)", "properties": { "premium": { "$ref": "#/components/schemas/OrganizationPricePair" }, "ultimate": { "$ref": "#/components/schemas/OrganizationPricePair" } }, "required": [ "premium", "ultimate" ], "additionalProperties": false } }, "required": [ "members", "sites" ] }, "BillingMeterAddon": { "type": "object", "properties": { "enabled": { "type": "boolean" } }, "required": [ "enabled" ] }, "BillingCreditsBundle": { "type": "string", "description": "The AI credit bundle to top up every month", "enum": [ "none", "4750_250", "9000_1000", "12750_2250", "30000_10000" ] }, "OrganizationBilling": { "type": "object", "properties": { "interval": { "$ref": "#/components/schemas/BillingInterval" }, "endDate": { "oneOf": [ { "$ref": "#/components/schemas/Timestamp" }, { "type": "null" } ] }, "hasPaymentFailed": { "description": "If true, we were unable to collect the last payment", "type": "boolean" }, "canCheckout": { "description": "If true, organization can create a checkout session to subscribe/update billing. \nIf false, organization must resolve other billing issues before a checkout can be done.\n", "type": "boolean" }, "isScheduledToCancel": { "description": "If true, the billing is set to cancel at the end of its current period", "type": "boolean" }, "pricing": { "description": "Pricing information for the organization", "$ref": "#/components/schemas/OrganizationPricing" }, "usageAddons": { "description": "Configuration for the usage-based addons", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/BillingMeterAddon" } }, "minUsers": { "description": "The minimum number of members allowed for this organization.", "type": "number" }, "maxUsers": { "description": "The maximum number of members allowed for this organization", "type": "number" }, "minPremiumSites": { "description": "The minimum number of premium sites allowed for this organization.", "type": "number" }, "maxPremiumSites": { "description": "The maximum number of premium sites allowed for this organization.", "type": "number" }, "minUltimateSites": { "description": "The minimum number of ultimate sites allowed for this organization.", "type": "number" }, "maxUltimateSites": { "description": "The maximum number of ultimate sites allowed for this organization.", "type": "number" }, "paidMembers": { "description": "The number of paid members on the current subscription.", "type": "number" }, "paidPremiumSites": { "description": "The number of paid premium sites on the current subscription.", "type": "number" }, "paidUltimateSites": { "description": "The number of paid ultimate sites on the current subscription.", "type": "number" }, "canChangeInterval": { "description": "Whether changing billing interval is allowed", "type": "boolean" }, "canUseSAML": { "description": "Whether configuring SAML is allowed", "type": "boolean" }, "canUseAI": { "description": "Whether AI can be enabled for the organization", "type": "boolean" }, "creditsBundle": { "description": "The AI credit bundle the organization tops up every month, or null when the organization is not billed for AI usage. `none` means pay as you go.", "oneOf": [ { "$ref": "#/components/schemas/BillingCreditsBundle" }, { "type": "null" } ] }, "aiCreditAllowance": { "description": "The yearly AI credit allowance agreed in the organization's contract, or null when none is set.", "oneOf": [ { "type": "integer" }, { "type": "null" } ] }, "aiCreditRollover": { "description": "The percentage of unused paid bundle credits carried over to the next monthly AI billing period.", "type": "integer", "minimum": 0, "maximum": 100 } }, "required": [ "interval", "endDate", "hasPaymentFailed", "canCheckout", "isScheduledToCancel", "pricing", "usageAddons", "canChangeInterval", "canUseSAML", "canUseAI", "creditsBundle", "aiCreditAllowance", "aiCreditRollover" ] }, "OrganizationSupportCost": { "description": "What support costs the organization, per ticket or per hour of agent time, used to estimate how much AI answers save in site insights.", "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "perTicket": { "type": "number", "minimum": 0.01, "description": "Cost of one support ticket, in `currency`." }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "ISO 4217 currency code." } }, "required": [ "perTicket", "currency" ] }, { "type": "object", "additionalProperties": false, "properties": { "perHour": { "type": "number", "minimum": 0.01, "description": "Cost of one hour of support agent time, in `currency`." }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "ISO 4217 currency code." } }, "required": [ "perHour", "currency" ] } ] }, "BillingTrialStatus": { "type": "string", "description": "- notapplicable, no trial can be started for this organization. - none, no trial has been started yet. - active, trial is active. - ended, the trial has ended and the user has choosen to stay on the free plan or has upgraded to a paid plan. - expired, the trial has ended but the user hasn't deciced yet what to do.\n", "enum": [ "notapplicable", "none", "active", "ended", "expired" ] }, "BlockSource": { "type": "string", "description": "Source for an organization block", "enum": [ "backoffice", "external", "internal" ] }, "BlockReason": { "type": "string", "description": "A short description giving context on the reason for the block.", "minLength": 1, "maxLength": 255 }, "Organization": { "type": "object", "description": "Non-members of the organization only receive `object`, `id`, `title`, `sso`, `inviteLinks`, `urls`, `blocked` and `permissions`.", "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"organization\"", "enum": [ "organization" ] }, "id": { "type": "string", "description": "Unique identifier for the organization" }, "title": { "$ref": "#/components/schemas/OrganizationTitle" }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "emailDomains": { "$ref": "#/components/schemas/OrganizationEmailDomains" }, "hostname": { "$ref": "#/components/schemas/OrganizationHostname" }, "type": { "$ref": "#/components/schemas/OrganizationType" }, "useCase": { "$ref": "#/components/schemas/OrganizationUseCase" }, "communityType": { "$ref": "#/components/schemas/OrganizationCommunityType" }, "defaultRole": { "$ref": "#/components/schemas/MemberRoleOrGuest" }, "defaultContent": { "$ref": "#/components/schemas/OrganizationDefaultContent" }, "sso": { "description": "Whether SSO is enforced organization-wide. Requires an active SAML provider and at least one organization admin linked through SSO.", "type": "boolean" }, "ssoPreference": { "description": "Whether Enforce SSO is turned on, regardless of whether its requirements are met.", "type": "boolean" }, "ssoRequired": { "description": "Whether Enforce SSO applies to the current user, because one of the organization's SAML providers can sign in their email. Members no provider can sign in keep their other sign-in methods.", "type": "boolean" }, "ai": { "description": "If true, the organization is configured to use all our AI features.", "type": "boolean" }, "aiPreference": { "description": "Whether the master AI setting is turned on, regardless of plan availability. Contract overrides forcing AI off take precedence.", "type": "boolean" }, "aiSettings": { "$ref": "#/components/schemas/OrganizationAISettings" }, "aiPaused": { "description": "Whether AI features have been paused automatically due to lack of AI credits.", "type": "boolean" }, "inviteLinks": { "description": "If true, invite links are enabled for this organization.", "type": "boolean" }, "auditLogs": { "description": "Whether audit logs can currently be accessed for this organization.", "type": "boolean" }, "plan": { "$ref": "#/components/schemas/BillingProduct" }, "billing": { "description": "Billing details, only available for org members.", "$ref": "#/components/schemas/OrganizationBilling" }, "mergeRules": { "$ref": "#/components/schemas/MergeRulesStandaloneConfiguration" }, "supportCost": { "description": "Support cost set by the organization, only available for org members.", "$ref": "#/components/schemas/OrganizationSupportCost" }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "location": { "type": "string", "description": "URL of the organization in the API", "format": "uri" }, "app": { "type": "string", "description": "URL of the organization in the application", "format": "uri" }, "logo": { "description": "URL of the logo of this organization, if defined.", "$ref": "#/components/schemas/URL" } }, "required": [ "app", "location" ] }, "trial": { "type": "object", "properties": { "status": { "$ref": "#/components/schemas/BillingTrialStatus" }, "count": { "type": "integer", "description": "Number of trials the organization has consumed." }, "endDate": { "description": "The trial's end date, if the organization has or had a trial.", "$ref": "#/components/schemas/Timestamp" }, "decision": { "type": "string", "description": "The decision taken by the user at the end of the trial", "enum": [ "downgrade" ] } }, "required": [ "status", "count" ] }, "customHostname": { "description": "Custom hostname linked to this organization", "type": "string" }, "blocked": { "type": "object", "description": "If the organization is blocked, information about the block will appear here", "properties": { "source": { "$ref": "#/components/schemas/BlockSource" }, "reason": { "$ref": "#/components/schemas/BlockReason" } }, "required": [ "reason" ] }, "permissions": { "type": "object", "description": "The set of permissions for the organization", "properties": { "view": { "type": "boolean", "description": "Can the user view the organization." }, "access": { "type": "boolean", "description": "Can the user view the organization in the application." }, "admin": { "type": "boolean", "description": "Can the user manage the title, members, etc." }, "ownTeam": { "type": "boolean", "description": "Is the user a team owner." }, "createContent": { "type": "boolean", "description": "Can the user create new spaces/collections in the organization." }, "createOpenAPISpec": { "type": "boolean", "description": "Can the user create new OpenAPI specifications." }, "viewBilling": { "type": "boolean", "description": "Can the user view the billing details of the organization." }, "listMembers": { "type": "boolean", "description": "Can the user list the members of the organization." }, "listTeams": { "type": "boolean", "description": "Can the user list the teams in the organization." }, "listIntegrations": { "type": "boolean", "description": "Can the user list the integrations in the organization." }, "listInstallations": { "type": "boolean", "description": "Can the user list the integration installations in the organization." }, "installIntegration": { "type": "boolean", "description": "Can the user install integrations in the organization." } }, "required": [ "view", "access", "admin", "ownTeam", "createContent", "createOpenAPISpec", "viewBilling", "listMembers", "listTeams", "listIntegrations", "listInstallations", "installIntegration" ] } }, "required": [ "object", "id", "title", "inviteLinks", "urls", "permissions" ] }, "IntegrationContentSecurityPolicy": { "description": "Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as \nheaders when processing the script fetch event and the blocks fetch events.\n", "oneOf": [ { "type": "string" }, { "type": "object", "properties": { "base-uri": { "type": "string" }, "block-all-mixed-content": { "type": "string" }, "child-src": { "type": "string" }, "connect-src": { "type": "string" }, "default-src": { "type": "string" }, "font-src": { "type": "string" }, "form-action": { "type": "string" }, "frame-ancestors": { "type": "string" }, "frame-src": { "type": "string" }, "img-src": { "type": "string" }, "manifest-src": { "type": "string" }, "media-src": { "type": "string" }, "navigate-to": { "type": "string" }, "object-src": { "type": "string" }, "plugin-types": { "type": "string" }, "prefetch-src": { "type": "string" }, "referrer": { "type": "string" }, "report-to": { "type": "string" }, "report-uri": { "type": "string" }, "require-sri-for": { "type": "string" }, "require-trusted-types-for": { "type": "string" }, "sandbox": { "type": "string" }, "script-src": { "type": "string" }, "script-src-attr": { "type": "string" }, "script-src-elem": { "type": "string" }, "style-src": { "type": "string" }, "style-src-attr": { "type": "string" }, "style-src-elem": { "type": "string" }, "trusted-types": { "type": "string" }, "upgrade-insecure-requests": { "type": "string" }, "worker-src": { "type": "string" } } } ] }, "Integration": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "integration" ] }, "name": { "type": "string", "description": "Unique named identifier for the integration" }, "version": { "type": "number", "description": "Version of the integration" }, "title": { "$ref": "#/components/schemas/IntegrationTitle" }, "description": { "$ref": "#/components/schemas/IntegrationDescription" }, "summary": { "$ref": "#/components/schemas/IntegrationSummary" }, "previewImages": { "type": "array", "description": "URLs of images to showcase the integration", "maxItems": 3, "items": { "type": "string" } }, "target": { "$ref": "#/components/schemas/IntegrationTarget" }, "verified": { "type": "boolean", "description": "If true, the integration has been verified by the GitBook team" }, "visibility": { "$ref": "#/components/schemas/IntegrationVisibility" }, "scopes": { "$ref": "#/components/schemas/IntegrationScopes" }, "categories": { "$ref": "#/components/schemas/IntegrationCategories" }, "blocks": { "$ref": "#/components/schemas/IntegrationBlocks" }, "contentSources": { "type": "array", "items": { "$ref": "#/components/schemas/IntegrationContentSource" } }, "configurations": { "$ref": "#/components/schemas/IntegrationConfigurations" }, "externalLinks": { "$ref": "#/components/schemas/IntegrationExternalLinks" }, "owner": { "$ref": "#/components/schemas/Organization" }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "location": { "type": "string", "description": "URL of the integration in the API", "format": "uri" }, "icon": { "type": "string", "description": "URL of the icon associated to the integration", "format": "uri" }, "app": { "type": "string", "description": "URL of the integration in the application", "format": "uri" }, "assets": { "type": "string", "description": "URL of the integration's assets.", "format": "uri" }, "publicEndpoint": { "type": "string", "description": "Public HTTP endpoint for the integration", "format": "uri" }, "publicContentEndpoint": { "type": "string", "description": "Public endpoint serving the integration's rendered content (e.g. WebFrames), isolated from the cookie-bearing publicEndpoint origin. Equals publicEndpoint when no separate content origin is configured.", "format": "uri" } }, "required": [ "location", "app", "assets", "publicEndpoint", "publicContentEndpoint" ] }, "permissions": { "type": "object", "description": "The set of permissions for the integration", "properties": { "admin": { "type": "boolean" } }, "required": [ "admin" ] }, "contentSecurityPolicy": { "$ref": "#/components/schemas/IntegrationContentSecurityPolicy" } }, "required": [ "object", "name", "version", "title", "scopes", "categories", "visibility", "target", "verified", "previewImages", "externalLinks", "owner", "permissions", "urls" ] }, "SpaceIntegrationBlocks": { "type": "array", "items": { "type": "object", "required": [ "name", "blocks" ], "properties": { "name": { "type": "string", "description": "Unique named identifier for the integration" }, "blocks": { "type": "array", "items": { "$ref": "#/components/schemas/IntegrationBlock" } } } } }, "CollectionTitle": { "type": "string", "description": "Title of the collection", "maxLength": 50 }, "CollectionDescription": { "type": "string", "description": "Description of the collection", "minLength": 0, "maxLength": 100 }, "Collection": { "type": "object", "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"collection\"", "enum": [ "collection" ] }, "id": { "type": "string", "description": "Unique identifier for the collection" }, "title": { "$ref": "#/components/schemas/CollectionTitle" }, "description": { "$ref": "#/components/schemas/CollectionDescription" }, "organization": { "type": "string", "description": "ID of the organization owning this collection" }, "parent": { "type": "string", "description": "ID of the parent collection, if any" }, "defaultLevel": { "$ref": "#/components/schemas/DefaultLevel" }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "location": { "type": "string", "description": "URL of the collection in the API", "format": "uri" }, "app": { "type": "string", "description": "URL of the collection in the application", "format": "uri" } }, "required": [ "app", "location" ] }, "permissions": { "type": "object", "description": "The set of permissions for the collection", "properties": { "view": { "type": "boolean", "description": "Can the user view the collection." }, "admin": { "type": "boolean", "description": "Can the user edit the title/description." }, "viewInviteLinks": { "type": "boolean", "description": "Can the user view the invite links of the collection." }, "create": { "type": "boolean", "description": "Can the user create spaces/collections in this collection." } }, "required": [ "view", "admin", "viewInviteLinks", "create" ] } }, "required": [ "object", "id", "title", "organization", "urls", "defaultLevel", "permissions" ] }, "IntegrationSecrets": { "type": "object", "description": "Secrets stored on the integration and passed at runtime.", "properties": {}, "maxProperties": 20, "additionalProperties": { "type": "string" } }, "PublishIntegration": { "type": "object", "properties": { "runtime": { "type": "string", "description": "The runtime version to use for the integration. If not specified, the integration will use the default runtime.", "default": "v1", "enum": [ "v1", "v2" ] }, "icon": { "type": "string", "format": "byte", "description": "Base64 content of the icon" }, "title": { "$ref": "#/components/schemas/IntegrationTitle" }, "description": { "$ref": "#/components/schemas/IntegrationDescription" }, "summary": { "$ref": "#/components/schemas/IntegrationSummary" }, "previewImages": { "type": "array", "maxItems": 3, "items": { "type": "string", "format": "byte", "description": "Base64 content of the image" } }, "visibility": { "$ref": "#/components/schemas/IntegrationVisibility" }, "target": { "description": "Allowed installation target for the integration. If not specified, the integration can be installed at `all` targets (org, spaces etc)", "$ref": "#/components/schemas/IntegrationTarget" }, "scopes": { "$ref": "#/components/schemas/IntegrationScopes" }, "categories": { "$ref": "#/components/schemas/IntegrationCategories" }, "blocks": { "$ref": "#/components/schemas/IntegrationBlocks" }, "contentSources": { "type": "array", "items": { "$ref": "#/components/schemas/IntegrationContentSource" } }, "externalLinks": { "$ref": "#/components/schemas/IntegrationExternalLinks" }, "configurations": { "$ref": "#/components/schemas/IntegrationConfigurations" }, "script": { "type": "string", "description": "Content of the script to use" }, "organization": { "type": "string", "description": "The ID or subdomain of the organization under which the integration should be published" }, "secrets": { "$ref": "#/components/schemas/IntegrationSecrets" }, "contentSecurityPolicy": { "$ref": "#/components/schemas/IntegrationContentSecurityPolicy" } }, "required": [ "organization", "title", "description", "script", "scopes" ] }, "IntegrationInstallationStatus": { "type": "string", "enum": [ "active", "pending", "paused" ] }, "IntegrationInstallationSpaceSelection": { "type": "string", "description": "Describe whether all spaces have been selected or there's a selection involved", "enum": [ "all", "selected" ] }, "IntegrationInstallationSiteSelection": { "type": "string", "description": "Describe whether all sites have been selected or there's a selection involved", "enum": [ "all", "selected" ] }, "IntegrationInstallationConfiguration": { "type": "object", "description": "Configuration of the integration. For user authentication, oauth_credentials is returned as a boolean indicating whether a connection is configured. When replacing the configuration, send true to preserve the existing connection, or omit the field to clear it. Only the integration or the matching installation can read or set the OAuth credentials.\n", "additionalProperties": true }, "IntegrationInstallationExternalIds": { "type": "array", "description": "External IDs assigned by the integration.", "maxItems": 5, "items": { "type": "string" } }, "OrganizationTarget": { "type": "object", "required": [ "organization" ], "properties": { "organization": { "type": "string" } } }, "IntegrationInstallationTarget": { "oneOf": [ { "$ref": "#/components/schemas/OrganizationTarget" } ] }, "IntegrationNetwork": { "type": "object", "description": "Network configuration for the installation", "properties": { "proxy": { "type": "boolean", "description": "Whether the installation is proxied through the backend" } } }, "IntegrationInstallation": { "type": "object", "description": "Installation of an integration on an account", "properties": { "id": { "type": "string" }, "status": { "$ref": "#/components/schemas/IntegrationInstallationStatus" }, "space_selection": { "$ref": "#/components/schemas/IntegrationInstallationSpaceSelection" }, "site_selection": { "$ref": "#/components/schemas/IntegrationInstallationSiteSelection" }, "spaces": { "type": "number", "description": "Count of spaces, the installation is managing" }, "configuration": { "$ref": "#/components/schemas/IntegrationInstallationConfiguration" }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "updatedAt": { "$ref": "#/components/schemas/Timestamp" }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "location": { "type": "string", "description": "URL of the installation in the API", "format": "uri" }, "app": { "type": "string", "description": "URL of the integration's installation in the application", "format": "uri" }, "publicEndpoint": { "type": "string", "description": "Public HTTP endpoint for the integration's installation", "format": "uri" }, "publicContentEndpoint": { "type": "string", "description": "Public endpoint serving the integration's rendered content (e.g. WebFrames), isolated from the cookie-bearing publicEndpoint origin. Equals publicEndpoint when no separate content origin is configured.", "format": "uri" } }, "required": [ "location", "app", "publicEndpoint", "publicContentEndpoint" ] }, "externalIds": { "$ref": "#/components/schemas/IntegrationInstallationExternalIds" }, "target": { "$ref": "#/components/schemas/IntegrationInstallationTarget", "description": "Target of the integration installation" }, "network": { "$ref": "#/components/schemas/IntegrationNetwork", "description": "Network configuration for the installation" } }, "required": [ "id", "status", "space_selection", "site_selection", "spaces", "configuration", "urls", "externalIds", "target", "createdAt", "updatedAt" ] }, "IntegrationEventDiagnosticPayload": { "type": "object", "description": "Safe diagnostic metadata for an integration event. This is not the event delivered to the integration. Configuration snapshots, request bodies and headers, URLs, visitor data, task and UI payloads, provider responses and arbitrary custom fields are omitted.", "additionalProperties": false, "required": [ "type", "eventId" ], "properties": { "type": { "type": "string", "description": "Event type, or unknown for an unrecognized or malformed historical payload.", "enum": [ "installation_setup", "installation_deleted", "space_installation_setup", "space_installation_deleted", "site_installation_setup", "site_installation_deleted", "site_view", "space_content_updated", "space_gitsync_completed", "space_gitsync_started", "space_visibility_updated", "task", "fetch", "fetch_published_script", "fetch_visitor_authentication", "ui_render", "content_compute_document", "content_compute_revision", "page_feedback", "unknown" ] }, "eventId": { "type": "string" }, "installationId": { "type": "string" }, "siteId": { "type": "string" }, "spaceId": { "type": "string" }, "pageId": { "type": "string" }, "revisionId": { "type": "string" } } }, "IntegrationEvent": { "type": "object", "description": "Diagnostic metadata for a delivered event, including historical records. The payload is intentionally limited to event type and identifiers; it is not the full runtime event. Events and configuration delivered to the integration runtime are unaffected.", "properties": { "id": { "type": "string", "description": "Unique ID of the event." }, "integrationId": { "type": "string", "description": "Unique ID of the integration." }, "installationId": { "type": "string", "description": "Unique ID of the integration installation." }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "payload": { "$ref": "#/components/schemas/IntegrationEventDiagnosticPayload" }, "rayId": { "type": "string", "description": "Correlation ID of the integration execution." }, "statusCode": { "type": "integer", "minimum": 100, "maximum": 599, "description": "HTTP status of the integration execution, when available." }, "errorCategory": { "type": "string", "description": "Stable failure category. Raw error messages are never returned.", "enum": [ "http_error", "execution_error" ] }, "status": { "type": "string", "description": "Status of the event.", "enum": [ "success", "failed" ] } }, "required": [ "id", "integrationId", "createdAt", "payload", "status" ] }, "IntegrationEventLog": { "type": "object", "properties": { "message": { "description": "The message of the log entry.", "type": "string" }, "timestamp": { "$ref": "#/components/schemas/Timestamp" }, "level": { "description": "The level of the log entry.", "type": "string", "enum": [ "debug", "info", "warn", "error" ] } } }, "IntegrationEventTrace": { "type": "object", "description": "Safe execution metadata. Worker log and exception text are suppressed.", "required": [ "logs" ], "properties": { "logs": { "type": "array", "description": "Always empty until a safe diagnostic log format is available.", "items": { "$ref": "#/components/schemas/IntegrationEventLog" } }, "rayId": { "type": "string", "description": "Correlation ID of the integration execution." }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "outcome": { "type": "string", "enum": [ "ok", "exception", "exceededCpu", "exceededMemory", "canceled", "unknown" ] }, "statusCode": { "type": "integer", "minimum": 100, "maximum": 599 } } }, "IntegrationContentInstallationBase": { "type": "object", "description": "Base properties of an installation of an integration on a site or space.", "properties": { "integration": { "description": "Unique name identifier of the integration", "type": "string" }, "installation": { "description": "ID of the integration installation", "type": "string" }, "status": { "$ref": "#/components/schemas/IntegrationInstallationStatus" }, "configuration": { "description": "Configuration for this site or space. For user authentication, oauth_credentials is returned as a boolean connection indicator. Send true when saving to preserve the connection, or omit the field to clear it. Only the integration or the matching installation can read or set OAuth credentials.\n", "type": "object" }, "externalIds": { "$ref": "#/components/schemas/IntegrationInstallationExternalIds" }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "location": { "type": "string", "description": "URL of the integration's installation in the API", "format": "uri" }, "publicEndpoint": { "type": "string", "description": "Public HTTP endpoint for the integration's installation", "format": "uri" }, "publicContentEndpoint": { "type": "string", "description": "Public endpoint serving the integration's rendered content (e.g. WebFrames), isolated from the cookie-bearing publicEndpoint origin. Equals publicEndpoint when no separate content origin is configured.", "format": "uri" } }, "required": [ "location", "publicEndpoint", "publicContentEndpoint" ] } }, "required": [ "integration", "installation", "status", "configuration", "externalIds", "urls" ] }, "IntegrationSpaceInstallation": { "allOf": [ { "$ref": "#/components/schemas/IntegrationContentInstallationBase" }, { "type": "object", "properties": { "space": { "description": "The space the integration is installed on. Using the string value is deprecated in favor of space.id", "oneOf": [ { "type": "string" }, { "$ref": "#/components/schemas/Space" } ] } }, "required": [ "space" ] } ] }, "SiteType": { "type": "string", "description": "The type of the site", "enum": [ "basic", "premium", "ultimate", "sponsored" ] }, "SiteHostname": { "type": "string", "description": "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]$", "maxLength": 512 }, "SiteBasename": { "type": "string", "description": "Basename for the site. For e.g. api", "minLength": 1, "maxLength": 100 }, "SiteProxyOrigin": { "type": "string", "description": "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-]+)+$", "maxLength": 512 }, "SiteProxy": { "type": "object", "properties": { "origin": { "$ref": "#/components/schemas/SiteProxyOrigin" }, "target": { "type": "string", "description": "The target URL to which the requests at the origin URL should be proxied to." } }, "required": [ "origin", "target" ] }, "SiteVisibility": { "type": "string", "description": "The visibility setting of the site determines the audience of the site.\n* `public`: Anyone can access the site, and the site is indexed by search engines.\n* `unlisted`: Anyone can access the site, and the site is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the site.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the site.\n", "enum": [ "public", "unlisted", "share-link", "visitor-auth" ] }, "SiteAdaptiveContent": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Whether adaptive content should be enabled on the site." } }, "required": [ "enabled" ] }, "SiteAdsTopic": { "type": "string", "description": "Topic of the content", "enum": [ "webdev", "crypto" ] }, "SiteAds": { "oneOf": [ { "type": "object", "required": [ "status", "submittable" ], "properties": { "status": { "type": "string", "enum": [ "pending" ] }, "submittable": { "type": "boolean", "description": "True if the user can submit the site for review." } } }, { "type": "object", "required": [ "status", "topic" ], "properties": { "status": { "type": "string", "enum": [ "in-review" ] }, "topic": { "$ref": "#/components/schemas/SiteAdsTopic" } } }, { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "string", "enum": [ "rejected" ] }, "reason": { "type": "string", "description": "Reason for the rejection" } } }, { "type": "object", "required": [ "status", "topic", "zoneId" ], "properties": { "status": { "type": "string", "enum": [ "live", "disabled" ] }, "topic": { "$ref": "#/components/schemas/SiteAdsTopic" }, "zoneId": { "type": "string", "description": "The ad network zone ID" } } } ] }, "SiteFeatureKey": { "type": "string", "description": "The site feature identifier", "enum": [ "sites-adaptive-content", "sites-advanced-customization", "sites-advanced-insights", "sites-ads", "sites-ai-search", "sites-ai-assistant", "sites-ai-insights", "sites-fix-broken-links", "sites-connections", "sites-content-gaps", "sites-channels", "sites-embed", "sites-api-playground", "sites-basic-customization", "sites-broken-links", "sites-custom-domain", "sites-custom-subdirectory", "sites-full-text-search", "sites-multivariant-site", "sites-no-custom-domain", "sites-page-feedback", "sites-page-traffic-insights", "sites-pdf-export", "sites-preview-deployments", "sites-public-visibility", "sites-redirects", "sites-search-insights", "sites-sections", "sites-seo", "sites-share-links", "sites-style-guide", "sites-unlisted-visibility", "sites-user-contribution", "sites-visitor-authentication", "sites-visitors" ] }, "SiteCustomizationFeature": { "type": "string", "description": "A list of all premium customizations.", "enum": [ "header-logo", "header-primary-link", "theme-preset", "premium-fonts", "custom-icons", "footer-logo", "footer-links", "footer-copyright", "semantic-colors" ] }, "SiteFeature": { "type": "object", "description": "A site feature and the plan it is available on.", "properties": { "id": { "$ref": "#/components/schemas/SiteFeatureKey" }, "plan": { "$ref": "#/components/schemas/SiteType" }, "frozen": { "description": "A frozen feature is still enabled but cannot be changed or modified.", "type": "boolean" }, "customizations": { "description": "A list of the actual advanced customizations used (only applicable for sites-advanced-customization)", "type": "array", "items": { "$ref": "#/components/schemas/SiteCustomizationFeature" } } }, "required": [ "id", "plan", "frozen" ] }, "Site": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "site" ] }, "id": { "type": "string", "description": "Unique identifier of the site" }, "type": { "$ref": "#/components/schemas/SiteType" }, "appliedType": { "$ref": "#/components/schemas/SiteType", "description": "The currently applied type of the site. For example, frozen sites will have this set to Basic." }, "unpublishedBy": { "type": "string", "enum": [ "user", "system" ], "description": "Who unpublished this site last. Cleared when the site is published again." }, "title": { "$ref": "#/components/schemas/SiteTitle" }, "icon": { "oneOf": [ { "$ref": "#/components/schemas/CustomizationFavicon" }, { "type": "null" } ] }, "hostname": { "$ref": "#/components/schemas/SiteHostname" }, "basename": { "$ref": "#/components/schemas/SiteBasename" }, "proxy": { "$ref": "#/components/schemas/SiteProxy" }, "visibility": { "$ref": "#/components/schemas/SiteVisibility" }, "defaultLevel": { "$ref": "#/components/schemas/DefaultLevel" }, "permissions": { "type": "object", "description": "The set of permissions for the site.", "properties": { "view": { "type": "boolean", "description": "Can the user view the site." }, "access": { "type": "boolean", "description": "Can the user access the site in the application." }, "edit": { "type": "boolean", "description": "Can the user edit content and create draft content in the site." }, "create": { "type": "boolean", "description": "Can the user create draft content, publish content, and manage the site's content structure." }, "admin": { "type": "boolean", "description": "Can the user manage the site content, settings and publish the site." }, "installIntegration": { "type": "boolean", "description": "Can the user install integrations on the site." }, "viewAdaptiveSchema": { "type": "boolean", "description": "Can the user view the adaptive schema of the site." }, "editAdaptiveSchema": { "type": "boolean", "description": "Can the user edit the adaptive schema of the site." } }, "required": [ "view", "access", "edit", "create", "admin", "installIntegration", "viewAdaptiveSchema", "editAdaptiveSchema" ] }, "publicChangeRequestPreviews": { "type": "boolean", "description": "Whether visitors can preview change requests and historical revisions on the published site. Disabled for new sites. Existing sites keep their configured value. Previews inside GitBook are not affected." }, "published": { "type": "boolean", "description": "Whether the site is live or not. If true, the site is accessible to the audience defined by the visibility setting." }, "siteSpaces": { "type": "number" }, "gitSync": { "$ref": "#/components/schemas/GitSyncState" }, "createdAt": { "type": "string", "format": "date-time" }, "lastScanAt": { "type": "string", "format": "date-time", "description": "When GitBook last completed a scan of the site's content\ngaps. Absent until the site has been scanned at least once.\n" }, "adaptiveContent": { "$ref": "#/components/schemas/SiteAdaptiveContent" }, "ads": { "$ref": "#/components/schemas/SiteAds" }, "styleguide": { "$ref": "#/components/schemas/ContentRefSpace", "description": "Reference to a GitBook space holding the team's writing style guide.\nWhen present on a site, the editing agent receives the style guide\ntable of contents in its system prompt and can fetch sections on\ndemand to check edits against the rules.\n" }, "features": { "description": "A list of all premium features enabled on this site. For each feature we list the plan they belong to and whether the feature is frozen. A frozen feature is still enabled but cannot be changed or modified.\n", "type": "array", "items": { "$ref": "#/components/schemas/SiteFeature" } }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "location": { "type": "string", "description": "URL of the site in the API", "format": "uri" }, "app": { "type": "string", "description": "URL of the site in the application", "format": "uri" }, "published": { "type": "string", "description": "URL of the published version of the site. Only defined when site is published.", "format": "uri" }, "preview": { "type": "string", "description": "URL of the preview version of the site.", "format": "uri" }, "login": { "type": "string", "description": "URL of the login endpoint for visitors to authenticate with the site auth backend.\n", "format": "uri" }, "logout": { "type": "string", "description": "URL of the logout endpoint for visitors to sign out from the site auth backend.\n", "format": "uri" } }, "required": [ "app", "location", "preview" ] } }, "required": [ "object", "id", "type", "appliedType", "title", "visibility", "defaultLevel", "permissions", "published", "publicChangeRequestPreviews", "createdAt", "siteSpaces", "features", "urls" ] }, "IntegrationSiteInstallation": { "allOf": [ { "$ref": "#/components/schemas/IntegrationContentInstallationBase" }, { "type": "object", "properties": { "site": { "description": "The site the integration is installed on. Using the string value is deprecated in favor of site.id", "oneOf": [ { "type": "string" }, { "$ref": "#/components/schemas/Site" } ] } }, "required": [ "site" ] } ] }, "ContentKitIcon": { "type": "string", "enum": [ "close", "edit", "github", "gitlab", "maximize", "email", "settings", "search", "delete", "star", "warning", "link", "link-external", "eye", "eye-off", "lock", "check", "check-circle" ] }, "ContentKitConfirm": { "type": "object", "description": "A confirm object that defines an optional confirmation dialog after the input is clicked.", "properties": { "title": { "type": "string", "description": "A text value that defines the dialog's title.", "maxLength": 100 }, "text": { "type": "string", "description": "A text value that defines the explanatory text that appears in the confirm dialog.", "maxLength": 300 }, "confirm": { "type": "string", "description": "A text value to define the text of the button that confirms the action.", "maxLength": 30 }, "style": { "type": "string", "enum": [ "primary", "danger" ] } }, "required": [ "title", "text", "confirm" ] }, "ContentKitButton": { "type": "object", "description": "Pressable button triggering an action.", "properties": { "type": { "type": "string", "enum": [ "button" ] }, "style": { "type": "string", "enum": [ "primary", "secondary", "danger" ] }, "onPress": { "$ref": "#/components/schemas/ContentKitAction" }, "icon": { "$ref": "#/components/schemas/ContentKitIcon" }, "trailingIcon": { "$ref": "#/components/schemas/ContentKitIcon" }, "label": { "type": "string" }, "tooltip": { "type": "string" }, "confirm": { "$ref": "#/components/schemas/ContentKitConfirm" }, "disabled": { "type": "boolean" } }, "required": [ "type", "onPress" ] }, "ContentKitTextInput": { "type": "object", "description": "Text input to prompt the user.", "properties": { "type": { "type": "string", "enum": [ "textinput" ] }, "disabled": { "type": "boolean" }, "state": { "description": "State binding. The value of the input will be stored as a property in the state named after this ID.", "type": "string" }, "initialValue": { "description": "Text value to initialize the input with.", "type": "string" }, "placeholder": { "description": "Text that appears in the form control when it has no value set", "type": "string" }, "multiline": { "type": "boolean" }, "inputType": { "type": "string", "enum": [ "text", "password", "email" ], "default": "text" } }, "required": [ "type", "state" ] }, "ContentKitDescendantElement": { "description": "Any element that can be used as children.", "oneOf": [ { "$ref": "#/components/schemas/ContentKitButton" }, { "$ref": "#/components/schemas/ContentKitTextInput" }, { "$ref": "#/components/schemas/ContentKitHStack" }, { "$ref": "#/components/schemas/ContentKitVStack" }, { "$ref": "#/components/schemas/ContentKitBox" }, { "$ref": "#/components/schemas/ContentKitDivider" }, { "$ref": "#/components/schemas/ContentKitWebFrame" }, { "$ref": "#/components/schemas/ContentKitCodeBlock" }, { "$ref": "#/components/schemas/ContentKitMarkdown" }, { "$ref": "#/components/schemas/ContentKitCard" }, { "$ref": "#/components/schemas/ContentKitImage" }, { "$ref": "#/components/schemas/ContentKitInput" }, { "$ref": "#/components/schemas/ContentKitSelect" }, { "$ref": "#/components/schemas/ContentKitSwitch" }, { "$ref": "#/components/schemas/ContentKitCheckbox" }, { "$ref": "#/components/schemas/ContentKitRadio" }, { "$ref": "#/components/schemas/ContentKitText" }, { "$ref": "#/components/schemas/ContentKitHint" }, { "$ref": "#/components/schemas/ContentKitLink" }, { "$ref": "#/components/schemas/ContentKitStepperStep" } ], "discriminator": { "propertyName": "type" } }, "ContentKitHStack": { "type": "object", "description": "Horizontal stack of boxes.", "properties": { "type": { "type": "string", "enum": [ "hstack" ] }, "align": { "type": "string", "default": "start", "enum": [ "start", "center", "end" ] }, "children": { "type": "array", "items": { "$ref": "#/components/schemas/ContentKitDescendantElement" } } }, "required": [ "type", "children" ] }, "ContentKitVStack": { "type": "object", "description": "Vertical stack of boxes.", "properties": { "type": { "type": "string", "enum": [ "vstack" ] }, "align": { "type": "string", "default": "start", "enum": [ "start", "center", "end" ] }, "children": { "type": "array", "items": { "$ref": "#/components/schemas/ContentKitDescendantElement" } } }, "required": [ "type", "children" ] }, "ContentKitBox": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "box" ] }, "grow": { "description": "specifies how much of the remaining space in the container should be assigned to the element", "type": "number" }, "children": { "type": "array", "items": { "$ref": "#/components/schemas/ContentKitDescendantElement" } } }, "required": [ "type", "children" ] }, "ContentKitDivider": { "type": "object", "description": "Divider between 2 boxes in a stack.", "properties": { "type": { "type": "string", "enum": [ "divider" ] }, "size": { "type": "string", "enum": [ "small", "medium", "large" ] } }, "required": [ "type" ] }, "ContentKitDynamicBinding": { "type": "object", "description": "Binding between a property and a state value.", "properties": { "$state": { "type": "string", "description": "Key in the state" } }, "required": [ "$state" ] }, "ContentKitWebFrame": { "type": "object", "description": "Frame for a webpage", "properties": { "type": { "type": "string", "enum": [ "webframe" ] }, "aspectRatio": { "type": "number", "description": "Ratio between width and height. Used to size the webframe." }, "source": { "type": "object", "description": "Content to load in the frame.", "properties": { "url": { "type": "string" } }, "required": [ "url" ] }, "buttons": { "type": "array", "description": "Controls button shown as an overlay in a corner of the frame.", "items": { "$ref": "#/components/schemas/ContentKitButton" } }, "data": { "type": "object", "description": "Data to communicated to the webframe's content. Each state update will cause the webframe to receive a message.", "additionalProperties": { "oneOf": [ { "type": "string" }, { "$ref": "#/components/schemas/ContentKitDynamicBinding" } ] } } }, "required": [ "type", "source" ] }, "ContentKitCodeBlock": { "type": "object", "description": "Code block with syntax highlighting", "properties": { "type": { "type": "string", "enum": [ "codeblock" ] }, "content": { "oneOf": [ { "$ref": "#/components/schemas/ContentKitDynamicBinding" }, { "type": "string", "description": "Code content to display" } ] }, "syntax": { "description": "Syntax to use for highlighting (ex: javascript, python)", "type": "string" }, "lineNumbers": { "oneOf": [ { "type": "boolean" }, { "type": "number", "description": "Line number to start at." } ] }, "buttons": { "type": "array", "description": "Controls button shown as an overlay in a corner of the code block.", "items": { "$ref": "#/components/schemas/ContentKitButton" } }, "state": { "description": "State binding when editable. The value of the input will be stored as a property in the state named after this ID.", "type": "string" }, "onContentChange": { "$ref": "#/components/schemas/ContentKitAction" }, "header": { "type": "array", "description": "Header displayed before the code lines", "items": { "$ref": "#/components/schemas/ContentKitDescendantElement" } }, "footer": { "type": "array", "description": "Footer displayed after the code lines", "items": { "$ref": "#/components/schemas/ContentKitDescendantElement" } } }, "required": [ "type", "content" ] }, "ContentKitMarkdown": { "type": "object", "description": "Block with rich text formatting of a markdown content.", "properties": { "type": { "type": "string", "enum": [ "markdown" ] }, "content": { "oneOf": [ { "$ref": "#/components/schemas/ContentKitDynamicBinding" }, { "type": "string", "description": "Markdown content to display" } ] } }, "required": [ "type", "content" ] }, "ContentKitText": { "type": "object", "description": "Low level text element.", "properties": { "type": { "type": "string", "enum": [ "text" ] }, "style": { "type": "string", "enum": [ "bold", "italic", "code", "strikethrough" ] }, "children": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "oneOf": [ { "type": "string" }, { "$ref": "#/components/schemas/ContentKitText" }, { "$ref": "#/components/schemas/ContentKitLink" } ] } } ] } }, "required": [ "type", "children" ] }, "ContentKitURL": { "type": "object", "description": "Specification for an URL in ContentKit.", "properties": { "host": { "type": "string", "description": "Hostname of the URL along with the port number if required.", "example": "api.example.com" }, "pathname": { "type": "string", "description": "Path of the URL prefixed with a `/`.", "example": "/v1/options" }, "query": { "type": "object", "additionalProperties": { "oneOf": [ { "type": "string" }, { "$ref": "#/components/schemas/ContentKitDynamicBinding" } ] } } }, "required": [ "host", "pathname" ] }, "ContentKitLink": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "link" ] }, "target": { "type": "object", "properties": { "url": { "oneOf": [ { "type": "string" }, { "$ref": "#/components/schemas/ContentKitURL" } ] } }, "required": [ "url" ] }, "children": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] } }, "required": [ "type", "target", "children" ] }, "ContentKitImage": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image" ] }, "source": { "type": "object", "properties": { "url": { "type": "string", "format": "uri" } }, "required": [ "url" ] }, "aspectRatio": { "type": "number" } }, "required": [ "type", "source", "aspectRatio" ] }, "ContentKitInlineElement": { "description": "Any element that is inline.", "oneOf": [ { "$ref": "#/components/schemas/ContentKitText" }, { "$ref": "#/components/schemas/ContentKitImage" }, { "$ref": "#/components/schemas/ContentKitLink" } ], "discriminator": { "propertyName": "type" } }, "ContentKitCard": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "card" ] }, "title": { "type": "string" }, "hint": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/ContentKitInlineElement" } } ] }, "icon": { "oneOf": [ { "$ref": "#/components/schemas/ContentKitIcon" }, { "$ref": "#/components/schemas/ContentKitImage" } ] }, "onPress": { "$ref": "#/components/schemas/ContentKitAction" }, "children": { "type": "array", "items": { "$ref": "#/components/schemas/ContentKitDescendantElement" } }, "buttons": { "type": "array", "description": "Buttons displayed in the top right corner of the card.", "items": { "$ref": "#/components/schemas/ContentKitButton" } } }, "required": [ "type" ] }, "ContentKitBuiltInSource": { "type": "object", "description": "Built-in sources that can be used to provide a ContentKitSelect.", "properties": { "source": { "type": "string", "enum": [ "openapi" ] } }, "required": [ "source" ] }, "ContentKitSelectOption": { "type": "object", "description": "An individual option in a select element", "properties": { "id": { "type": "string" }, "label": { "type": "string" }, "icon": { "oneOf": [ { "$ref": "#/components/schemas/ContentKitIcon" }, { "$ref": "#/components/schemas/ContentKitImage" } ] } }, "required": [ "id", "label" ] }, "ContentKitSelect": { "type": "object", "description": "Creates a drop down menu with a list of options for a user to choose.", "properties": { "type": { "type": "string", "enum": [ "select" ] }, "disabled": { "type": "boolean" }, "state": { "description": "State binding. The value of the input will be stored as a property in the state named after this ID.", "type": "string" }, "initialValue": { "description": "Value to initialize the select with.", "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] }, "onValueChange": { "$ref": "#/components/schemas/ContentKitAction" }, "placeholder": { "description": "Text that appears in the form control when it has no value set", "type": "string" }, "multiple": { "description": "Should the select accept the selection of multiple options. If true, the state will be an array.", "type": "boolean" }, "acceptInput": { "description": "Should the filter input be allowed to be selected as an option.", "type": "boolean" }, "options": { "description": "Options to be displayed in the select.", "oneOf": [ { "$ref": "#/components/schemas/ContentKitBuiltInSource" }, { "type": "array", "description": "Static list of options", "items": { "$ref": "#/components/schemas/ContentKitSelectOption" } }, { "type": "object", "properties": { "url": { "oneOf": [ { "type": "string", "description": "External source of options. The URL should respond with an array of options." }, { "$ref": "#/components/schemas/ContentKitURL" } ] } }, "required": [ "url" ] } ] } }, "required": [ "type", "state", "options" ] }, "ContentKitSwitch": { "type": "object", "description": "Renders a boolean input.", "properties": { "type": { "type": "string", "enum": [ "switch" ] }, "disabled": { "type": "boolean" }, "state": { "description": "State binding. The value of the input will be stored as a property in the state named after this ID.", "type": "string" }, "initialValue": { "description": "Value to initialize the switch with.", "type": "boolean" }, "onValueChange": { "$ref": "#/components/schemas/ContentKitAction" }, "confirm": { "$ref": "#/components/schemas/ContentKitConfirm" } }, "required": [ "type", "state" ] }, "ContentKitRadio": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "radio" ] }, "disabled": { "type": "boolean" }, "state": { "description": "State binding. The value of the input will be stored as a property in the state named after this ID.", "type": "string" }, "value": { "description": "Value to store in th state when the checkbox is selected.", "oneOf": [ { "type": "string" }, { "type": "number" } ] }, "confirm": { "$ref": "#/components/schemas/ContentKitConfirm" } }, "required": [ "type", "state", "value" ] }, "ContentKitCheckbox": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "checkbox" ] }, "state": { "description": "State binding. The value of the input will be stored as a property in the state named after this ID.", "type": "string" }, "value": { "description": "Value to store in a state array when the checkbox is selected.", "oneOf": [ { "type": "string" }, { "type": "number" } ] }, "confirm": { "$ref": "#/components/schemas/ContentKitConfirm" } }, "required": [ "type", "state", "value" ] }, "ContentKitInput": { "type": "object", "description": "Field for an input.", "properties": { "type": { "type": "string", "enum": [ "input" ] }, "label": { "type": "string", "description": "Text label displayed next to the input." }, "hint": { "oneOf": [ { "type": "string" }, { "$ref": "#/components/schemas/ContentKitInlineElement" } ] }, "element": { "oneOf": [ { "$ref": "#/components/schemas/ContentKitTextInput" }, { "$ref": "#/components/schemas/ContentKitSelect" }, { "$ref": "#/components/schemas/ContentKitSwitch" }, { "$ref": "#/components/schemas/ContentKitRadio" }, { "$ref": "#/components/schemas/ContentKitCheckbox" }, { "$ref": "#/components/schemas/ContentKitButton" }, { "$ref": "#/components/schemas/ContentKitCodeBlock" } ] } }, "required": [ "type", "label", "element" ] }, "ContentKitHint": { "type": "object", "description": "Element used to contextualize other elements or info.", "properties": { "type": { "type": "string", "enum": [ "hint" ] }, "children": { "type": "array", "items": { "$ref": "#/components/schemas/ContentKitInlineElement" } } }, "required": [ "type", "children" ] }, "ContentKitStepperStep": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "step" ] }, "id": { "description": "unique identifier for the step", "type": "string" }, "title": { "description": "title of the step", "type": "string", "maxLength": 50 }, "next": { "description": "indicates if the user can progress to the next step based on some internal validation or condition", "type": "boolean", "default": false }, "children": { "type": "array", "items": { "$ref": "#/components/schemas/ContentKitDescendantElement" }, "minItems": 1 } }, "required": [ "type", "id", "children" ] }, "ContentKitBlockControl": { "type": "object", "description": "Control menu item displayed for the block.", "properties": { "icon": { "$ref": "#/components/schemas/ContentKitIcon" }, "label": { "type": "string" }, "onPress": { "$ref": "#/components/schemas/ContentKitAction" }, "confirm": { "$ref": "#/components/schemas/ContentKitConfirm" } }, "required": [ "label", "onPress" ] }, "ContentKitBlock": { "type": "object", "description": "Higher level element to represent a custom block.", "properties": { "type": { "type": "string", "enum": [ "block" ] }, "children": { "type": "array", "items": { "$ref": "#/components/schemas/ContentKitDescendantElement" } }, "controls": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/ContentKitBlockControl" }, { "type": "array", "items": { "$ref": "#/components/schemas/ContentKitBlockControl" } } ] } } }, "required": [ "type", "children" ] }, "ContentKitModal": { "type": "object", "description": "Overlay modal.", "properties": { "type": { "type": "string", "enum": [ "modal" ] }, "title": { "type": "string" }, "subtitle": { "type": "array", "items": { "$ref": "#/components/schemas/ContentKitInlineElement" } }, "size": { "type": "string", "enum": [ "medium", "xlarge", "fullscreen" ] }, "returnValue": { "description": "Data passed back to the parent view when the modal is closed. These data are accessible in the \"@ui.modal.close\"", "type": "object" }, "children": { "type": "array", "items": { "$ref": "#/components/schemas/ContentKitDescendantElement" } }, "submit": { "$ref": "#/components/schemas/ContentKitButton" } }, "required": [ "type", "children" ] }, "ContentKitStepper": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "stepper" ] }, "activeStep": { "type": "string", "description": "id of the currently active step" }, "onStepChange": { "$ref": "#/components/schemas/ContentKitAction" }, "onComplete": { "$ref": "#/components/schemas/ContentKitAction" }, "children": { "type": "array", "items": { "$ref": "#/components/schemas/ContentKitStepperStep" }, "minItems": 1 } }, "required": [ "type", "activeStep", "onStepChange", "onComplete", "children" ] }, "ContentKitConfiguration": { "type": "object", "description": "Higher level element to define a configuration block. Does not add any UI elements or wrappers. Must be used as a top level element for any configuration component.", "properties": { "type": { "type": "string", "enum": [ "configuration" ] }, "children": { "oneOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/ContentKitStepper" }, "minItems": 1, "maxItems": 1 }, { "type": "array", "items": { "$ref": "#/components/schemas/ContentKitDescendantElement" }, "minItems": 1 } ] } }, "required": [ "type", "children" ] }, "ContentKitRootElement": { "description": "Element used as root", "oneOf": [ { "$ref": "#/components/schemas/ContentKitBlock" }, { "$ref": "#/components/schemas/ContentKitModal" }, { "$ref": "#/components/schemas/ContentKitConfiguration" } ], "discriminator": { "propertyName": "type" } }, "ContentKitRenderOutputElement": { "type": "object", "description": "Output of type element in the lifecycle of the component.", "properties": { "type": { "type": "string", "enum": [ "element" ] }, "element": { "$ref": "#/components/schemas/ContentKitRootElement" }, "state": { "type": "object" }, "props": { "$ref": "#/components/schemas/PlainObject" }, "canAccessVisitorClaims": { "type": "boolean", "description": "Whether the rendered integration UI can receive visitor claims." } }, "required": [ "element", "state", "props" ] }, "ContentKitRenderOutputComplete": { "type": "object", "description": "Output of completed lifecycle of the component.", "properties": { "type": { "type": "string", "enum": [ "complete" ] }, "returnValue": { "type": "object" } }, "required": [ "type" ] }, "ContentKitRenderOutput": { "type": "object", "description": "Output of the integration when rendering a UI.", "oneOf": [ { "$ref": "#/components/schemas/ContentKitRenderOutputElement" }, { "$ref": "#/components/schemas/ContentKitRenderOutputComplete" } ] }, "Error": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" } }, "required": [ "code", "message" ] } } }, "ContentKitContextBase": { "type": "object", "description": "Common properties for ContentKit context.", "properties": { "theme": { "type": "string", "enum": [ "dark", "light" ] } }, "required": [ "theme" ] }, "ContentKitContextConfigurationAccount": { "allOf": [ { "$ref": "#/components/schemas/ContentKitContextBase" }, { "type": "object", "description": "Context while rendering in an account installation's configuration.", "properties": { "type": { "type": "string", "enum": [ "configuration_account" ] }, "organizationId": { "type": "string", "description": "ID of the organization the account installation configuration is in." } }, "required": [ "type", "organizationId" ] } ] }, "ContentKitContextConfigurationSpace": { "allOf": [ { "$ref": "#/components/schemas/ContentKitContextBase" }, { "type": "object", "description": "Context while rendering in a space-installation's configuration.", "properties": { "type": { "type": "string", "enum": [ "configuration_space" ] }, "spaceId": { "type": "string", "description": "ID of the space the space-installation configuration is in." } }, "required": [ "type", "spaceId" ] } ] }, "ContentKitContextConfigurationSite": { "allOf": [ { "$ref": "#/components/schemas/ContentKitContextBase" }, { "type": "object", "description": "Context while rendering in a site-installation's configuration.", "properties": { "type": { "type": "string", "enum": [ "configuration_site" ] }, "siteId": { "type": "string", "description": "ID of the site the site-installation configuration is in." } }, "required": [ "type", "siteId" ] } ] }, "ContentKitContextConfigurationContentSource": { "allOf": [ { "$ref": "#/components/schemas/ContentKitContextBase" }, { "type": "object", "description": "Context while rendering the configuration flow of a content source.", "properties": { "type": { "type": "string", "enum": [ "configuration_contentsource" ] }, "organizationId": { "type": "string", "description": "ID of the organization the content source installation configuration is in." }, "spaceId": { "type": "string", "description": "Optional ID of the space the content source installation configuration is in." } }, "required": [ "type", "organizationId" ] } ] }, "ContentKitContextDocument": { "allOf": [ { "$ref": "#/components/schemas/ContentKitContextBase" }, { "type": "object", "description": "Context while rendering in a document.", "properties": { "type": { "type": "string", "enum": [ "document" ] }, "spaceId": { "type": "string", "description": "ID of the space content the document is in." }, "editable": { "type": "boolean" } }, "required": [ "type", "spaceId", "editable" ] } ] }, "ContentKitContext": { "description": "Object representing the context in which a ContentKit component is rendered.", "oneOf": [ { "$ref": "#/components/schemas/ContentKitContextConfigurationAccount" }, { "$ref": "#/components/schemas/ContentKitContextConfigurationSpace" }, { "$ref": "#/components/schemas/ContentKitContextConfigurationSite" }, { "$ref": "#/components/schemas/ContentKitContextConfigurationContentSource" }, { "$ref": "#/components/schemas/ContentKitContextDocument" } ] }, "RenderIntegrationUI": { "type": "object", "properties": { "componentId": { "type": "string", "description": "ID of the component to render in the integration." }, "props": { "description": "Current properties of the UI.", "$ref": "#/components/schemas/PlainObject" }, "state": { "type": "object", "description": "Current local state of the UI." }, "context": { "$ref": "#/components/schemas/ContentKitContext" }, "action": { "$ref": "#/components/schemas/ContentKitAction" } }, "required": [ "componentId", "props", "context" ] }, "UpdateIntegrationInstallation": { "type": "object", "properties": { "externalIds": { "$ref": "#/components/schemas/IntegrationInstallationExternalIds" }, "configuration": { "$ref": "#/components/schemas/IntegrationInstallationConfiguration" }, "space_selection": { "$ref": "#/components/schemas/IntegrationInstallationSpaceSelection" }, "site_selection": { "$ref": "#/components/schemas/IntegrationInstallationSiteSelection" }, "oauthTransaction": { "type": "string", "description": "ID of a consumed OAuth transaction for this exact target, authorizing a credential write. Single use." } } }, "CreateIntegrationOAuthTransaction": { "type": "object", "description": "At most one of `spaceId` and `siteId` can be set.", "properties": { "spaceId": { "type": "string", "description": "Connect this space installation instead of the installation." }, "siteId": { "type": "string", "description": "Connect this site installation instead of the installation." } } }, "IntegrationOAuthTransactionStart": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "integration-oauth-transaction-start" ] }, "id": { "type": "string", "description": "Opaque ID of the transaction, sent as the OAuth `state`." }, "expiresAt": { "$ref": "#/components/schemas/Timestamp" }, "startURL": { "type": "string", "format": "uri", "description": "URL to open in the browser completing the flow: the target's `/oauth` route with `gitbook_oauth_transaction` and `gitbook_oauth_code_challenge`. Holds no secret." } }, "required": [ "object", "id", "expiresAt", "startURL" ] }, "ConsumeIntegrationOAuthTransaction": { "type": "object", "properties": { "redirectUri": { "type": "string", "description": "The exact `redirect_uri` sent to the provider's authorize and token endpoints." }, "code": { "type": "string", "description": "The authorization code received on the callback." } }, "required": [ "redirectUri", "code" ] }, "IntegrationOAuthTransaction": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "integration-oauth-transaction" ] }, "id": { "type": "string" }, "organization": { "type": "string", "description": "ID of the organization of the installation." }, "installation": { "type": "string", "description": "ID of the installation the credentials must be written to." }, "space": { "type": "string", "description": "ID of the space whose installation the credentials must be written to." }, "site": { "type": "string", "description": "ID of the site whose installation the credentials must be written to." }, "codeVerifier": { "type": "string", "description": "PKCE code verifier, to send as `code_verifier` when exchanging the code." }, "redirectUri": { "type": "string", "description": "The validated redirect URI." }, "grantExpiresAt": { "$ref": "#/components/schemas/Timestamp" } }, "required": [ "object", "id", "organization", "installation", "codeVerifier", "redirectUri", "grantExpiresAt" ] }, "ConfirmIntegrationOAuthTransaction": { "type": "object", "properties": { "key": { "type": "string", "description": "The one-time key from the confirm page's URL fragment." } }, "required": [ "key" ] }, "IntegrationOAuthTransactionConfirmation": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "integration-oauth-transaction-confirmation" ] }, "callbackURL": { "type": "string", "format": "uri", "description": "Callback URL to return the browser to, on the integrations host." } }, "required": [ "object", "callbackURL" ] }, "UpdateIntegrationSpaceInstallation": { "type": "object", "properties": { "externalIds": { "$ref": "#/components/schemas/IntegrationInstallationExternalIds" }, "configuration": { "$ref": "#/components/schemas/IntegrationInstallationConfiguration" }, "oauthTransaction": { "type": "string", "description": "ID of a consumed OAuth transaction for this exact target, authorizing a credential write. Single use." } } }, "UpdateIntegrationSiteInstallation": { "type": "object", "properties": { "externalIds": { "$ref": "#/components/schemas/IntegrationInstallationExternalIds" }, "configuration": { "$ref": "#/components/schemas/IntegrationInstallationConfiguration" }, "oauthTransaction": { "type": "string", "description": "ID of a consumed OAuth transaction for this exact target, authorizing a credential write. Single use." } } }, "NewOrganizationTitle": { "type": "string", "description": "Name of a new organization", "minLength": 2, "maxLength": 80, "pattern": "\\S.*\\S" }, "SiteOnboardingSource": { "type": "string", "description": "Where the user's docs are coming from today.", "enum": [ "markdown-in-git", "import", "template" ] }, "SiteOnboardingAudience": { "type": "string", "description": "Who the user wants to be able to access their site.", "enum": [ "public", "mixed", "protected", "internal" ] }, "SiteOnboardingInterest": { "type": "string", "description": "Something the user is interested in doing with the site.", "enum": [ "adaptive-content", "api-docs", "proactive-agent" ] }, "SiteOnboardingPreferences": { "type": "object", "description": "Preferences collected from the user during site onboarding, used to tailor recommendations and to apply their initial setup choices.", "properties": { "source": { "oneOf": [ { "$ref": "#/components/schemas/SiteOnboardingSource" }, { "type": "null" } ] }, "audience": { "oneOf": [ { "$ref": "#/components/schemas/SiteOnboardingAudience" }, { "type": "null" } ] }, "interests": { "type": "array", "items": { "$ref": "#/components/schemas/SiteOnboardingInterest" } } }, "required": [ "source", "audience", "interests" ] }, "CreateOrganization": { "type": "object", "properties": { "title": { "$ref": "#/components/schemas/NewOrganizationTitle" }, "emailDomains": { "$ref": "#/components/schemas/OrganizationEmailDomains", "description": "No longer supported: a non-empty list is rejected. Add and verify domains with the domain management API after the organization is created.", "deprecated": true }, "onboardingPreferences": { "description": "Preferences collected from the user during onboarding, to apply to the organization's default site. Only used when `withDefaultSite` is true.", "$ref": "#/components/schemas/SiteOnboardingPreferences" } }, "required": [ "title" ] }, "SubscriptionTrial": { "type": "object", "description": "The current or last trial of an organization.", "properties": { "status": { "$ref": "#/components/schemas/BillingTrialStatus" }, "endDate": { "description": "When the trial ends, or ended.", "$ref": "#/components/schemas/Timestamp" }, "daysRemaining": { "type": "integer", "description": "Days left in the trial, rounded up, so 1 is its last day. 0 once it has ended." } }, "required": [ "status", "endDate", "daysRemaining" ] }, "SubscriptionNotice": { "type": "object", "description": "A notice about the organization's subscription to relay to the user, such as how many days are left in their trial. It is returned by the operations whose features may require a paid plan once a trial ends.\n", "properties": { "type": { "type": "string", "description": "- trial_started, the operation started the organization's trial. - trial_countdown, the organization's trial ends soon. - checkout_required, the operation needs a paid plan to complete.\n", "enum": [ "trial_started", "trial_countdown", "checkout_required" ] }, "context": { "type": "string", "description": "What the user was doing when the notice was given.", "enum": [ "trial_started", "site_publishing", "site_features", "site_customization" ] }, "commercialStatus": { "type": "string", "description": "Whether the organization is on a trial, the free plan, or a paid plan.", "enum": [ "trial", "free", "paid" ] }, "message": { "type": "string", "description": "Message to show the user. For users who cannot upgrade, it asks them to reach out to an administrator of the organization." }, "trial": { "$ref": "#/components/schemas/SubscriptionTrial" }, "canManageBilling": { "type": "boolean", "description": "Whether the user is an administrator of the organization, and so can upgrade. Otherwise, they have to ask an administrator to upgrade." }, "upgradeUrl": { "description": "Where to upgrade in the application. Only set when `canManageBilling` is true.", "$ref": "#/components/schemas/URL" }, "pricingUrl": { "description": "Public page comparing the GitBook plans.", "$ref": "#/components/schemas/URL" } }, "required": [ "type", "context", "commercialStatus", "message", "canManageBilling", "pricingUrl" ] }, "OptOutUpdate": { "description": "Set false to disable, or null to remove the opt-out. Omit to leave unchanged.", "oneOf": [ { "type": "boolean", "enum": [ false ] }, { "type": "null" } ] }, "OrganizationAISettingsUpdate": { "type": "object", "description": "Partial AI preference update. Omitted keys are unchanged; null removes an opt-out.", "additionalProperties": false, "properties": { "ai-agent": { "$ref": "#/components/schemas/OptOutUpdate" }, "ai-assistant": { "$ref": "#/components/schemas/OptOutUpdate" }, "ai-broken-links": { "$ref": "#/components/schemas/OptOutUpdate" }, "ai-content-gap": { "$ref": "#/components/schemas/OptOutUpdate" }, "ai-insight": { "$ref": "#/components/schemas/OptOutUpdate" }, "ai-import": { "$ref": "#/components/schemas/OptOutUpdate" }, "ai-platform": { "$ref": "#/components/schemas/OptOutUpdate" }, "ai-style-guide": { "$ref": "#/components/schemas/OptOutUpdate" }, "ai-translation": { "$ref": "#/components/schemas/OptOutUpdate" } } }, "OrganizationAllSite": { "type": "object", "properties": { "site": { "$ref": "#/components/schemas/Site" }, "structure": { "$ref": "#/components/schemas/SiteStructure" } }, "required": [ "site", "structure" ] }, "OrganizationAllCollection": { "type": "object", "properties": { "collection": { "$ref": "#/components/schemas/Collection" }, "content": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/OrganizationAllCollection" }, { "$ref": "#/components/schemas/OrganizationAllSpace" } ] } } }, "required": [ "collection", "content" ] }, "OrganizationAllSpace": { "type": "object", "properties": { "space": { "$ref": "#/components/schemas/Space" } }, "required": [ "space" ] }, "OrganizationAllContent": { "type": "object", "properties": { "sites": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationAllSite" } }, "spaces": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/OrganizationAllCollection" }, { "$ref": "#/components/schemas/OrganizationAllSpace" } ] } }, "deletedSpaces": { "description": "List of soft-deleted spaces.", "type": "array", "items": { "$ref": "#/components/schemas/OrganizationAllSpace" } } }, "required": [ "sites", "spaces", "deletedSpaces" ] }, "AuditEventAction": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "audit-event-action" ] }, "id": { "type": "string", "description": "Stable action identifier stored on audit events." }, "label": { "type": "string", "description": "Human-readable label for the action." } }, "required": [ "object", "id", "label" ] }, "AuditEventActor": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "user", "integration", "installation", "system", "support" ], "description": "Kind of actor that initiated the change." }, "id": { "type": "string", "description": "Stable identifier of the actor." }, "label": { "type": "string", "description": "Display label captured when the event was recorded." }, "impersonator": { "type": "object", "description": "GitBook staff member acting as this user. Present only for recorded impersonation; older events may not have this information. The actor ID remains the effective user for filtering.", "properties": { "id": { "type": "string", "description": "Stable ID of the impersonating staff member." }, "label": { "type": "string", "description": "Staff display name captured when the event was recorded, if available." } }, "required": [ "id" ] } }, "required": [ "type", "id" ] }, "AuditEventTarget": { "type": "object", "properties": { "type": { "type": "string", "description": "Kind of resource affected by the change." }, "id": { "type": "string", "description": "Stable identifier of the affected resource." }, "label": { "type": "string", "description": "Display label captured when the event was recorded." } }, "required": [ "type", "id" ] }, "AuditEvent": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "audit-event" ] }, "id": { "type": "string", "format": "uuid", "description": "Unique identifier of the audit event." }, "occurredAt": { "$ref": "#/components/schemas/Timestamp" }, "action": { "type": "string", "description": "Stable action name describing the recorded change." }, "actor": { "$ref": "#/components/schemas/AuditEventActor" }, "source": { "type": "string", "enum": [ "ui", "api", "integration", "webhook", "workflow", "script", "support" ], "description": "Entry point that initiated the change." }, "target": { "$ref": "#/components/schemas/AuditEventTarget" }, "urls": { "type": "object", "properties": { "location": { "type": "string", "format": "uri", "description": "URL of the audit event in the API." } }, "required": [ "location" ] } }, "required": [ "object", "id", "occurredAt", "action", "actor", "source", "target", "urls" ] }, "AuditEventDetails": { "allOf": [ { "$ref": "#/components/schemas/AuditEvent" }, { "type": "object", "properties": { "executionId": { "type": "string", "description": "Identifier of the operation that recorded the event." }, "correlationId": { "type": "string", "description": "Identifier shared by events produced by the same user action." }, "causedByEventId": { "type": "string", "format": "uuid", "description": "Audit event that caused this later system effect." }, "schemaVersion": { "type": "integer", "minimum": 1, "description": "Version of the action payload schema." }, "payload": { "type": "object", "additionalProperties": true, "description": "Allowlisted details specific to the action." } }, "required": [ "schemaVersion", "payload" ] } ] }, "OrganizationStyleguide": { "type": "object", "description": "A style guide space and all the sites referencing it.", "properties": { "space": { "$ref": "#/components/schemas/Space" }, "sites": { "type": "array", "description": "Sites in the organization that reference this style guide.", "items": { "$ref": "#/components/schemas/Site" } } }, "required": [ "space", "sites" ] }, "OrganizationStyleguides": { "type": "object", "properties": { "styleguides": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationStyleguide" } } }, "required": [ "styleguides" ] }, "StyleguideTemplate": { "type": "object", "description": "A built-in style guide starter template used to seed and preview a style guide.", "properties": { "id": { "type": "string", "description": "Identifier of the template, passed to createSiteStyleguideById to seed a style guide from it." }, "title": { "type": "string", "description": "Human-readable name of the template." }, "subtitle": { "type": "string", "description": "Short one-line description of the template." }, "emoji": { "type": "string", "description": "Emoji illustrating the template." }, "markdown": { "type": "string", "description": "Markdown content of the template, rendered as a preview." } }, "required": [ "id", "title", "markdown" ] }, "StyleguideTemplates": { "type": "object", "properties": { "templates": { "type": "array", "items": { "$ref": "#/components/schemas/StyleguideTemplate" } } }, "required": [ "templates" ] }, "OrganizationSubscription": { "type": "object", "description": "An organization's subscription, as needed to tell a user their plan, trial and how to upgrade.", "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"organization-subscription\"", "enum": [ "organization-subscription" ] }, "status": { "type": "string", "description": "Whether the organization is on a trial, the free plan, or a paid plan.", "enum": [ "trial", "free", "paid" ] }, "plan": { "type": "object", "description": "The plan in effect, which is the trial's plan while trialing.", "properties": { "id": { "$ref": "#/components/schemas/BillingProduct" }, "title": { "type": "string", "description": "Name of the plan shown to users, e.g. Pro." } }, "required": [ "id", "title" ] }, "trial": { "description": "The current or last trial. Absent when the organization never had one.", "$ref": "#/components/schemas/SubscriptionTrial" }, "canManageBilling": { "type": "boolean", "description": "Whether the user is an administrator of the organization, and so can upgrade. Otherwise, they have to ask an administrator to upgrade." }, "upgradeUrl": { "description": "Where to upgrade in the application. Only set when `canManageBilling` is true.", "$ref": "#/components/schemas/URL" }, "pricingUrl": { "description": "Public page comparing the GitBook plans.", "$ref": "#/components/schemas/URL" } }, "required": [ "object", "status", "plan", "canManageBilling", "pricingUrl" ] }, "MemberContentPermission": { "type": "object", "description": "Permission of a member in a content.", "properties": { "permission": { "$ref": "#/components/schemas/MemberRole" }, "space": { "$ref": "#/components/schemas/Space" } }, "required": [ "permission", "space" ] }, "MemberSitePermission": { "type": "object", "description": "Permission of an organization member in a site.", "properties": { "site": { "$ref": "#/components/schemas/Site" }, "permission": { "$ref": "#/components/schemas/MemberRoleOrGuest" } }, "required": [ "site", "permission" ] }, "TeamMemberRole": { "type": "string", "description": "\"The role of a team member.\n\"owner\": Can manage team members.\n\"member\": Is a member of the team.\n", "enum": [ "owner", "member" ] }, "TeamMember": { "type": "object", "properties": { "role": { "$ref": "#/components/schemas/TeamMemberRole" } }, "required": [ "role" ] }, "OrganizationTeamMember": { "type": "object", "description": "A member of a team in an organization, including its relationship to it", "properties": { "organization": { "description": "User information as an organization member", "$ref": "#/components/schemas/OrganizationMember" }, "team": { "description": "User information as a team member", "$ref": "#/components/schemas/TeamMember" }, "permissions": { "type": "object", "description": "The set of permissions for the team member", "properties": { "view": { "type": "boolean", "description": "Can the user view the team member" } }, "required": [ "view" ] } }, "required": [ "organization", "team", "permissions" ] }, "UpdateMembersInOrganizationTeam": { "type": "object", "properties": { "add": { "type": "array", "items": { "type": "string", "description": "A user to add. It can either be a user ID or an email." } }, "memberships": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TeamMember" } }, "remove": { "type": "array", "items": { "type": "string", "description": "A user to remove. It can either be a user ID or an email." } } } }, "IdPConnectionLabel": { "type": "string", "description": "Name of the identity provider connection, shown to organization admins.", "minLength": 1, "maxLength": 100 }, "IdPConnectionProvider": { "type": "string", "description": "Identity provider behind the connection.", "enum": [ "okta", "entra", "generic" ] }, "IdPConnectionStatus": { "type": "string", "description": "Status of the connection.\n- `pending`: GitBook hasn't seen the identity provider use the connection yet.\n- `ready`: A member signed in with SAML through the connection, or the identity provider sent an authenticated SCIM request.\n", "enum": [ "pending", "ready" ] }, "SAMLProviderDefaultRole": { "description": "Role given to people on their first sign-in through the provider. null adds them as guests, \"default\" uses the organization's default role, and \"domain\" uses the role of the verified email domain they signed in with.\n", "oneOf": [ { "$ref": "#/components/schemas/MemberRole" }, { "type": "null" }, { "type": "string", "enum": [ "default", "domain" ] } ] }, "SAMLProviderEntityID": { "type": "string", "maxLength": 1024 }, "SAMLProviderCertificate": { "type": "string", "maxLength": 10000 }, "SAMLProviderDomainStatus": { "type": "string", "description": "State of a SAML provider's email domain in the organization.\n- `verified`: People with an email on this domain can sign in through the provider.\n- `pending`, `error`, `legacy`: The domain isn't verified yet, so it doesn't let anyone sign in.\n- `removed`: The organization no longer has this domain.\n", "enum": [ "verified", "pending", "error", "legacy", "removed" ] }, "SAMLProviderDomain": { "type": "object", "description": "An email domain of a SAML provider, with its verification state in the organization.", "properties": { "domain": { "type": "string" }, "status": { "$ref": "#/components/schemas/SAMLProviderDomainStatus" } }, "required": [ "domain", "status" ] }, "OrganizationIdPConnection": { "type": "object", "description": "A connection to an identity provider, which signs organization members in with SAML and provisions them with SCIM.\n", "properties": { "object": { "type": "string", "description": "The object type, which is always \"idp-connection\"", "enum": [ "idp-connection" ] }, "id": { "type": "string", "description": "Unique identifier of the connection" }, "label": { "$ref": "#/components/schemas/IdPConnectionLabel" }, "provider": { "$ref": "#/components/schemas/IdPConnectionProvider" }, "status": { "$ref": "#/components/schemas/IdPConnectionStatus" }, "defaultRole": { "$ref": "#/components/schemas/SAMLProviderDefaultRole" }, "defaultTeam": { "$ref": "#/components/schemas/OrganizationTeam" }, "defaultTeamFromDomain": { "type": "boolean", "description": "Whether people join the team of the verified email domain they signed in with, instead of `defaultTeam`.\n" }, "defaultTeamFromSCIM": { "type": "boolean", "description": "Whether the identity provider decides each member's teams through SCIM, instead of `defaultTeam`.\n" }, "saml": { "type": "object", "description": "SAML sign-in through the connection.", "properties": { "ssoURL": { "description": "The identity provider's single sign-on URL. Absent until it is set.", "$ref": "#/components/schemas/URL" }, "entityID": { "description": "Entity ID of the identity provider. Absent until it is set.", "$ref": "#/components/schemas/SAMLProviderEntityID" }, "certificate": { "description": "X.509 certificate of the identity provider. Absent until it is set.", "$ref": "#/components/schemas/SAMLProviderCertificate" }, "domains": { "type": "array", "description": "Email domains the connection signs people in for. Absent on connections created before domains existed, which accept any email.\n", "items": { "$ref": "#/components/schemas/SAMLProviderDomain" } }, "service": { "type": "object", "description": "Service provider values to configure in the identity provider.", "properties": { "acsURL": { "type": "string", "description": "Assertion Consumer Service (ACS) URL", "format": "uri" }, "startURL": { "type": "string", "description": "Start URL for the identity provider", "format": "uri" }, "entityID": { "$ref": "#/components/schemas/SAMLProviderEntityID" } }, "required": [ "acsURL", "startURL", "entityID" ] }, "lastUsedAt": { "description": "Date of the last successful sign-in through the connection", "$ref": "#/components/schemas/Timestamp" } }, "required": [ "service" ] }, "scim": { "type": "object", "description": "SCIM provisioning through the connection. Absent on connections created before SCIM, until their SCIM token is created.\n", "properties": { "baseURL": { "description": "SCIM base URL to configure in the identity provider", "$ref": "#/components/schemas/URL" }, "tokenHint": { "type": "string", "description": "Last characters of the current token, to identify it" }, "tokenCreatedAt": { "description": "Date the current token was created", "$ref": "#/components/schemas/Timestamp" }, "lastUsedAt": { "description": "Date of the last request authenticated with the token", "$ref": "#/components/schemas/Timestamp" } }, "required": [ "baseURL", "tokenHint", "tokenCreatedAt" ] }, "createdAt": { "description": "Date of creation", "$ref": "#/components/schemas/Timestamp" }, "updatedAt": { "description": "Date of the last update", "$ref": "#/components/schemas/Timestamp" }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "location": { "description": "URL of the connection in the API", "$ref": "#/components/schemas/URL" } }, "required": [ "location" ] } }, "required": [ "object", "id", "label", "provider", "status", "defaultRole", "defaultTeamFromDomain", "defaultTeamFromSCIM", "saml", "createdAt", "updatedAt", "urls" ] }, "SAMLProviderDomains": { "type": "array", "description": "Email domains the provider signs people in for. Each one must be an email domain of the organization. Only emails on a verified domain in this list can sign in through the provider.\n", "maxItems": 50, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 255 } }, "OrganizationIdPConnectionWithToken": { "description": "An identity provider connection, with the SCIM token the request created. The token can't be retrieved again.\n", "type": "object", "properties": { "connection": { "$ref": "#/components/schemas/OrganizationIdPConnection" }, "token": { "type": "string", "description": "SCIM bearer token to configure in the identity provider." } }, "required": [ "connection", "token" ] }, "Email": { "type": "string", "format": "email", "description": "User email", "example": "contact@gitbook.com" }, "InviteUsersToOrganization": { "type": "object", "properties": { "emails": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/Email", "description": "The email address of the user to invite as a member" }, { "type": "object", "properties": { "email": { "description": "The email address of the user to invite as a member", "$ref": "#/components/schemas/Email" }, "role": { "$ref": "#/components/schemas/MemberRoleOrGuest" } }, "required": [ "email", "role" ] } ] } }, "role": { "description": "Default role to set on newly invited members.", "$ref": "#/components/schemas/MemberRoleOrGuest" }, "teamIds": { "description": "Teams to add the invitees to as Members, preserving existing team roles. The caller must be an owner of every team or an organization admin. Team-owner email invitations require acceptance before granting organization Guest and team Member access, including when the recipient already belongs to the organization. Existing roles are preserved. Granting an organization role or SSO access requires an organization admin.", "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/components/schemas/EntityId" } }, "sso": { "description": "If true, invites the user as an SSO user of the organization. Defaults to false.", "type": "boolean" } }, "required": [ "emails" ] }, "InviteLinkToCollection": { "type": "object", "description": "An invite link to a specific collection in an organization", "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"invite\"", "enum": [ "invite" ] }, "id": { "type": "string", "description": "Unique identifier for the invite link to the collection" }, "level": { "$ref": "#/components/schemas/MemberRoleOrGuest", "description": "The level of the member in the target collection" }, "redundant": { "type": "boolean", "description": "An invite is redundant if the requesting user already has all necessary permissions." }, "collection": { "$ref": "#/components/schemas/Collection", "description": "The collection the member has been invited to" } }, "required": [ "object", "id", "level", "redundant", "collection" ] }, "InviteLinkToSpace": { "type": "object", "description": "An invite link to a specific space in an organization", "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"invite\"", "enum": [ "invite" ] }, "id": { "type": "string", "description": "Unique identifier for the invite link to the space" }, "level": { "$ref": "#/components/schemas/MemberRoleOrGuest", "description": "The level of the member in the target space" }, "redundant": { "type": "boolean", "description": "An invite is redundant if the requesting user already has all necessary permissions." }, "space": { "$ref": "#/components/schemas/Space", "description": "The space the member has been invited to" } }, "required": [ "object", "id", "level", "redundant", "space" ] }, "InviteLinkToOrganization": { "type": "object", "description": "An invite link to an organization", "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"invite\"", "enum": [ "invite" ] }, "id": { "type": "string", "description": "Unique identifier for the invite link to the organization" }, "role": { "$ref": "#/components/schemas/MemberRoleOrGuest", "description": "The role in the organization the invite link is for" }, "redundant": { "type": "boolean", "description": "An invite is redundant if the requesting user already has all necessary permissions." }, "teamInvitation": { "type": "object", "description": "Details shown to the recipient before accepting a team invitation.", "properties": { "inviter": { "type": "string", "description": "Display name of the person who sent the invitation." }, "teams": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id", "title" ] } } }, "required": [ "inviter", "teams" ] } }, "required": [ "object", "id", "role", "redundant" ] }, "CreateInviteToOrganization": { "type": "object", "properties": { "role": { "$ref": "#/components/schemas/MemberRoleOrGuest", "description": "The role of the member in the organization" } }, "required": [ "role" ] }, "CreateInviteToSpace": { "type": "object", "properties": { "level": { "$ref": "#/components/schemas/MemberRoleOrGuest", "description": "The level of the member in the target space" }, "space": { "type": "string", "description": "The ID of space the member has been invited to" } }, "required": [ "level", "space" ] }, "CreateInviteToCollection": { "type": "object", "properties": { "level": { "$ref": "#/components/schemas/MemberRoleOrGuest", "description": "The level of the member in the target collection" }, "collection": { "type": "string", "description": "The ID of collection the member has been invited to" } }, "required": [ "level", "collection" ] }, "CreateOrganizationInvite": { "oneOf": [ { "$ref": "#/components/schemas/CreateInviteToOrganization" }, { "$ref": "#/components/schemas/CreateInviteToSpace" }, { "$ref": "#/components/schemas/CreateInviteToCollection" } ] }, "OrganizationInviteLink": { "type": "object", "description": "An invite link created in an organization", "oneOf": [ { "$ref": "#/components/schemas/InviteLinkToOrganization" }, { "$ref": "#/components/schemas/InviteLinkToSpace" }, { "$ref": "#/components/schemas/InviteLinkToCollection" } ] }, "SubscriptionChanges": { "type": "object", "description": "Changes to apply during a subscription upgrade or downgrade", "properties": { "removeMembers": { "description": "A list of member identifiers to be removed", "type": "array", "items": { "type": "string" } }, "updateSites": { "description": "A list of site updates to be applied before upgrading. If a site is not present in this list, it'll be upgraded to whichever type matches its features and its published status will be unchanged. When downgrading to a lower type all relevant paid features will be disabled before applying the new type.\n", "type": "array", "items": { "oneOf": [ { "type": "object", "properties": { "id": { "description": "The site identifier", "type": "string" }, "type": { "description": "The site type to migrate to", "$ref": "#/components/schemas/SiteType" } }, "additionalProperties": false, "required": [ "id", "type" ] }, { "type": "object", "properties": { "id": { "description": "The site identifier", "type": "string" }, "isPublished": { "description": "Can be set to `false` or `true` to either unpublish or publish a site", "type": "boolean" } }, "additionalProperties": false, "required": [ "id", "isPublished" ] }, { "type": "object", "properties": { "id": { "description": "The site identifier", "type": "string" }, "type": { "description": "The site type to migrate to", "$ref": "#/components/schemas/SiteType" }, "isPublished": { "description": "Can be set to `false` or `true` to either unpublish or publish a site", "type": "boolean" } }, "additionalProperties": false, "required": [ "id", "type", "isPublished" ] } ] } } }, "required": [ "removeMembers", "updateSites" ] }, "BillingCancellationComment": { "type": "string", "description": "Free-text detail a user typed alongside their cancellation reason.", "minLength": 1, "maxLength": 500 }, "BillingCancellationFeedback": { "type": "object", "description": "Why an organization is cancelling its subscription, as answered by the user in the app. Recorded for analytics only: it never changes how the cancellation is applied.\n", "oneOf": [ { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "not_satisfied_with_product" ] }, "reasonDetail": { "description": "The feature that was not satisfactory", "type": "string", "enum": [ "editor", "gitsync", "ai_features" ] } }, "additionalProperties": false, "required": [ "reason", "reasonDetail" ] }, { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "not_satisfied_with_product" ] }, "reasonDetail": { "description": "The feature that was not satisfactory", "type": "string", "enum": [ "other" ] }, "reasonComment": { "$ref": "#/components/schemas/BillingCancellationComment" } }, "additionalProperties": false, "required": [ "reason", "reasonDetail", "reasonComment" ] }, { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "will_vibe_code_our_own_app" ] }, "reasonDetail": { "description": "The tool the organization is moving to", "type": "string", "enum": [ "claude", "codex", "cursor", "lovable", "replit", "other" ] }, "reasonComment": { "$ref": "#/components/schemas/BillingCancellationComment" }, "reasonHosting": { "description": "Where the organization plans to host its own solution", "type": "string", "enum": [ "own_website_or_app", "vercel", "netlify", "github_pages", "cloudflare_pages", "not_decided", "other" ] } }, "additionalProperties": false, "required": [ "reason", "reasonDetail" ] }, { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "found_better_alternative" ] }, "reasonComment": { "$ref": "#/components/schemas/BillingCancellationComment" } }, "additionalProperties": false, "required": [ "reason", "reasonComment" ] }, { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "company_shutdown" ] } }, "additionalProperties": false, "required": [ "reason" ] }, { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "other_reason" ] }, "reasonComment": { "$ref": "#/components/schemas/BillingCancellationComment" } }, "additionalProperties": false, "required": [ "reason", "reasonComment" ] }, { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "not_using_enough" ] }, "reasonDetail": { "type": "string", "enum": [ "yes_in_a_few_months", "no" ] }, "reasonComment": { "$ref": "#/components/schemas/BillingCancellationComment" } }, "additionalProperties": false, "required": [ "reason", "reasonDetail" ] }, { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "found_better_alternative" ] }, "reasonDetail": { "type": "string", "enum": [ "mintlify", "readme", "docusaurus", "notion", "confluence", "self_hosted", "other" ] }, "reasonComment": { "$ref": "#/components/schemas/BillingCancellationComment" } }, "additionalProperties": false, "required": [ "reason", "reasonDetail" ] }, { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "not_satisfied_with_product" ] }, "reasonComment": { "$ref": "#/components/schemas/BillingCancellationComment" } }, "additionalProperties": false, "required": [ "reason", "reasonComment" ] }, { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "budget" ] }, "reasonDetail": { "type": "string", "enum": [ "budget_cuts", "plan_price_increase", "consolidating_tools", "funding_changed", "excess_seats_or_sites", "project_budget_reduced" ] } }, "additionalProperties": false, "required": [ "reason", "reasonDetail" ] }, { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "budget" ] }, "reasonDetail": { "type": "string", "enum": [ "other" ] }, "reasonComment": { "$ref": "#/components/schemas/BillingCancellationComment" } }, "additionalProperties": false, "required": [ "reason", "reasonDetail", "reasonComment" ] } ] }, "BillingCoupon": { "type": "string", "description": "Coupon or promotion code to apply to billing operations.", "minLength": 1, "maxLength": 500 }, "BillingMeter": { "type": "string", "description": "Identifier of a billing meter", "enum": [ "ai_responses", "ai_agent_responses", "translation_words" ] }, "UpgradeOrganizationBilling": { "type": "object", "properties": { "product": { "$ref": "#/components/schemas/BillingProduct" }, "interval": { "$ref": "#/components/schemas/BillingInterval" }, "changes": { "$ref": "#/components/schemas/SubscriptionChanges" }, "reason": { "type": "string", "description": "Reason that triggered the billing upgrade" }, "cancellationFeedback": { "$ref": "#/components/schemas/BillingCancellationFeedback" }, "coupon": { "$ref": "#/components/schemas/BillingCoupon", "description": "Coupon or promotion code to apply to the subscription" }, "addons": { "type": "array", "description": "Optional usage addons to apply when upgrading: - if set, apply provided billable addons (non-billable meters are ignored) - if omitted, keep current subscription addons (or billing addons for new subs) - if omitted during interval switch, keep addon selection and switch addon price interval - if empty, or all provided meters are ignored, remove all existing billable addons\n", "items": { "$ref": "#/components/schemas/BillingMeter" } }, "creditsBundle": { "$ref": "#/components/schemas/BillingCreditsBundle" }, "mode": { "type": "string", "description": "Mode to use for the upgrade (default value is `commit`): - `commit`: a checkout session is returned or the upgrade is applied directly - `preview`: a preview invoice is always returned\n", "enum": [ "commit", "preview" ] } }, "required": [ "product", "interval" ] }, "BillingInvoiceSummaryLine": { "type": "object", "description": "A product line of an invoice, enriched and normalized for the billing summary UI.", "properties": { "description": { "description": "How Stripe describes the line, as a fallback for lines the client cannot label itself.", "type": "string" }, "amount": { "type": "number" }, "quantity": { "description": "How many units the line bills, such as the number of members.", "type": "number" }, "siteType": { "description": "Which kind of site a `sites` line bills for.", "$ref": "#/components/schemas/SiteType" }, "unitAmount": { "description": "Price of a single unit, over the period the line covers.", "type": "number" }, "periodStart": { "$ref": "#/components/schemas/Timestamp" }, "periodEnd": { "$ref": "#/components/schemas/Timestamp" }, "category": { "type": "string", "description": "What the invoice line is billing for, so a preview can be grouped by product area.", "enum": [ "members", "sites", "addons", "credits", "usage", "watermark_removal", "other" ] } }, "required": [ "amount", "description", "periodStart", "periodEnd", "category" ] }, "BillingInvoiceAdjustment": { "type": "object", "description": "An amount adjusting an invoice, summed across everything of its type.", "properties": { "type": { "type": "string", "description": "What adjusts the amount an invoice bills, beyond the products it lists. `proration` is the net of the mid-period changes, and `balance` the credit applied from the customer's balance.", "enum": [ "proration", "watermark_removal", "balance" ] }, "amount": { "description": "The adjustment, negative when it reduces the amount billed.", "type": "number" } }, "required": [ "type", "amount" ] }, "AICreditGrantType": { "type": "string", "description": "Where AI credits come from: - `paid`: credits included in the monthly bundle - `bonus`: free credits included with the monthly bundle - `site`: credits from published paid sites - `rollover`: unused paid credits carried over from the previous period - `custom`: credits granted manually by Sales or Support", "enum": [ "paid", "bonus", "site", "rollover", "custom" ] }, "BillingCreditsTotals": { "type": "object", "description": "A total of AI credits, and how much of it is left.", "properties": { "grantedCredits": { "description": "Credits granted for the current AI billing period.", "type": "number" }, "remainingCredits": { "description": "Credits still available of those granted.", "type": "number" } }, "required": [ "grantedCredits", "remainingCredits" ] }, "BillingInvoicePreview": { "type": "object", "properties": { "amount": { "description": "Final total owed for this invoice after discounts and credits.", "type": "number" }, "subtotal": { "description": "Sum of invoice line items before discounts and credits are applied.", "type": "number" }, "amountDueToday": { "description": "Remaining unpaid amount on this invoice, what would be charged now.", "type": "number" }, "customerBalance": { "description": "Current balance, if any, being stored on the customer. If positive, the customer has credit to apply to their next invoice.", "type": "number" }, "remainingCustomerBalance": { "description": "Current balance after potential upgrade.", "type": "number" }, "lines": { "type": "array", "description": "Details of the change happening on the subscription.", "items": { "type": "object", "properties": { "description": { "type": "string" }, "amount": { "type": "number" }, "periodStart": { "$ref": "#/components/schemas/Timestamp" }, "periodEnd": { "$ref": "#/components/schemas/Timestamp" } }, "required": [ "amount", "description", "periodStart", "periodEnd" ] } }, "summary": { "type": "object", "description": "Structured representation of the invoice for the current billing summary UI.", "properties": { "lines": { "type": "array", "description": "Product lines enriched and normalized for the billing summary UI.", "items": { "$ref": "#/components/schemas/BillingInvoiceSummaryLine" } }, "adjustments": { "type": "array", "description": "What adjusts the amount billed beyond the products listed, each summed across its type. Only the ones that apply are returned.", "items": { "$ref": "#/components/schemas/BillingInvoiceAdjustment" } }, "creditGrants": { "type": "array", "description": "AI credits available for the current AI billing period. Empty when the organization is not billed for AI usage.", "items": { "type": "object", "description": "AI credits granted to the organization for the current AI billing period.", "properties": { "type": { "$ref": "#/components/schemas/AICreditGrantType" }, "priority": { "type": "number", "description": "Stripe spending priority. Lower values are consumed first." }, "grantedCredits": { "description": "Credits available from this grant before the current invoice usage.", "type": "number" }, "usedCredits": { "description": "Credits of the grant spent by the usage metered so far.", "type": "number" }, "remainingCredits": { "description": "Credits of the grant still available.", "type": "number" }, "sites": { "description": "For a `site` grant, the published sites the credits come from.", "type": "array", "items": { "type": "object", "description": "The published sites of one type that the grant comes from.", "properties": { "siteType": { "$ref": "#/components/schemas/SiteType" }, "count": { "description": "How many sites of this type are published.", "type": "number" }, "creditsPerSite": { "description": "Credits included with one site of this type.", "type": "number" }, "grantedCredits": { "description": "Credits these sites contribute to the grant.", "type": "number" } }, "required": [ "siteType", "count", "creditsPerSite", "grantedCredits" ] } } }, "required": [ "type", "grantedCredits", "usedCredits", "remainingCredits" ] } }, "credits": { "type": "object", "description": "The AI credits of the current billing period, grouped the ways the billing screens display them.", "properties": { "grantedCredits": { "description": "Credits granted across every grant.", "type": "number" }, "usedCredits": { "description": "Credits spent by the usage metered so far.", "type": "number" }, "remainingCredits": { "description": "Credits still available across every grant.", "type": "number" }, "coveredAmount": { "description": "Part of the metered AI usage paid by credits rather than billed, as a positive amount.", "type": "number" }, "paid": { "description": "The credits the organization pays for.", "$ref": "#/components/schemas/BillingCreditsTotals" }, "free": { "description": "The bonus, site and custom credits.", "$ref": "#/components/schemas/BillingCreditsTotals" }, "bundle": { "description": "The credits of the monthly bundle, both paid and bonus.", "$ref": "#/components/schemas/BillingCreditsTotals" } }, "required": [ "grantedCredits", "usedCredits", "remainingCredits", "coveredAmount", "paid", "free", "bundle" ] }, "chargeDate": { "description": "When the upcoming invoice is charged.", "$ref": "#/components/schemas/Timestamp" }, "renewal": { "description": "The renewal invoice, when the plan and the AI usage bill on different cadences. Absent when a single invoice covers everything.", "type": "object", "properties": { "lines": { "type": "array", "description": "Product lines of the renewal invoice.", "items": { "$ref": "#/components/schemas/BillingInvoiceSummaryLine" } }, "adjustments": { "type": "array", "description": "What adjusts the renewal beyond the products listed. Prorations and the customer balance are reported on the upcoming invoice instead.", "items": { "$ref": "#/components/schemas/BillingInvoiceAdjustment" } }, "discounts": { "type": "array", "description": "Discounts still applying when the subscription renews.", "items": { "type": "object", "properties": { "description": { "description": "The description of the applied discount.", "type": "string" }, "amount": { "description": "The amount of the applied discount.", "type": "number" } }, "required": [ "amount", "description" ] } }, "amount": { "description": "Total owed for the renewal invoice.", "type": "number" }, "chargeDate": { "description": "When the renewal invoice is charged.", "$ref": "#/components/schemas/Timestamp" } }, "required": [ "lines", "adjustments", "discounts", "amount", "chargeDate" ] } }, "required": [ "lines", "adjustments", "creditGrants", "credits" ] }, "discounts": { "type": "array", "description": "Discounts applied to the subscription.", "items": { "type": "object", "properties": { "description": { "description": "The description of the applied discount.", "type": "string" }, "amount": { "description": "The amount of the applied discount.", "type": "number" } }, "required": [ "amount", "description" ] } } }, "required": [ "subtotal", "amount", "amountDueToday", "customerBalance", "remainingCustomerBalance", "lines", "summary" ] }, "credits": { "type": "object", "description": "The AI credits of the current billing period, grouped the ways the billing screens display them.", "properties": { "grantedCredits": { "description": "Credits granted across every grant.", "type": "number" }, "usedCredits": { "description": "Credits spent by the usage metered so far.", "type": "number" }, "remainingCredits": { "description": "Credits still available across every grant.", "type": "number" }, "coveredAmount": { "description": "Part of the metered AI usage paid by credits rather than billed, as a positive amount.", "type": "number" }, "paid": { "description": "The credits the organization pays for.", "$ref": "#/components/schemas/BillingCreditsTotals" }, "free": { "description": "The bonus, site and custom credits.", "$ref": "#/components/schemas/BillingCreditsTotals" }, "bundle": { "description": "The credits of the monthly bundle, both paid and bonus.", "$ref": "#/components/schemas/BillingCreditsTotals" } }, "required": [ "grantedCredits", "usedCredits", "remainingCredits", "coveredAmount", "paid", "free", "bundle" ] }, "creditGrants": { "type": "array", "description": "AI credits available for the current AI billing period. Empty when the organization is not billed for AI usage.", "items": { "type": "object", "description": "AI credits granted to the organization for the current AI billing period.", "properties": { "type": { "$ref": "#/components/schemas/AICreditGrantType" }, "priority": { "type": "number", "description": "Stripe spending priority. Lower values are consumed first." }, "grantedCredits": { "description": "Credits available from this grant before the current invoice usage.", "type": "number" }, "usedCredits": { "description": "Credits of the grant spent by the usage metered so far.", "type": "number" }, "remainingCredits": { "description": "Credits of the grant still available.", "type": "number" }, "sites": { "description": "For a `site` grant, the published sites the credits come from.", "type": "array", "items": { "type": "object", "description": "The published sites of one type that the grant comes from.", "properties": { "siteType": { "$ref": "#/components/schemas/SiteType" }, "count": { "description": "How many sites of this type are published.", "type": "number" }, "creditsPerSite": { "description": "Credits included with one site of this type.", "type": "number" }, "grantedCredits": { "description": "Credits these sites contribute to the grant.", "type": "number" } }, "required": [ "siteType", "count", "creditsPerSite", "grantedCredits" ] } } }, "required": [ "type", "grantedCredits", "usedCredits", "remainingCredits" ] } }, "BillingCreditBalance": { "type": "object", "description": "Credit balance after an accepted bundle change, including grants pending webhook synchronization.", "properties": { "creditsBundle": { "$ref": "#/components/schemas/BillingCreditsBundle" }, "credits": { "$ref": "#/components/schemas/credits" }, "creditGrants": { "$ref": "#/components/schemas/creditGrants" } }, "required": [ "creditsBundle", "credits", "creditGrants" ] }, "BillingUpgrade": { "oneOf": [ { "type": "object", "properties": { "result": { "type": "string", "enum": [ "checkout" ] }, "sessionId": { "type": "string", "description": "Stripe payment session ID" } }, "required": [ "result", "sessionId" ] }, { "type": "object", "properties": { "result": { "type": "string", "enum": [ "preview" ] }, "invoice": { "$ref": "#/components/schemas/BillingInvoicePreview" } }, "required": [ "result", "invoice" ] }, { "type": "object", "properties": { "result": { "type": "string", "enum": [ "upgraded" ] }, "creditBalance": { "$ref": "#/components/schemas/BillingCreditBalance" } }, "required": [ "result" ] }, { "type": "object", "properties": { "result": { "type": "string", "enum": [ "downgraded" ] } }, "required": [ "result" ] }, { "type": "object", "properties": { "result": { "type": "string", "enum": [ "interval_changed" ] } }, "required": [ "result" ] } ] }, "BillingPortal": { "type": "object", "properties": { "url": { "type": "string", "description": "URL to the billing portal for an organization" } }, "required": [ "url" ] }, "BillingSwitchAction": { "type": "string", "enum": [ "trial", "upgrade", "upgrade_passive", "downgrade", "switch_interval" ] }, "AIUsageInterval": { "type": "string", "description": "UTC calendar interval for AI usage, with weeks starting on Monday.", "enum": [ "day", "week", "month", "year" ], "default": "day" }, "OrganizationAIUsage": { "type": "object", "required": [ "periods", "from", "to" ], "properties": { "from": { "type": "string", "format": "date-time", "description": "Inclusive start of the queried range." }, "to": { "type": "string", "format": "date-time", "description": "Exclusive end of the queried range, capped at the current instant." }, "periods": { "type": "array", "description": "Chronological calendar buckets. Edge buckets include only the requested dates.", "items": { "type": "object", "required": [ "date", "credits", "features" ], "properties": { "date": { "type": "string", "format": "date", "description": "UTC date at the start of this calendar bucket." }, "credits": { "type": "number", "description": "Total credits used in this bucket." }, "features": { "type": "array", "items": { "type": "object", "required": [ "feature", "credits", "creditsPercent" ], "properties": { "feature": { "type": "string", "description": "AI feature category with recorded credit usage." }, "credits": { "type": "number" }, "creditsPercent": { "type": "number", "description": "Percentage of this bucket's total credits (0 to 100)." } } } } } } } } }, "BillingMeterUsage": { "type": "object", "description": "Usage metrics for a billing meter", "properties": { "total": { "description": "Total usage for the current billing period", "type": "number" }, "entries": { "description": "Usage entries for the period", "type": "array", "items": { "type": "object", "properties": { "date": { "$ref": "#/components/schemas/Timestamp" }, "value": { "type": "number", "description": "Usage value for the date" } }, "required": [ "date", "value" ] } } }, "required": [ "total", "entries" ] }, "OrganizationFeature": { "type": "string", "description": "An organization feature used for plan access and upgrade prompts.", "enum": [ "max-members", "ai", "ai-lens", "pdf-export", "ai-writing", "reusable-content", "translations", "members-advanced-roles", "members-teams", "members-team-owners", "security-saml", "scim", "verified-domains", "change-requests-merge-rules" ] }, "SearchSpaceResult": { "type": "object", "description": "Search result representing a space.", "properties": { "type": { "type": "string", "enum": [ "space" ] }, "id": { "type": "string" }, "title": { "type": "string" }, "score": { "$ref": "#/components/schemas/SearchResultScore" }, "pages": { "type": "array", "items": { "$ref": "#/components/schemas/SearchPageResult" } } }, "required": [ "type", "id", "title", "score", "pages" ] }, "CreateSpace": { "allOf": [ { "type": "object", "properties": { "title": { "type": "string", "maxLength": 50 }, "emoji": { "$ref": "#/components/schemas/Emoji" }, "parent": { "type": "string", "description": "ID of a parent collection" }, "language": { "$ref": "#/components/schemas/TranslationLanguage" }, "editMode": { "$ref": "#/components/schemas/SpaceEditMode", "description": "The edit mode of the space" } } }, { "anyOf": [ { "type": "object", "properties": {}, "additionalProperties": true }, { "oneOf": [ { "type": "object", "description": "Create a space from a template", "required": [ "template" ], "properties": { "template": { "$ref": "#/components/schemas/ApplySpaceTemplate" } } }, { "type": "object", "description": "Create a space from a computed content source", "required": [ "computedSource" ], "properties": { "computedSource": { "$ref": "#/components/schemas/ComputedContentSourceRevision" } } }, { "type": "object", "description": "Create a completely empty space (no page in it)", "required": [ "empty" ], "properties": { "empty": { "type": "boolean", "enum": [ true ] } } } ] } ] } ] }, "InstalledIntegrationTarget": { "description": "The resource on which an integration is installed.", "oneOf": [ { "type": "object", "required": [ "type", "organizationId" ], "properties": { "type": { "type": "string", "enum": [ "organization" ] }, "organizationId": { "type": "string" } } }, { "type": "object", "required": [ "type", "siteId" ], "properties": { "type": { "type": "string", "enum": [ "site" ] }, "siteId": { "type": "string" } } }, { "type": "object", "required": [ "type", "spaceId" ], "properties": { "type": { "type": "string", "enum": [ "space" ] }, "spaceId": { "type": "string" } } } ] }, "InstalledIntegration": { "type": "object", "description": "An integration installation, its current status, and the resource it targets.", "required": [ "status", "integration", "target" ], "properties": { "status": { "$ref": "#/components/schemas/IntegrationInstallationStatus" }, "integration": { "$ref": "#/components/schemas/Integration" }, "target": { "$ref": "#/components/schemas/InstalledIntegrationTarget" } } }, "SAMLProviderLabel": { "type": "string", "minLength": 1, "maxLength": 30 }, "SAMLProviderStatus": { "type": "string", "description": "Status of the provider.\n- `active`: The provider is active and can be used to authenticate users.\n- `pending`: The provider is pending and is not yet fully configured.\n", "enum": [ "active", "pending" ] }, "OrganizationSAMLProvider": { "type": "object", "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"saml-provider\"", "enum": [ "saml-provider" ] }, "id": { "type": "string", "description": "Unique identifier for the provider." }, "label": { "$ref": "#/components/schemas/SAMLProviderLabel" }, "ssoURL": { "$ref": "#/components/schemas/URL" }, "entityID": { "$ref": "#/components/schemas/SAMLProviderEntityID" }, "certificate": { "$ref": "#/components/schemas/SAMLProviderCertificate" }, "defaultTeam": { "$ref": "#/components/schemas/OrganizationTeam" }, "defaultTeamFromDomain": { "type": "boolean", "description": "Whether people join the team of the verified email domain they signed in with, instead of `defaultTeam`.\n" }, "defaultRole": { "$ref": "#/components/schemas/SAMLProviderDefaultRole" }, "createdAt": { "description": "Date at which the provider was created.", "$ref": "#/components/schemas/Timestamp" }, "status": { "$ref": "#/components/schemas/SAMLProviderStatus" }, "domains": { "type": "array", "description": "Email domains the provider signs people in for. Absent on providers created before domains existed, which accept any email.\n", "items": { "$ref": "#/components/schemas/SAMLProviderDomain" } }, "service": { "description": "Metadata about the service provider.", "properties": { "acsURL": { "type": "string", "description": "Assertion Consumer Service (ACS) URL", "format": "uri" }, "startURL": { "type": "string", "description": "Start URL for the Identity Provider", "format": "uri" }, "entityID": { "$ref": "#/components/schemas/SAMLProviderEntityID" } }, "required": [ "acsURL", "startURL", "entityID" ] }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "location": { "type": "string", "description": "URL of the SAML Provider in the API", "format": "uri" } }, "required": [ "location" ] } }, "required": [ "object", "id", "label", "ssoURL", "entityID", "certificate", "defaultRole", "createdAt", "status", "service", "urls" ] }, "OrganizationDomainStatus": { "type": "string", "description": "Verification status of the domain. \"legacy\" is a domain added before verification existed: it keeps letting people join automatically without being verified.\n", "enum": [ "legacy", "pending", "verified", "error" ] }, "OrganizationDomainDefaultRole": { "description": "Role given to people who join through the domain. \"default\" uses the organization's default role, and \"guest\" adds them as guests.\n", "oneOf": [ { "$ref": "#/components/schemas/MemberRole" }, { "type": "string", "enum": [ "default", "guest" ] } ] }, "OrganizationDomain": { "type": "object", "description": "An email domain of an organization.", "properties": { "object": { "type": "string", "description": "The object type, which is always \"organization-domain\"", "enum": [ "organization-domain" ] }, "domain": { "type": "string", "description": "The email domain, such as \"example.com\"" }, "status": { "$ref": "#/components/schemas/OrganizationDomainStatus" }, "statusDescription": { "type": "string", "description": "Why the last verification failed" }, "verificationRecord": { "type": "object", "description": "DNS TXT record to add to the domain to verify it", "properties": { "type": { "type": "string", "enum": [ "TXT" ] }, "name": { "type": "string" }, "value": { "type": "string" } }, "required": [ "type", "name", "value" ] }, "autoJoinEnabled": { "type": "boolean", "description": "Whether people with an email on the domain join the organization automatically" }, "defaultRole": { "$ref": "#/components/schemas/OrganizationDomainDefaultRole" }, "defaultTeam": { "type": "string", "description": "ID of the team that people joining through the domain are added to" }, "verifiedAt": { "description": "Date the domain was verified", "$ref": "#/components/schemas/Timestamp" }, "createdAt": { "description": "Date the domain was added", "$ref": "#/components/schemas/Timestamp" }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "location": { "description": "URL of the domain in the API", "$ref": "#/components/schemas/URL" } }, "required": [ "location" ] } }, "required": [ "object", "domain", "status", "autoJoinEnabled", "defaultRole", "createdAt", "urls" ] }, "SCIMConnectionLabel": { "type": "string", "description": "Name of the SCIM connection, shown to organization admins.", "minLength": 1, "maxLength": 100 }, "OrganizationSCIMConnection": { "type": "object", "description": "A SCIM connection through which an identity provider provisions organization members.", "properties": { "object": { "type": "string", "description": "The object type, which is always \"scim-connection\"", "enum": [ "scim-connection" ] }, "id": { "type": "string", "description": "Unique identifier of the SCIM connection" }, "label": { "$ref": "#/components/schemas/SCIMConnectionLabel" }, "provider": { "$ref": "#/components/schemas/IdPConnectionProvider" }, "baseURL": { "description": "SCIM base URL to configure in the identity provider", "$ref": "#/components/schemas/URL" }, "tokenHint": { "type": "string", "description": "Last characters of the current token, to identify it" }, "tokenCreatedAt": { "description": "Date the current token was created", "$ref": "#/components/schemas/Timestamp" }, "lastUsedAt": { "description": "Date of the last request authenticated with the token", "$ref": "#/components/schemas/Timestamp" }, "createdAt": { "description": "Date of creation", "$ref": "#/components/schemas/Timestamp" }, "updatedAt": { "description": "Date of the last update", "$ref": "#/components/schemas/Timestamp" }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "location": { "description": "URL of the SCIM connection in the API", "$ref": "#/components/schemas/URL" } }, "required": [ "location" ] } }, "required": [ "object", "id", "label", "provider", "baseURL", "tokenHint", "tokenCreatedAt", "createdAt", "updatedAt", "urls" ] }, "OrganizationSCIMConnectionWithToken": { "description": "A SCIM connection with its token, returned only when the token is created.", "type": "object", "properties": { "connection": { "$ref": "#/components/schemas/OrganizationSCIMConnection" }, "token": { "type": "string", "description": "Bearer token to configure in the identity provider. It can't be retrieved again." } }, "required": [ "connection", "token" ] }, "OrganizationSSOProviderLogin": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the provider." }, "label": { "$ref": "#/components/schemas/SAMLProviderLabel" }, "startURL": { "type": "string", "description": "The starting login URL for the Identity Provider", "format": "uri" } }, "required": [ "id", "label", "startURL" ] }, "OrganizationUsageSpaces": { "type": "object", "description": "Spaces usage metrics of an organization", "properties": { "total": { "description": "Count of all spaces", "type": "number" } }, "required": [ "total" ] }, "OrganizationUsageCollections": { "type": "object", "description": "Collections usage metrics of an organization", "properties": { "total": { "description": "Count of all collections", "type": "number" } }, "required": [ "total" ] }, "OrganizationUsageSites": { "type": "object", "description": "Sites usage metrics of an organization", "properties": { "total": { "description": "Count of all sites", "type": "number" }, "basic": { "description": "Count of all basic sites", "type": "number" }, "premium": { "description": "Count of all premium sites", "type": "number" }, "ultimate": { "description": "Count of all ultimate sites", "type": "number" }, "sponsored": { "description": "Count of all sponsored sites", "type": "number" } }, "required": [ "total", "basic", "premium", "ultimate", "sponsored" ] }, "OrganizationUsageTeams": { "type": "object", "description": "Team members usage metrics of an organization", "properties": { "total": { "description": "Count of all teams", "type": "number" } }, "required": [ "total" ] }, "OrganizationUsageMembers": { "type": "object", "description": "Members usage metrics of an organization", "properties": { "total": { "description": "Count of all members, including disabled ones", "type": "number" }, "active": { "description": "Count of members that are not disabled", "type": "number" }, "disabled": { "description": "Count of disabled members, by the reason they are disabled", "type": "object", "properties": { "billing": { "type": "number" }, "scim": { "type": "number" }, "admin": { "type": "number" } }, "required": [ "billing", "scim", "admin" ] }, "seats": { "description": "Count of paid seats. On the Free plan, it includes members disabled for billing, since\nupgrading re-enables them. On paid plans, it only includes active members.\n", "type": "number" }, "admin": { "description": "Count of all admins", "type": "number" }, "create": { "description": "Count of all creators", "type": "number" }, "edit": { "description": "Count of all editors", "type": "number" }, "review": { "description": "Count of all reviewers", "type": "number" }, "comment": { "description": "Count of all commenters", "type": "number" }, "read": { "description": "Count of all readers", "type": "number" }, "guest": { "description": "Count of all guests", "type": "number" } }, "required": [ "total", "active", "disabled", "seats", "admin", "create", "edit", "review", "comment", "read", "guest" ] }, "OrganizationUsageTeamMembers": { "type": "object", "description": "Team members usage metrics of an organization", "properties": { "total": { "description": "Count of all organization members in a team", "type": "number" }, "owner": { "description": "Count of all team owners", "type": "number" }, "member": { "description": "Count of all team members", "type": "number" } }, "required": [ "total", "owner", "member" ] }, "OrganizationUsage": { "type": "object", "description": "All usage metrics of an organization", "properties": { "spaces": { "$ref": "#/components/schemas/OrganizationUsageSpaces" }, "collections": { "$ref": "#/components/schemas/OrganizationUsageCollections" }, "sites": { "$ref": "#/components/schemas/OrganizationUsageSites" }, "teams": { "$ref": "#/components/schemas/OrganizationUsageTeams" }, "members": { "$ref": "#/components/schemas/OrganizationUsageMembers" }, "teamMembers": { "$ref": "#/components/schemas/OrganizationUsageTeamMembers" }, "permissions": { "type": "object", "description": "The set of permissions for the organization's usage.", "required": [ "view" ], "properties": { "view": { "type": "boolean", "description": "Can the user view the organization's usage." } } } }, "required": [ "spaces", "collections", "sites", "teams", "members", "teamMembers", "permissions" ] }, "SearchAIQuery": { "type": "object", "properties": { "query": { "type": "string" }, "previousQueries": { "type": "array", "deprecated": true, "maxItems": 10, "items": { "type": "string" } } }, "required": [ "query" ] }, "SearchAIAnswerSourcePage": { "type": "object", "title": "Page source", "description": "The source points to a page in a space.", "properties": { "type": { "type": "string", "enum": [ "page" ] }, "reason": { "type": "string", "description": "Short explanation of how the source was used to answer." }, "page": { "type": "string", "description": "The page ID of the source." }, "revision": { "type": "string", "description": "The revision ID where the page was extracted from." }, "space": { "type": "string", "description": "The space ID owning the page." }, "title": { "type": "string", "description": "The title of the page, as of `revision`." }, "sections": { "type": "array", "items": { "type": "string" }, "description": "The IDs of the sections of the page that were used to answer the question." } }, "required": [ "type", "page", "revision", "space", "title", "sections" ] }, "SearchAIAnswerSourceRecord": { "type": "object", "title": "Site context record source", "description": "The source points to an ingested site context record.", "properties": { "type": { "type": "string", "enum": [ "record" ] }, "reason": { "type": "string", "description": "Short explanation of how the source was used to answer." }, "record": { "type": "string", "description": "The context record ID of the source." }, "site": { "type": "string", "description": "The site ID owning the source record." }, "title": { "type": "string", "description": "The title of the source record." }, "url": { "type": "string", "format": "uri", "description": "The source URL of the context record." } }, "required": [ "type", "record", "site", "title", "url" ] }, "SearchAIAnswerSource": { "oneOf": [ { "$ref": "#/components/schemas/SearchAIAnswerSourcePage" }, { "$ref": "#/components/schemas/SearchAIAnswerSourceRecord" } ], "discriminator": { "propertyName": "type" } }, "SearchAIAnswer": { "type": "object", "description": "Answer from AI for a question asked on a content.", "properties": { "answer": { "$ref": "#/components/schemas/Document" }, "followupQuestions": { "type": "array", "items": { "type": "string" } }, "sources": { "type": "array", "description": "The sources used to generate the answer.", "items": { "$ref": "#/components/schemas/SearchAIAnswerSource" } } }, "required": [ "sources", "followupQuestions" ] }, "SearchAIRecommendedQuestions": { "type": "object", "description": "Questions recommended by the AI for the given content.", "properties": { "questions": { "type": "array", "items": { "type": "string" } } }, "required": [ "questions" ] }, "SearchAIRecommendedQuestionStream": { "type": "object", "properties": { "question": { "type": "string" } }, "required": [ "question" ] }, "SearchAIAnswerStream": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "answer" ] }, "answer": { "$ref": "#/components/schemas/SearchAIAnswer" } }, "required": [ "type", "answer" ] }, "OpenAPISpecSlug": { "description": "Slug used as reference", "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$" }, "OpenAPISpecProcessingState": { "description": "Processing state", "enum": [ "pending", "progress", "complete" ] }, "OpenAPISpecProcessingErrorCode": { "description": "OpenAPI processing error code", "enum": [ "FETCH_TIMEOUT", "FETCH_ERROR", "PARSE_ERROR" ] }, "OpenAPIErrorObject": { "type": "object", "description": "OpenAPI error object.", "properties": { "message": { "type": "string", "description": "Description of the error." }, "code": { "type": "string", "description": "Unique code of the error." } }, "required": [ "message" ] }, "OpenAPISpec": { "type": "object", "properties": { "object": { "description": "The object type, which is always \"openapi-spec\"", "type": "string", "enum": [ "openapi-spec" ] }, "id": { "description": "Unique identifier", "type": "string" }, "createdAt": { "description": "Date of creation", "$ref": "#/components/schemas/Timestamp" }, "updatedAt": { "description": "Date of the last update", "$ref": "#/components/schemas/Timestamp" }, "slug": { "$ref": "#/components/schemas/OpenAPISpecSlug" }, "sourceURL": { "$ref": "#/components/schemas/URL" }, "processingState": { "$ref": "#/components/schemas/OpenAPISpecProcessingState" }, "visibility": { "$ref": "#/components/schemas/OpenAPISpecVisibility" }, "lastVersion": { "type": "string", "description": "ID of the latest version of the OpenAPI specification" }, "lastProcessedAt": { "description": "Date of the last processing", "$ref": "#/components/schemas/Timestamp" }, "lastProcessErrorCode": { "$ref": "#/components/schemas/OpenAPISpecProcessingErrorCode" }, "lastProcessedErrors": { "type": "array", "items": { "$ref": "#/components/schemas/OpenAPIErrorObject" } }, "lastProcessedErrorCount": { "type": "integer", "minimum": 0, "description": "Total number of processing errors before truncation of lastProcessedErrors." }, "permissions": { "type": "object", "description": "The set of permissions for the OpenAPI specification.", "required": [ "view", "edit" ], "properties": { "view": { "type": "boolean", "description": "Can the user view the specification." }, "edit": { "type": "boolean", "description": "Can the user edit the specification." } } }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "location": { "description": "URL of the OpenAPI specification in the API", "$ref": "#/components/schemas/URL" }, "app": { "description": "URL of the OpenAPI specification in the application", "$ref": "#/components/schemas/URL" }, "published": { "type": "string", "description": "URL of the published spec. Only defined when visibility is \"published.\"", "format": "uri" } }, "required": [ "app", "location" ] } }, "required": [ "object", "id", "createdAt", "updatedAt", "slug", "processingState", "lastProcessedErrorCount", "permissions", "urls" ] }, "OpenAPISpecSource": { "oneOf": [ { "description": "Create a specification from an URL", "type": "object", "properties": { "url": { "$ref": "#/components/schemas/URL" } }, "required": [ "url" ] }, { "description": "Create a specification from a text string", "type": "object", "properties": { "text": { "description": "OpenAPI specification as text", "type": "string", "minLength": 1 } }, "required": [ "text" ] } ] }, "OpenAPISpecVersion": { "type": "object", "properties": { "object": { "description": "The object type, which is always \"openapi-spec-version\"", "type": "string", "enum": [ "openapi-spec-version" ] }, "id": { "description": "Unique identifier", "type": "string" }, "createdAt": { "description": "Date of creation", "$ref": "#/components/schemas/Timestamp" }, "url": { "description": "URL where the specification is accessible.", "$ref": "#/components/schemas/URL" }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "location": { "description": "URL of the OpenAPI specification version in the API", "$ref": "#/components/schemas/URL" } }, "required": [ "location" ] } }, "required": [ "object", "id", "url", "urls" ] }, "OpenAPISpecContent": { "description": "Content of the specification available through filesystem or public URL.", "type": "object", "properties": { "filesystem": { "description": "Filesystem containing all specifications.", "type": "object" }, "urls": { "description": "URLs associated with the specification content.", "type": "object", "properties": { "source": { "$ref": "#/components/schemas/URL" }, "public": { "description": "Publicly accessible URL for the specification. Available for public specs (proxy URL for stored specs, source URL for external specs). Null for private specs. Can be used for the \"Try it\" feature.", "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/URL" } ] } }, "required": [ "source", "public" ] } }, "required": [ "filesystem", "urls" ] }, "OpenAPISpecRawContent": { "description": "Raw original content of the specification entrypoint file.", "type": "object", "properties": { "text": { "type": "string", "description": "Raw specification text, exactly as submitted." }, "format": { "type": "string", "enum": [ "json", "yaml" ], "description": "Format of the raw specification text." } }, "required": [ "text", "format" ] }, "OrganizationAgentInstructions": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "agent-instructions" ] }, "instructions": { "$ref": "#/components/schemas/JSONDocument", "description": "Document containing the Docs agent instructions." }, "updatedAt": { "$ref": "#/components/schemas/Timestamp" }, "updatedBy": { "type": "string", "description": "Identifier of the member who last updated the instructions." }, "urls": { "type": "object", "description": "URLs related to the custom instructions.", "properties": { "location": { "type": "string", "description": "Relative URL to the resource in the API." } }, "required": [ "location" ] } }, "required": [ "object", "instructions", "updatedAt", "updatedBy", "urls" ] }, "TranslationStatus": { "type": "string", "enum": [ "pending", "running", "completed", "failed" ] }, "TranslationSource": { "type": "object", "required": [ "space", "language" ], "properties": { "space": { "type": "string", "description": "ID of the source space" }, "language": { "$ref": "#/components/schemas/TranslationLanguage" } } }, "Translation": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "translation" ] }, "id": { "type": "string", "description": "Unique identifier of the translation sync" }, "status": { "$ref": "#/components/schemas/TranslationStatus" }, "source": { "$ref": "#/components/schemas/TranslationSource" }, "language": { "$ref": "#/components/schemas/TranslationLanguage" }, "instructions": { "$ref": "#/components/schemas/JSONDocument" }, "result": { "$ref": "#/components/schemas/TranslationResult" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "stats": { "type": "object", "properties": { "runs": { "type": "integer", "description": "Total number of times the translation has been run" }, "totalWords": { "type": "integer", "description": "Total number of words counted toward translation usage over all runs" }, "totalPages": { "type": "integer", "description": "Total number of unique pages translated" }, "totalDuration": { "type": "integer", "description": "Total duration of all runs (in seconds)" }, "latestRunDuration": { "type": "integer", "description": "Duration of the latest run (in seconds)" }, "latestPages": { "type": "integer", "description": "Number of unique pages translated in the latest run" }, "latestWords": { "type": "integer", "description": "Number of words counted toward translation usage in the latest run" } }, "required": [ "runs", "totalWords", "totalPages", "totalDuration", "latestRunDuration", "latestPages", "latestWords" ] }, "permissions": { "type": "object", "properties": { "view": { "type": "boolean", "description": "Whether the user can view the object" }, "edit": { "type": "boolean", "description": "Whether the user can edit the object" } }, "required": [ "view", "edit" ] }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "location": { "type": "string", "description": "URL of the translation settings in the API", "format": "uri" } }, "required": [ "location" ] } }, "required": [ "object", "id", "status", "source", "language", "instructions", "createdAt", "updatedAt", "stats", "permissions", "urls" ] }, "GlossaryTranslations": { "type": "object", "additionalProperties": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[^\\n\\r]*$" }, "description": "Mapping of language codes to translated terms" }, "GlossaryEntry": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "glossary-entry" ] }, "id": { "type": "string", "description": "Unique identifier of the glossary entry" }, "translations": { "$ref": "#/components/schemas/GlossaryTranslations" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "urls": { "type": "object", "properties": { "location": { "type": "string", "format": "uri", "description": "URL of the glossary entry in the API" } }, "required": [ "location" ] } }, "required": [ "object", "id", "translations", "createdAt", "updatedAt", "urls" ] }, "GlossaryBatchOperation": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": [ "insert" ] }, "translations": { "$ref": "#/components/schemas/GlossaryTranslations" } }, "required": [ "type", "translations" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "update" ] }, "id": { "type": "string" }, "translations": { "$ref": "#/components/schemas/GlossaryTranslations" } }, "required": [ "type", "id", "translations" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "delete" ] }, "id": { "type": "string" } }, "required": [ "type", "id" ] } ] }, "StorageFileMetadata": { "type": "object", "properties": { "name": { "type": "string", "description": "Original filename" }, "type": { "type": "string", "description": "MIME type of the file" }, "size": { "type": "number", "description": "Size of the file in bytes" } }, "required": [ "name", "type", "size" ] }, "StorageUploadKind": { "type": "string", "enum": [ "customization_font", "import_file", "organization_file" ] }, "StorageUploadURL": { "type": "object", "properties": { "object": { "type": "string", "description": "The kind of file to upload", "enum": [ "storage-signed-url" ] }, "url": { "$ref": "#/components/schemas/URL", "description": "Presigned URL for uploading the file" }, "key": { "type": "string", "description": "The bucket object key for the file" } }, "required": [ "object", "url", "key" ] }, "CustomizationFontDefinition": { "allOf": [ { "$ref": "#/components/schemas/CustomizationFontDefinitionInput" }, { "type": "object", "properties": { "permissions": { "type": "object", "description": "The set of permissions for the font definition", "properties": { "edit": { "type": "boolean", "description": "Can the user edit the font definition" } }, "required": [ "edit" ] } }, "required": [ "permissions" ] } ] }, "StorageFileKey": { "type": "string", "description": "The path of the file in the storage bucket", "minLength": 1, "maxLength": 512 }, "SitePublishOperationPreviewResponse": { "description": "A response to a request to preview the publishing of a site. It indicates whether the operation can proceed immediately, requires checkout, if a trial is available or if a trial extension is available.\n", "oneOf": [ { "type": "object", "properties": { "type": { "description": "User can go ahead with the operation without any additional steps. Their subscription will be updated to reflect the new changes.", "type": "string", "enum": [ "go-ahead" ] } }, "required": [ "type" ] }, { "type": "object", "properties": { "type": { "description": "By going ahead with this operation, the user will be starting a trial in GitBook.", "type": "string", "enum": [ "trial-available" ] } }, "required": [ "type" ] }, { "type": "object", "properties": { "type": { "description": "The organization is eligible for an additional trial when publishing the site.", "type": "string", "enum": [ "extended-trial-available" ] } }, "required": [ "type" ] }, { "type": "object", "properties": { "type": { "description": "User must checkout to complete the operation.", "type": "string", "enum": [ "checkout" ] }, "invoice": { "$ref": "#/components/schemas/BillingInvoicePreview" } }, "required": [ "type" ] } ] }, "GitSyncInstallationPriority": { "type": "string", "description": "Which side should be treated as the source of truth when Git Sync is configured.", "enum": [ "git", "gitbook" ] }, "GitSyncInstallationSetupCommon": { "type": "object", "description": "Common setup fields for a Git Sync installation.", "properties": { "projectDirectory": { "type": "string", "description": "Optional directory used when syncing a monorepo subdirectory." }, "commitMessageTemplate": { "type": "string", "description": "Optional template used when generating commit messages." }, "previewExternalBranches": { "type": "boolean", "description": "Whether previews should be generated from branches outside the configured branch. For space installations belonging to a parent installation, this field is inherited from the parent installation and cannot be set." }, "agentInstructions": { "type": "array", "description": "Agent instruction files GitBook should always export at the repository root. For space installations belonging to a parent installation, this field is inherited from the parent installation and cannot be set.", "items": { "type": "string", "enum": [ "agents", "claude" ] } }, "priority": { "$ref": "#/components/schemas/GitSyncInstallationPriority" } } }, "GitSyncInstallationSetupGitHub": { "type": "object", "description": "GitHub provider configuration for a Git Sync installation.", "properties": { "provider": { "type": "string", "enum": [ "github" ] }, "providerConfiguration": { "type": "object", "description": "GitHub specific configuration for the Git Sync installation.", "properties": { "repositoryId": { "type": "number", "description": "GitHub repository identifier." }, "branch": { "type": "string", "pattern": "^refs/heads/.+$", "description": "GitHub repository branch ref." } } } }, "required": [ "provider", "providerConfiguration" ] }, "GitSyncInstallationSetupGitLab": { "type": "object", "description": "GitLab provider configuration for a Git Sync installation.", "properties": { "provider": { "type": "string", "enum": [ "gitlab" ] }, "providerConfiguration": { "type": "object", "description": "GitLab specific configuration for the Git Sync installation.", "properties": { "projectId": { "type": "number", "description": "GitLab project identifier." }, "accessToken": { "type": "string", "description": "GitLab access token with appropriate scopes for repository access." }, "customInstanceURL": { "oneOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ], "description": "Public HTTPS URL of a self-hosted GitLab instance. Supported legacy HTTP URLs may be resubmitted unchanged while migration is pending. Use null to reconnect to gitlab.com. Changing the instance URL requires an accessToken in the same request." }, "branch": { "type": "string", "pattern": "^refs/heads/.+$", "description": "GitLab repository branch ref." } } } }, "required": [ "provider", "providerConfiguration" ] }, "GitSyncInstallationSetup": { "description": "Provider-specific setup payload for a Git Sync installation.", "allOf": [ { "$ref": "#/components/schemas/GitSyncInstallationSetupCommon" }, { "oneOf": [ { "$ref": "#/components/schemas/GitSyncInstallationSetupGitHub" }, { "$ref": "#/components/schemas/GitSyncInstallationSetupGitLab" } ], "discriminator": { "propertyName": "provider" } } ] }, "GitSyncInstallationTarget": { "description": "Resource targeted by a Git Sync installation.", "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": [ "space" ], "description": "Type of resource targeted by the Git Sync installation." }, "spaceId": { "type": "string", "description": "Unique identifier of the space targeted by the Git Sync installation." }, "siteId": { "type": "string", "description": "Unique identifier of the site whose Git Sync installation should manage the space installation. Omit to install Git Sync directly on the space." } }, "required": [ "type", "spaceId" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "site" ], "description": "Type of resource targeted by the Git Sync installation." }, "siteId": { "type": "string", "description": "Unique identifier of the site targeted by the Git Sync installation." } }, "required": [ "type", "siteId" ] } ], "discriminator": { "propertyName": "type" } }, "GitSyncInstallationProvider": { "type": "string", "description": "The provider of the Git Sync installation.", "enum": [ "github", "gitlab" ] }, "GitRepositoryConnection": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "git-repository-connection" ] }, "id": { "type": "string", "description": "Unique identifier of the repository connection." }, "provider": { "$ref": "#/components/schemas/GitSyncInstallationProvider" }, "repositoryId": { "type": "string", "description": "Repository identifier assigned by the provider." }, "repositoryName": { "type": "string", "description": "Full repository name assigned by the provider." }, "repositoryUrl": { "type": "string", "format": "uri", "description": "URL of the repository on the provider." }, "defaultBranch": { "type": "string", "description": "Default branch reported by the provider." }, "authState": { "type": "string", "enum": [ "pending", "active", "unauthenticated" ] }, "capabilities": { "type": "object", "description": "Provider operations available to this repository connection.", "properties": { "pullRequests": { "type": "boolean", "description": "Whether the connection can create and update GitHub pull requests or GitLab merge requests." }, "commitStatuses": { "type": "boolean", "description": "Whether the connection can publish GitBook synchronization results as provider commit statuses." } }, "required": [ "pullRequests", "commitStatuses" ] }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "updatedAt": { "$ref": "#/components/schemas/Timestamp" } }, "required": [ "object", "id", "provider", "repositoryId", "repositoryName", "repositoryUrl", "authState", "capabilities", "createdAt", "updatedAt" ] }, "GitRepositoryRef": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "git-repository-ref" ] }, "id": { "type": "string", "description": "Unique identifier of the repository ref." }, "name": { "type": "string", "description": "Fully qualified provider ref name." }, "type": { "type": "string", "enum": [ "branch", "tag", "change-request-head" ] }, "latestObservedCommitId": { "type": "string" }, "latestImportedCommitId": { "type": "string" }, "updatedAt": { "$ref": "#/components/schemas/Timestamp" } }, "required": [ "object", "id", "name", "type", "updatedAt" ] }, "GitSyncRoot": { "type": "object", "description": "A repository-backed review and permission boundary for GitBook content.", "properties": { "object": { "type": "string", "enum": [ "git-sync-root" ] }, "id": { "type": "string", "description": "Unique identifier of the Sync Root." }, "installationId": { "type": "string", "description": "Unique identifier of the top-level installation that owns this Sync Root." }, "target": { "$ref": "#/components/schemas/GitSyncInstallationTarget" }, "defaultMergeAuthorityPolicy": { "type": "string", "enum": [ "provider", "gitbook" ], "description": "System responsible for completing merges by default for this Sync Root." }, "status": { "type": "string", "enum": [ "active", "disabled" ] }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "updatedAt": { "$ref": "#/components/schemas/Timestamp" } }, "required": [ "object", "id", "installationId", "target", "defaultMergeAuthorityPolicy", "status", "createdAt", "updatedAt" ] }, "GitSyncInstallation": { "allOf": [ { "$ref": "#/components/schemas/GitSyncInstallationSetup" }, { "type": "object", "properties": { "object": { "type": "string", "enum": [ "git-sync-installation" ] }, "id": { "type": "string", "description": "Unique identifier of the Git Sync installation." }, "parentInstallationId": { "type": "string", "description": "The ID of the parent Git Sync installation, if any." }, "target": { "$ref": "#/components/schemas/GitSyncInstallationTarget" }, "status": { "$ref": "#/components/schemas/GitSyncInstallationStatus" }, "repositoryConnection": { "$ref": "#/components/schemas/GitRepositoryConnection" }, "repositoryRef": { "$ref": "#/components/schemas/GitRepositoryRef" }, "syncRoot": { "$ref": "#/components/schemas/GitSyncRoot", "description": "Effective Sync Root for this installation, inherited from its parent when present." }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "createdBy": { "type": "string", "description": "Identifier of the user who created the installation." }, "authorizedBy": { "description": "Identifier of the user who connected the Git provider credentials. Only this user can browse repositories or change the repository and branch with them. Null when it is unknown, for credentials connected before it was recorded, until someone reconnects the provider.", "oneOf": [ { "type": "string" }, { "type": "null" } ] }, "updatedAt": { "$ref": "#/components/schemas/Timestamp" }, "urls": { "type": "object", "description": "URLs associated with the installation", "properties": { "location": { "type": "string", "description": "URL of the installation endpoint in the API", "format": "uri" } }, "required": [ "location" ] } }, "required": [ "object", "id", "target", "status", "createdAt", "createdBy", "authorizedBy", "updatedAt", "urls" ] } ] }, "SiteAdaptiveRegions": { "type": "object", "description": "Groups of countries exposed to adaptive content as `visitor.region`. The key of each entry is the region name; `visitor.region` is undefined for a visitor whose country is in none of the regions. A site can declare at most 10 regions.", "maxProperties": 10, "propertyNames": { "pattern": "^[a-zA-Z0-9_-]+$" }, "additionalProperties": { "type": "object", "properties": { "countries": { "type": "array", "description": "ISO 3166-1 alpha-2 codes of the countries in the region.", "items": { "type": "string", "enum": [ "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW" ] } } }, "required": [ "countries" ], "additionalProperties": false } }, "SiteAdaptiveDeterministicJSONSchemaPrimitives": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": [ "boolean" ] }, "description": { "type": "string" } }, "required": [ "type", "description" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "string" ] }, "enum": { "type": "array", "items": { "type": "string" } }, "description": { "type": "string" } }, "required": [ "type", "enum", "description" ], "additionalProperties": false } ] }, "SiteAdaptiveJSONSchemaPrimitives": { "oneOf": [ { "$ref": "#/components/schemas/SiteAdaptiveDeterministicJSONSchemaPrimitives" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "string" ] }, "description": { "type": "string" } }, "required": [ "type", "description" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "number" ] }, "description": { "type": "string" } }, "required": [ "type", "description" ], "additionalProperties": false } ] }, "SiteAdaptiveJSONSchemaClaimsProperties": { "oneOf": [ { "$ref": "#/components/schemas/SiteAdaptiveJSONSchemaPrimitives" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "array" ] }, "description": { "type": "string" }, "items": { "$ref": "#/components/schemas/SiteAdaptiveJSONSchemaPrimitives" } }, "required": [ "type", "description", "items" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "object" ] }, "description": { "type": "string" }, "properties": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/SiteAdaptiveJSONSchemaClaimsProperties" } }, "additionalProperties": { "type": "boolean", "enum": [ false ] } }, "required": [ "type", "description", "properties", "additionalProperties" ], "additionalProperties": false } ] }, "SiteAdaptiveJSONSchemaWithRegions": { "type": "object", "description": "JSON schema describing the expected attributes of an Adaptive site schema, with the regions `visitor.region` is resolved from.", "properties": { "regions": { "$ref": "#/components/schemas/SiteAdaptiveRegions" }, "$schema": { "type": "string", "enum": [ "http://json-schema.org/draft-07/schema#" ] }, "type": { "type": "string", "enum": [ "object" ] }, "properties": { "type": "object", "properties": { "unsigned": { "type": "object", "description": "Unsigned claims of the site visitor.", "properties": { "type": { "type": "string", "enum": [ "object" ] }, "description": { "type": "string", "enum": [ "Unsigned claims of the site visitor." ] }, "properties": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/SiteAdaptiveJSONSchemaClaimsProperties" } }, "additionalProperties": { "type": "boolean", "enum": [ false ] } }, "required": [ "type", "description", "properties", "additionalProperties" ] } }, "additionalProperties": { "$ref": "#/components/schemas/SiteAdaptiveJSONSchemaClaimsProperties" } }, "additionalProperties": { "type": "boolean", "enum": [ false ] } }, "required": [ "type", "properties", "additionalProperties" ], "additionalProperties": false }, "SiteAdaptiveSchema": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "site-adaptive-schema" ] }, "jsonSchema": { "$ref": "#/components/schemas/SiteAdaptiveJSONSchemaWithRegions" }, "updatedAt": { "description": "When the adaptive schema was updated.", "$ref": "#/components/schemas/Timestamp" } }, "required": [ "object", "jsonSchema", "updatedAt" ] }, "SiteAdaptiveTemplateCondition": { "type": "object", "description": "A template condition based on the site visitor schema.", "properties": { "description": { "type": "string", "description": "A short description of the suggested condition." }, "condition": { "type": "string", "description": "The suggested condition." } }, "required": [ "description", "condition" ] }, "SiteIntegrationScript": { "type": "object", "properties": { "script": { "description": "Script URL to load.", "$ref": "#/components/schemas/URL" }, "contentSecurityPolicy": { "description": "Content Security Policy to secure the loading of this script.", "type": "string" }, "cookies": { "type": "boolean", "description": "If true, the script will potentially load use cookies and visitors should be aware." } }, "required": [ "script", "cookies" ] }, "PublishedContentSite": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "published-content-site" ] }, "site": { "$ref": "#/components/schemas/Site" }, "structure": { "$ref": "#/components/schemas/SiteStructure" }, "customizations": { "type": "object", "properties": { "site": { "$ref": "#/components/schemas/SiteCustomizationSettings" }, "siteSpaces": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/SiteCustomizationSettings" } } }, "required": [ "site", "siteSpaces" ] }, "scripts": { "type": "array", "items": { "$ref": "#/components/schemas/SiteIntegrationScript" } } }, "required": [ "object", "site", "structure", "customizations", "scripts" ] }, "SiteSetupStepId": { "type": "string", "description": "A step of the setup of a site, in the order they are done.", "enum": [ "first-edit", "customize", "git-sync", "domain", "publish" ] }, "SiteSetup": { "type": "object", "description": "Steps to set up a site, each completed or not from the site's current data.", "properties": { "steps": { "type": "array", "description": "Every setup step, in order. Empty once the site has been published, which ends the setup even if other steps are not completed.", "items": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/SiteSetupStepId" }, "completed": { "type": "boolean" }, "action": { "type": "string", "description": "How to complete the step. Only present when it is not completed." } }, "required": [ "id", "completed" ] } } }, "required": [ "steps" ] }, "ShareLinkName": { "type": "string", "description": "Name of the share link", "minLength": 0, "maxLength": 50 }, "ShareLink": { "type": "object", "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"share-link\"", "enum": [ "share-link" ] }, "id": { "type": "string", "description": "Unique identifier for the share-link" }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "name": { "$ref": "#/components/schemas/ShareLinkName" }, "active": { "type": "boolean" }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "published": { "type": "string", "description": "URL of the published version of the share-link.", "format": "uri" } } } }, "required": [ "object", "id", "createdAt", "urls" ] }, "SiteStructureItemPointer": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "site-space", "site-section", "site-section-group", "site-external-link" ] }, "id": { "type": "string", "description": "Unique identifier for the site structure item (site space, site section, site section group, or external link)." } }, "required": [ "type", "id" ] }, "SiteStructureItemMovePosition": { "type": "object", "description": "Position at which to move the site structure item relative to any sibling of the same structure level.", "properties": { "before": { "$ref": "#/components/schemas/SiteStructureItemPointer" }, "after": { "$ref": "#/components/schemas/SiteStructureItemPointer" } } }, "SiteStructureItem": { "title": "Site Structure Item", "type": "object", "description": "A site structure item can be a site space, a site section, a site section group, or an external link.\nIt is used to represent the structure of a site.\n", "oneOf": [ { "$ref": "#/components/schemas/SiteSpace" }, { "$ref": "#/components/schemas/SiteSection" }, { "$ref": "#/components/schemas/SiteSectionGroup" }, { "$ref": "#/components/schemas/SiteExternalLink" } ] }, "BillingOperationPreviewResponse": { "description": "A response to a request to preview a paid operation or action. A user might preview an operation before executing it to see which billing steps would be required (if any). This schema defines the response of that preview request.\n", "oneOf": [ { "type": "object", "properties": { "type": { "description": "User can go ahead with the operation without any additional steps. Their subscription will be updated to reflect the new changes.", "type": "string", "enum": [ "go-ahead" ] } }, "required": [ "type" ] }, { "type": "object", "properties": { "type": { "description": "By going ahead with this operation, the user will be starting a trial in GitBook.", "type": "string", "enum": [ "trial-available" ] } }, "required": [ "type" ] }, { "type": "object", "properties": { "type": { "description": "User must checkout to complete the operation.", "type": "string", "enum": [ "checkout" ] }, "invoice": { "$ref": "#/components/schemas/BillingInvoicePreview" } }, "required": [ "type" ] } ] }, "SiteUpgradeReason": { "type": "string", "description": "The reason or feature that triggered the site upgrade", "oneOf": [ { "$ref": "#/components/schemas/SiteFeatureKey" }, { "$ref": "#/components/schemas/BillingMeter" }, { "type": "string", "enum": [ "settings", "billing-page", "end-of-trial" ] } ] }, "SitePublishingAuth": { "allOf": [ { "oneOf": [ { "$ref": "#/components/schemas/VisitorAuthCustomBackend" }, { "$ref": "#/components/schemas/VisitorAuthIntegrationBackend" } ] }, { "type": "object", "properties": { "object": { "type": "string", "description": "Type of Object, always equals to \"publishing-auth\"", "enum": [ "publishing-auth" ] }, "privateKey": { "type": "string", "description": "Private key used to sign JWT tokens." }, "fallbackURL": { "type": "string", "format": "uri", "description": "URL to redirect to when the authenticated access secret is invalid." }, "logoutURL": { "type": "string", "format": "uri", "description": "URL used to log visitors out from the upstream custom auth backend." }, "integration": { "type": "string", "description": "Name of the authenticated access integration installed on the site (if any).\nIt is also the one being used as VA backend when the published auth settings are configured to use \"integration\" as backend.\n" } }, "required": [ "object", "privateKey" ] } ] }, "SitePublishingAuthUpdate": { "allOf": [ { "oneOf": [ { "$ref": "#/components/schemas/VisitorAuthCustomBackend" }, { "$ref": "#/components/schemas/VisitorAuthIntegrationBackend" } ] }, { "type": "object", "properties": { "fallbackURL": { "type": [ "string", "null" ], "format": "uri", "description": "A fallback URL that will be used if authentication fails. If not provided, the fallback URL will not be changed. If set to null, the fallback URL will be unset." }, "logoutURL": { "type": [ "string", "null" ], "format": "uri", "description": "A logout URL used to log visitors out from the upstream custom auth backend. If not provided, the logout URL will not be changed. If set to null, the logout URL will be unset." } } } ] }, "SiteCustomizationSettingsInput": { "allOf": [ { "$ref": "#/components/schemas/SiteCustomizationSettingsBase" } ] }, "SiteSearchId": { "type": "string", "description": "Client-generated 128-bit identifier for a search request, encoded as hexadecimal.", "minLength": 32, "maxLength": 32, "pattern": "^[0-9A-Fa-f]{32}$" }, "SiteSearchScope": { "oneOf": [ { "type": "object", "required": [ "mode" ], "properties": { "mode": { "description": "Search across all sections of a site, only including the default content of each section. This scope is wide and shallow. You may optionally specify a list of additional site spaces to search in alongside the default content.\n", "type": "string", "enum": [ "default" ] }, "currentSiteSpace": { "type": "string", "description": "The ID of the site space that must always be included in the search results. The language of this site space will be used to match other site spaces with the same language, if applicable.\n" }, "restrictTo": { "description": "Must not be provided when searching the entire default scope. To restrict the search to a subset of the default scope, provide `restrictTo` along with `currentSiteSpace`.\n", "type": "string", "minLength": 2, "maxLength": 1, "x-typescript": "never" } } }, { "type": "object", "required": [ "mode", "currentSiteSpace", "restrictTo" ], "properties": { "mode": { "description": "Search a subset of the default scope of the site, relative to the current site space.\n", "type": "string", "enum": [ "default" ] }, "currentSiteSpace": { "type": "string", "description": "The ID of the site space the search is made from. The language of this site space will be used to match other site spaces with the same language, if applicable.\n" }, "restrictTo": { "type": "string", "enum": [ "currentSiteSpace", "otherSiteSpaces" ], "description": "Restrict the search to a subset of the default scope. With `currentSiteSpace`, only the current site space is searched. With `otherSiteSpaces`, the current site space is excluded and only the other site spaces in the default scope are searched.\n" } } }, { "type": "object", "required": [ "mode", "siteSpaceIds" ], "properties": { "mode": { "description": "Only search in the provided site spaces.", "type": "string", "enum": [ "specific" ] }, "siteSpaceIds": { "type": "array", "minLength": 1, "items": { "type": "string" } } } }, { "type": "object", "required": [ "mode" ], "properties": { "mode": { "description": "Search in all sections and site spaces. This scope is wide and deep.", "type": "string", "enum": [ "all" ] } } } ] }, "SearchRecordResult": { "type": "object", "description": "Search result representing a site context record.", "properties": { "type": { "type": "string", "enum": [ "record" ] }, "id": { "type": "string", "description": "The ID of the context record." }, "title": { "type": "string", "description": "The title of the record." }, "score": { "$ref": "#/components/schemas/SearchResultScore" }, "description": { "type": "string", "description": "The description of the record." }, "url": { "type": "string", "format": "uri", "description": "URL of the record in the source system." } }, "required": [ "type", "id", "title", "score", "url" ] }, "SiteSearchPass": { "type": "object", "description": "Short-lived credential that lets a published site's visitor call the site search operation directly. It is opaque, accepted only by that operation for one site, and expires within five minutes.", "properties": { "token": { "type": "string", "description": "Credential to send as a bearer token in the Authorization header." }, "expiresAt": { "type": "string", "format": "date-time", "description": "When the credential expires." } }, "required": [ "token", "expiresAt" ] }, "AgentGoal": { "type": "string", "maxLength": 1024, "description": "The end goal the agent is trying to accomplish on behalf of the user. Unlike the immediate query, the goal describes the broader task or outcome the agent is working towards." }, "AgentFeedbackSource": { "type": "string", "description": "The surface the agent was running on when it submitted the feedback: the MCP server exposed by the site, or the site assistant.", "enum": [ "mcp", "assistant" ] }, "AgentFeedbackReportedBy": { "type": "object", "additionalProperties": false, "description": "The agent that reported the feedback. It must never identify the end user the agent is acting on behalf of.", "properties": { "model": { "type": "string", "maxLength": 100, "description": "Self-reported model powering the agent." }, "userAgent": { "type": "string", "maxLength": 512, "description": "User-Agent the agent itself presented, for example `claude-code/1.2.3`. It is what identifies the harness the agent ran in." }, "correlationId": { "type": "string", "maxLength": 100, "description": "Identifier the surface gave the agent for the call being reported, used to find that call in the surface's own logs. Not an identifier of this report." }, "onDemand": { "type": "boolean", "default": false, "description": "Whether the user explicitly asked the agent to submit this feedback." } } }, "AgentFeedbackSubjectMCPTool": { "type": "object", "additionalProperties": false, "description": "Feedback about a tool exposed by an MCP server.", "properties": { "kind": { "type": "string", "enum": [ "mcp-tool" ] }, "toolName": { "type": "string", "maxLength": 200, "description": "Name of the tool the agent called, as it was exposed to the agent." }, "target": { "type": "string", "maxLength": 200, "description": "What the tool was pointed at, for a tool that dispatches to something else rather than doing one fixed thing. For a tool that invokes an API operation, the identifier of that operation." } }, "required": [ "kind", "toolName" ] }, "AgentFeedbackSubjectCliCommand": { "type": "object", "additionalProperties": false, "description": "Feedback about a command exposed by a command line interface.", "properties": { "kind": { "type": "string", "enum": [ "cli-command" ] }, "command": { "type": "string", "maxLength": 200, "description": "The command the agent ran, without its arguments. Do not include any auth or other sensitive information." }, "flags": { "type": "array", "maxItems": 50, "description": "Names of the flags passed to the command. It must never contain their values.", "items": { "type": "string", "maxLength": 100 } } }, "required": [ "kind", "command" ] }, "AgentFeedbackSubjectApiEndpoint": { "type": "object", "additionalProperties": false, "description": "Feedback about an API endpoint the agent called directly, without an MCP server or a command line interface in between.", "properties": { "kind": { "type": "string", "enum": [ "api-endpoint" ] }, "method": { "type": "string", "description": "HTTP method of the endpoint.", "enum": [ "GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS" ] }, "path": { "type": "string", "maxLength": 500, "description": "Templated path of the endpoint, for example `/v1/orders/{orderId}/fulfill`. It must never contain resolved identifiers or query string values." } }, "required": [ "kind", "method", "path" ] }, "AgentFeedbackSubjectDocumentation": { "type": "object", "additionalProperties": false, "description": "Feedback about published documentation, such as a page that is outdated, incorrect, or missing information the agent needed to help its user.", "properties": { "kind": { "type": "string", "enum": [ "documentation" ] }, "url": { "description": "URL of the content the feedback is about.", "$ref": "#/components/schemas/URL" } }, "required": [ "kind", "url" ] }, "AgentFeedbackSubjectGeneric": { "type": "object", "additionalProperties": false, "description": "Feedback with no single tool, command, endpoint, or page behind it, such as product friction or a capability the agent expected to find and could not.", "properties": { "kind": { "type": "string", "enum": [ "generic" ] } }, "required": [ "kind" ] }, "AgentFeedbackSubject": { "description": "What the feedback is about. `kind` determines both the shape of the subject and the surface the agent was working through.", "oneOf": [ { "$ref": "#/components/schemas/AgentFeedbackSubjectMCPTool" }, { "$ref": "#/components/schemas/AgentFeedbackSubjectCliCommand" }, { "$ref": "#/components/schemas/AgentFeedbackSubjectApiEndpoint" }, { "$ref": "#/components/schemas/AgentFeedbackSubjectDocumentation" }, { "$ref": "#/components/schemas/AgentFeedbackSubjectGeneric" } ], "discriminator": { "propertyName": "kind" } }, "AgentFeedbackContent": { "type": "object", "additionalProperties": false, "description": "The content of the feedback. It must never contain parameter values, request or response bodies, credentials, or anything identifying the end user the agent acted for.", "properties": { "category": { "type": "string", "description": "Classification of the feedback:\n - Usability: The subject was hard to understand or use correctly, such as a confusing name or unclear parameters.\n - Reliability: The subject behaved inconsistently, failed unexpectedly, or returned unusable results.\n - Documentation: The description, schema, or guidance about the subject was missing, unclear, or misleading.\n - Efficiency: Reaching the outcome took more calls, steps, or tokens than it should have.\n - Interoperability: The subject did not compose well with other tools, operations, or formats.\n - Could not accomplish: Nothing exposed to the agent could accomplish what it needed to do.", "enum": [ "usability", "reliability", "documentation", "efficiency", "interoperability", "could-not-accomplish" ] }, "severity": { "type": "string", "description": "How much the issue impeded the agent.", "enum": [ "low", "medium", "high" ] }, "goal": { "description": "What the agent was working towards when it ran into the issue.", "$ref": "#/components/schemas/AgentGoal" }, "summary": { "type": "string", "minLength": 1, "maxLength": 256, "description": "A short summary of what went wrong, in the agent's own words." }, "detail": { "type": "string", "maxLength": 4096, "description": "Additional explanation of the issue and how the agent ran into it." }, "workaround": { "type": "string", "maxLength": 2048, "description": "How the agent worked around the issue, when it managed to." }, "metrics": { "type": "object", "additionalProperties": false, "description": "How the agent interacted with the subject before reporting.", "properties": { "callCount": { "type": "integer", "minimum": 0, "description": "Number of times the agent used the subject." }, "successCount": { "type": "integer", "minimum": 0, "description": "Number of those uses that produced a usable result." }, "retryCount": { "type": "integer", "minimum": 0, "description": "Number of those uses that were retries after a failure." } } } }, "required": [ "category", "summary" ] }, "AgentFeedbackInput": { "type": "object", "additionalProperties": false, "description": "Feedback submitted by an AI agent about a tool, command, endpoint or page it worked with. `reportedBy` and `feedback` have the same shape whatever the feedback is about; only `subject` varies.", "properties": { "reportedBy": { "$ref": "#/components/schemas/AgentFeedbackReportedBy" }, "subject": { "$ref": "#/components/schemas/AgentFeedbackSubject" }, "feedback": { "$ref": "#/components/schemas/AgentFeedbackContent" } }, "required": [ "subject", "feedback" ] }, "SiteInsightsSession": { "type": "object", "description": "Identifiers for a GitBook site session, used for analytics and adaptive content.", "properties": { "visitorId": { "type": "string", "description": "GitBook's unique identifier of the visitor." }, "sessionId": { "type": "string", "description": "GitBook's unique identifier of the visitor's session." } }, "required": [ "visitorId", "sessionId" ] }, "ContextRecordType": { "type": "string", "enum": [ "ticket", "document" ] }, "ContextConnector": { "oneOf": [ { "type": "string", "description": "Integration source", "pattern": "^integration:[^:]+$", "x-typescript": "`integration:${string}`" }, { "type": "string", "description": "Builtin sources", "enum": [ "builtin:email", "builtin:api", "builtin:website", "builtin:youtube", "builtin:github-discussions", "builtin:github-issues", "builtin:intercom", "builtin:front", "builtin:zendesk", "builtin:zoho-desk", "builtin:freshdesk", "builtin:pylon", "builtin:hubspot", "builtin:linear", "builtin:jira" ] } ] }, "ContextRecordTitle": { "type": "string", "description": "Title for the context record", "minLength": 1, "maxLength": 256 }, "ContextRecordDescription": { "type": "string", "description": "Optional short description of the context record", "maxLength": 512 }, "ContextRecord": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "context-record" ] }, "id": { "type": "string", "description": "The ID of the record" }, "title": { "$ref": "#/components/schemas/ContextRecordTitle" }, "description": { "$ref": "#/components/schemas/ContextRecordDescription" }, "type": { "$ref": "#/components/schemas/ContextRecordType" }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "processedAt": { "$ref": "#/components/schemas/Timestamp" }, "connection": { "type": "string", "description": "The connection ID associated with the record" }, "connector": { "description": "The connector type associated with the record", "$ref": "#/components/schemas/ContextConnector" }, "topics": { "type": "array", "description": "The associated topics of the record", "items": { "type": "string" } }, "urls": { "type": "object", "description": "URLs associated with the record", "properties": { "location": { "type": "string", "description": "URL of the record in the API", "format": "uri" }, "source": { "type": "string", "description": "URL of the record in the source", "format": "uri" } }, "required": [ "location" ] } }, "required": [ "object", "id", "title", "type", "createdAt", "connection", "connector", "urls" ] }, "ContextRecordInput": { "type": "object", "description": "Input to ingest a new context record", "properties": { "id": { "type": "string", "description": "Unique local identifier for the record" }, "type": { "$ref": "#/components/schemas/ContextRecordType" }, "title": { "$ref": "#/components/schemas/ContextRecordTitle" }, "description": { "$ref": "#/components/schemas/ContextRecordDescription" }, "body": { "type": "string", "description": "Body content of the record as markdown" }, "url": { "type": "string", "description": "URL of the record", "format": "uri" }, "createdAt": { "$ref": "#/components/schemas/Timestamp", "description": "Date of the record creation in the original source" }, "metadata": { "type": "object", "additionalProperties": { "oneOf": [ { "type": "string" }, { "type": "number" } ] } } }, "required": [ "id", "title", "body", "type" ] }, "SiteScanStatus": { "type": "string", "description": "Status of a persisted site scan.", "enum": [ "pending", "running", "done", "failed" ] }, "SiteScanFindings": { "type": "object", "description": "Number of findings created by the scan, grouped by severity.", "properties": { "low": { "type": "number" }, "medium": { "type": "number" }, "high": { "type": "number" } }, "required": [ "low", "medium", "high" ] }, "SiteScan": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "site-scan" ] }, "id": { "type": "string", "description": "The ID of the scan" }, "status": { "$ref": "#/components/schemas/SiteScanStatus" }, "topic": { "type": [ "string", "null" ], "description": "The site topic ID associated with the scan. It is null for scans that are not associated with a current topic in the site." }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "startedAt": { "$ref": "#/components/schemas/Timestamp" }, "finishedAt": { "$ref": "#/components/schemas/Timestamp" }, "findings": { "$ref": "#/components/schemas/SiteScanFindings" }, "failureMessage": { "type": "string", "description": "Failure message for failed scans" }, "urls": { "type": "object", "description": "URLs associated with the scan", "properties": { "location": { "type": "string", "description": "URL of the scan endpoint in the API", "format": "uri" } }, "required": [ "location" ] } }, "required": [ "object", "id", "status", "topic", "createdAt", "findings", "urls" ] }, "SiteFindingStatus": { "type": "string", "description": "Status of a site finding.\n - `candidate` is a finding that has been raised but not yet confirmed. Typically these are not shown to users.\n - `open` is a finding that has been surfaced to users and is still under investigation.\n - `done` is a finding that has been resolved and is no longer under investigation.\n - `canceled` is a finding that has been canceled and is no longer under investigation.\n", "enum": [ "candidate", "open", "done", "canceled" ] }, "SiteFindingType": { "type": "string", "description": "Classification of a site finding:\n - Outdated content: The content was correct but is no longer up to date with external context and may be misleading or incorrect.\n - Incorrect content: The content is factually wrong or misleading, leading users astray regardless of whether it was ever correct.\n - Content gap: The content is missing important information that should be present to answer user questions effectively.\n - Broken link: A URL on the site returns a 404, and can be resolved by creating a redirect or a new page.\n - Outbound link error: An external URL used by the site's content fails to resolve, and can be fixed by replacing or removing the link.\n - Other: Any other type of finding not covered by the above categories.", "enum": [ "content-outdated", "content-incorrect", "content-gap", "broken-link", "outbound-link-error", "other" ] }, "SiteFindingSeverity": { "type": "string", "description": "Estimated end-user severity of a site finding.", "enum": [ "low", "medium", "high" ] }, "SiteFindingAutoResolution": { "type": "string", "description": "What GitBook did on its own to resolve a finding.\n - `drafted` drafted a fix that waits for approval.\n - `applied` has its fix live, applied on its own or approved from a draft, resolving the finding.\n - `undone` had its fix undone or rejected, so GitBook won't try again.\n", "enum": [ "drafted", "applied", "undone" ] }, "SiteFindingState": { "type": "string", "description": "Where a link finding stands, from its status and what GitBook did with it.\n - `open` needs a fix.\n - `awaiting-approval` has a fix GitBook drafted, waiting to be approved or rejected: a redirect at a `broken-link` finding's path, or an unmerged change request for an `outbound-link-error` finding (`awaitingChangeRequest`).\n - `resolved` was fixed or closed: `servingRedirect` says whether a live redirect serves its path.\n - `ignored` was dismissed.\n", "enum": [ "open", "awaiting-approval", "resolved", "ignored" ] }, "SiteTriageFilterQuestions": { "type": "string", "description": "Findings source filter matching evidence coming from site questions.\n", "enum": [ "questions" ] }, "SiteTriageFilterConnections": { "type": "string", "description": "Findings source filter matching evidence coming from a given connection,\nencoded as `connection:<connectionId>`.\n", "pattern": "^connection:.+$" }, "SiteFindingOrderBy": { "type": "string", "enum": [ "updatedAt", "severity", "sources", "suggestedFix" ], "default": "updatedAt", "description": "The field to sort site findings by. `updatedAt` returns the most recently updated findings first. `severity` returns the most severe findings first. `sources` returns the findings with the most linked sources (questions plus records) first. `suggestedFix` is for link findings: those that come with a fix (a suggested redirect, or an outbound link to correct) come before broken URLs the audit found no page for, most severe first within each group. Other finding types sort with the second group. Defaults to 'updatedAt'." }, "SiteFindingTitle": { "type": "string", "description": "Short finding title", "maxLength": 256 }, "SiteFindingServingRedirect": { "type": "object", "title": "Serving redirect", "description": "The live redirect serving a `broken-link` finding's path.", "properties": { "redirect": { "type": "string", "description": "ID of the redirect." }, "wildcard": { "type": "boolean", "description": "Whether a wildcard redirect covers the path rather than one at the path itself. Reopening the finding would delete it, so `reopen` isn't offered." }, "createdByAgent": { "type": "boolean", "description": "Whether GitBook created the redirect on its own." } }, "required": [ "redirect", "wildcard", "createdByAgent" ] }, "SiteFindingAwaitingChangeRequest": { "type": "object", "title": "Awaiting change request", "description": "The change request GitBook drafted to fix an `outbound-link-error` finding, waiting to be approved or rejected. Approving it means merging it. Reject it with `applySiteFindingAction`.", "properties": { "space": { "type": "string", "description": "ID of the space the change request is in." }, "changeRequest": { "type": "string", "description": "ID of the change request." }, "findings": { "type": "number", "description": "Number of open outbound links on the site the change request fixes." } }, "required": [ "space", "changeRequest", "findings" ] }, "SiteFindingAction": { "type": "string", "description": "An action that moves a finding to another state. A finding's `actions` lists the ones it allows.\n - `approve` makes the redirect GitBook drafted for a broken link live, which resolves the finding. A change request GitBook drafted for an outbound link is approved by merging it.\n - `reject` deletes the redirect GitBook drafted for a broken link; the finding stays open and GitBook won't draft a fix for it again. For an outbound link, it archives the change request GitBook drafted (`awaitingChangeRequest`) and unlinks every link it fixes. They are open again, marked `undone`, and GitBook won't draft a fix for them again.\n - `create-redirect` creates a redirect for a broken link's path with `createSiteRedirect`, prefilled with the suggestion; it resolves the finding.\n - `mark-resolved` resolves it. A broken link resolved this way has no redirect: visitors still get a 404.\n - `reopen` reopens a resolved finding. For a broken link, it deletes the live redirect at its path; for a fix GitBook applied, this undoes the fix and GitBook won't fix the link again.\n - `ignore` dismisses it.\n - `restore` reopens a dismissed finding.\n", "enum": [ "approve", "reject", "create-redirect", "mark-resolved", "reopen", "ignore", "restore" ] }, "SiteFindingAvailableAction": { "type": "object", "title": "Available action", "description": "An action a finding allows now, with the site permission it needs.", "properties": { "action": { "$ref": "#/components/schemas/SiteFindingAction" }, "permission": { "type": "string", "description": "Site permission the action needs.", "enum": [ "edit", "admin" ] } }, "required": [ "action", "permission" ] }, "SiteRedirectSourcePath": { "type": "string", "description": "The source path to redirect from.", "maxLength": 512, "pattern": "^\\/(?!\\*)(?!.*\\*.+)(?:[A-Za-z0-9\\-._~+]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~+]|%[0-9A-Fa-f]{2})+)*(?:\\/\\*|\\*)?$" }, "SiteRedirectInputDestinationPath": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "path" ] }, "spaceId": { "type": "string", "description": "Unique identifier for the space containing the page referenced by the path." }, "path": { "type": "string", "description": "Path to the page within the space revision to resolve." } }, "required": [ "kind", "spaceId", "path" ] }, "SiteFindingBrokenLinkAction": { "type": "object", "description": "Suggested fix for a broken-link finding, shaped as the input for `createSiteRedirect` so it can be applied directly. Absent when the finding has no directly applicable redirect (for example, a suggestion to create a new page). The destination is absent when the audit judged the URL and found no page to redirect to: a redirect can still be created from the source with a destination of your choosing.", "properties": { "source": { "$ref": "#/components/schemas/SiteRedirectSourcePath" }, "captureWildcard": { "type": "boolean", "description": "Whether the redirect appends the wildcard-matched suffix of the source path to the destination." }, "destination": { "$ref": "#/components/schemas/SiteRedirectInputDestinationPath" } }, "required": [ "source" ] }, "SiteFindingOutboundLink": { "type": "object", "description": "Details of an `outbound-link-error` finding: the failing external URL, or the domain when it doesn't resolve, and the observed failure, sourced from the site's outbound link checks. A resolved finding has either `url` or `host` and no other field. Absent on findings of any other type.", "properties": { "url": { "type": "string", "format": "uri", "description": "The external URL that fails. Absent when `host` is set." }, "host": { "type": "string", "description": "The domain that doesn't resolve, set instead of `url` when the finding covers every link to that domain on the site." }, "status": { "type": "string", "description": "Current health status of the URL or domain for this site.", "enum": [ "pending", "healthy", "suspect", "failed", "recovering", "canceled" ] }, "failureKind": { "type": "string", "description": "Classification of the confirmed failure.", "enum": [ "client-error", "server-error", "redirect", "dns", "tls", "connection", "timeout" ] }, "httpStatus": { "type": "number", "description": "HTTP status code of the last observation, when one was received." }, "checkedAt": { "$ref": "#/components/schemas/Timestamp", "description": "When the URL or domain was last observed." } } }, "SiteFinding": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "site-finding" ] }, "id": { "type": "string", "description": "The ID of the finding" }, "scan": { "type": "string", "description": "The site scan ID associated with the finding" }, "topic": { "type": [ "string", "null" ], "description": "The site topic ID associated with the finding. It is null for findings that are not associated with a current topic in the site." }, "title": { "$ref": "#/components/schemas/SiteFindingTitle" }, "changeRequests": { "type": "number", "description": "Number of change requests linked to the finding" }, "pages": { "type": "number", "description": "Number of pages linked to the finding" }, "records": { "type": "number", "description": "Number of records linked to the finding" }, "questions": { "type": "number", "description": "Number of questions linked to the finding" }, "status": { "$ref": "#/components/schemas/SiteFindingStatus" }, "type": { "$ref": "#/components/schemas/SiteFindingType" }, "severity": { "$ref": "#/components/schemas/SiteFindingSeverity" }, "description": { "$ref": "#/components/schemas/JSONDocument" }, "autoFixable": { "type": "boolean", "description": "Whether an AI agent should be able to fix this finding directly" }, "autoResolution": { "description": "What GitBook did on its own to resolve the finding. Null when it never acted on the finding.", "oneOf": [ { "$ref": "#/components/schemas/SiteFindingAutoResolution" }, { "type": "null" } ] }, "state": { "$ref": "#/components/schemas/SiteFindingState" }, "servingRedirect": { "$ref": "#/components/schemas/SiteFindingServingRedirect" }, "awaitingChangeRequest": { "$ref": "#/components/schemas/SiteFindingAwaitingChangeRequest" }, "actions": { "type": "array", "description": "Actions the finding allows now, applied with `applySiteFindingAction`.", "items": { "$ref": "#/components/schemas/SiteFindingAvailableAction" } }, "brokenLinkAction": { "$ref": "#/components/schemas/SiteFindingBrokenLinkAction" }, "outboundLink": { "$ref": "#/components/schemas/SiteFindingOutboundLink" }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "updatedAt": { "$ref": "#/components/schemas/Timestamp" }, "urls": { "type": "object", "description": "URLs associated with the finding", "properties": { "location": { "type": "string", "description": "URL of the finding list endpoint in the API", "format": "uri" } }, "required": [ "location" ] } }, "required": [ "object", "id", "scan", "topic", "title", "changeRequests", "pages", "records", "questions", "status", "type", "severity", "description", "autoFixable", "autoResolution", "createdAt", "updatedAt", "urls" ] }, "SiteFindingPage": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "site-finding-page" ] }, "spaceId": { "type": "string", "description": "The space ID containing the linked page." }, "page": { "$ref": "#/components/schemas/ChangedRevisionPage" } }, "required": [ "object", "spaceId", "page" ] }, "SiteQuestionType": { "type": "string", "description": "Type classification of the user question.", "enum": [ "exploring", "how-to", "troubleshooting", "reference", "unknown" ] }, "SiteQuestionIntent": { "type": "string", "description": "What the person was asking for, independent of the type of site: `can-it` whether it does, supports or integrates with something; `how-to` the steps to get something done; `how-it-works` rules, defaults and what happens when; `details` exact values, syntax, limits or lists; `troubleshoot` errors and why something fails; `pricing` price, plans and licensing; `trust` security, compliance and data handling; `fit` use-case fit, alternatives and switching from another tool; `other` anything else.", "enum": [ "can-it", "how-to", "how-it-works", "details", "troubleshoot", "pricing", "trust", "fit", "other" ] }, "SiteQuestionStatsFeedback": { "type": "object", "description": "Aggregated feedback for answers linked to a site question.", "properties": { "positive": { "type": "number", "description": "Count of answers with positive feedback." }, "negative": { "type": "number", "description": "Count of answers with negative feedback." }, "unrated": { "type": "number", "description": "Count of answers without feedback." } }, "required": [ "positive", "negative", "unrated" ] }, "SiteQuestionStatsAnswered": { "type": "object", "description": "Aggregated answered assessment for answers linked to a site question.", "properties": { "yes": { "type": "number", "description": "Count of answers assessed as fully answered." }, "partially": { "type": "number", "description": "Count of answers assessed as partially answered." }, "no": { "type": "number", "description": "Count of answers assessed as not answered." } }, "required": [ "yes", "partially", "no" ] }, "SiteQuestionStatsRelevance": { "type": "object", "properties": { "relevant": { "type": "number" }, "spam": { "type": "number" }, "off-topic": { "type": "number" }, "unclear": { "type": "number" } }, "required": [ "relevant", "spam", "off-topic", "unclear" ] }, "SiteQuestionStatsTypes": { "type": "object", "properties": { "exploring": { "type": "number" }, "how-to": { "type": "number" }, "troubleshooting": { "type": "number" }, "reference": { "type": "number" }, "unknown": { "type": "number" } }, "required": [ "exploring", "how-to", "troubleshooting", "reference", "unknown" ] }, "SiteQuestionStatsChannelTypes": { "type": "object", "description": "Count of answers by site channel type, including core channels.", "additionalProperties": { "type": "number" } }, "SiteQuestionStatsChannels": { "type": "object", "description": "Count of answers by site channel ID.", "additionalProperties": { "type": "number" } }, "SiteQuestionStatsVisitorTypes": { "type": "object", "description": "Count of answers by visitor type.", "properties": { "human": { "type": "number" }, "agent": { "type": "number" }, "bot": { "type": "number" }, "unknown": { "type": "number" } }, "required": [ "human", "agent", "bot", "unknown" ] }, "SiteQuestionStatsIntents": { "type": "object", "description": "Count of answers by the intent of their question. `unlabelled` counts questions not labelled yet.", "properties": { "can-it": { "type": "number" }, "how-to": { "type": "number" }, "how-it-works": { "type": "number" }, "details": { "type": "number" }, "troubleshoot": { "type": "number" }, "pricing": { "type": "number" }, "trust": { "type": "number" }, "fit": { "type": "number" }, "other": { "type": "number" }, "unlabelled": { "type": "number" } }, "required": [ "can-it", "how-to", "how-it-works", "details", "troubleshoot", "pricing", "trust", "fit", "other", "unlabelled" ] }, "SiteQuestionStatsSiteSaid": { "type": "object", "description": "Count of answers by what the site said about the main thing asked. `unlabelled` counts answers not labelled yet.", "properties": { "covered": { "type": "number" }, "limited": { "type": "number" }, "unsupported": { "type": "number" }, "no-answer": { "type": "number" }, "needs-support": { "type": "number" }, "unlabelled": { "type": "number" } }, "required": [ "covered", "limited", "unsupported", "no-answer", "needs-support", "unlabelled" ] }, "SiteQuestionStatsEscalations": { "type": "object", "description": "Count of answers by who should act on them (see `SiteQuestionEscalation`). `unlabelled` counts answers that cannot be escalated until their question and answer are labelled.", "properties": { "docs": { "type": "number" }, "team": { "type": "number" }, "support": { "type": "number" }, "none": { "type": "number" }, "unlabelled": { "type": "number" } }, "required": [ "docs", "team", "support", "none", "unlabelled" ] }, "SiteQuestionStats": { "type": "object", "description": "Aggregated stats for questions and linked answers.", "properties": { "total": { "type": "number", "description": "Total count of questions included in the aggregation." }, "answers": { "type": "number", "description": "Total count of answers linked to the questions." }, "feedback": { "$ref": "#/components/schemas/SiteQuestionStatsFeedback" }, "answered": { "$ref": "#/components/schemas/SiteQuestionStatsAnswered" }, "relevance": { "$ref": "#/components/schemas/SiteQuestionStatsRelevance" }, "types": { "$ref": "#/components/schemas/SiteQuestionStatsTypes" }, "channelTypes": { "$ref": "#/components/schemas/SiteQuestionStatsChannelTypes" }, "channels": { "$ref": "#/components/schemas/SiteQuestionStatsChannels" }, "visitorTypes": { "$ref": "#/components/schemas/SiteQuestionStatsVisitorTypes" }, "intents": { "$ref": "#/components/schemas/SiteQuestionStatsIntents" }, "siteSaid": { "$ref": "#/components/schemas/SiteQuestionStatsSiteSaid" }, "escalations": { "$ref": "#/components/schemas/SiteQuestionStatsEscalations" }, "goals": { "type": "number", "description": "Count of distinct goals agents gave with the answers." }, "weeklyPulse": { "type": "array", "minItems": 13, "maxItems": 13, "description": "Weekly count of related question answers for the past 3 months.", "items": { "type": "number" } } }, "required": [ "total", "answers", "feedback", "answered", "relevance", "types", "channelTypes", "channels", "visitorTypes", "intents", "siteSaid", "escalations", "goals", "weeklyPulse" ] }, "SiteQuestion": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "site-question" ] }, "id": { "type": "string", "description": "The ID of the site question." }, "question": { "type": "string", "description": "Canonical text for the unique site question." }, "type": { "$ref": "#/components/schemas/SiteQuestionType" }, "intent": { "description": "What the person was asking for; `null` until the question is labelled.", "oneOf": [ { "$ref": "#/components/schemas/SiteQuestionIntent" }, { "type": "null" } ] }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "askedAt": { "$ref": "#/components/schemas/Timestamp" }, "stats": { "$ref": "#/components/schemas/SiteQuestionStats" }, "urls": { "type": "object", "description": "URLs associated with the site question.", "properties": { "location": { "type": "string", "format": "uri", "description": "URL of the site question in the API." } }, "required": [ "location" ] } }, "required": [ "object", "id", "question", "type", "intent", "createdAt", "askedAt", "stats", "urls" ] }, "SiteFindingStatsStatuses": { "type": "object", "description": "Count of findings by status. Candidate findings are never counted.", "properties": { "open": { "type": "number", "description": "Count of findings surfaced to users and still under investigation." }, "done": { "type": "number", "description": "Count of findings that have been resolved." }, "canceled": { "type": "number", "description": "Count of findings that have been canceled." } }, "required": [ "open", "done", "canceled" ] }, "SiteFindingStatsSeverities": { "type": "object", "description": "Count of findings by estimated end-user severity.", "properties": { "low": { "type": "number", "description": "Count of findings with a low estimated severity." }, "medium": { "type": "number", "description": "Count of findings with a medium estimated severity." }, "high": { "type": "number", "description": "Count of findings with a high estimated severity." } }, "required": [ "low", "medium", "high" ] }, "SiteFindingStatsConnectors": { "type": "object", "description": "Count of findings by the connector their evidence came from, keyed by connector (e.g. `builtin:intercom`). A finding is counted once per connector that contributed at least one piece of evidence to it, so the counts can add up to more than the total.", "additionalProperties": { "type": "number" } }, "SiteFindingStatsBrokenLinks": { "type": "object", "description": "Breakdown of the broken-link findings included in the aggregation.", "properties": { "redirectSuggested": { "type": "number", "description": "Broken URLs the audit found a page to redirect to." }, "noMatchingPage": { "type": "number", "description": "Broken URLs the audit judged and found no page to redirect to." } }, "required": [ "redirectSuggested", "noMatchingPage" ] }, "SiteFindingStats": { "type": "object", "description": "Aggregated stats for the findings identified on a site.", "properties": { "total": { "type": "number", "description": "Total count of findings included in the aggregation." }, "statuses": { "$ref": "#/components/schemas/SiteFindingStatsStatuses" }, "severities": { "$ref": "#/components/schemas/SiteFindingStatsSeverities" }, "connectors": { "$ref": "#/components/schemas/SiteFindingStatsConnectors" }, "brokenLinks": { "$ref": "#/components/schemas/SiteFindingStatsBrokenLinks" }, "questions": { "type": "number", "description": "Count of findings with at least one piece of evidence coming from a site question." }, "mergedChangeRequests": { "type": "number", "description": "Count of change requests created to fix a finding that have been merged." } }, "required": [ "total", "statuses", "severities", "connectors", "brokenLinks", "questions", "mergedChangeRequests" ] }, "ContextConnectionLabel": { "type": "string", "description": "Optional label for the connection", "minLength": 0, "maxLength": 128 }, "ContextConnectionFilter": { "type": "string", "description": "Optional filter used to restrict which items are ingested from the source. Its meaning depends on the connector: it can be a tag, label, or an expression. When empty or omitted, all resolved items are ingested.", "minLength": 0, "maxLength": 1024 }, "ContextConnectionStatus": { "type": "string", "enum": [ "pending", "syncing", "succeeded", "failed", "skipped" ] }, "ContextConnectionFailureReason": { "type": "string", "description": "Why a synchronization failed, indicating who can resolve it. `authentication` and `misconfigured` need the connection to be reconfigured; `rate_limited` and `upstream_unavailable` are the source's own limits or downtime and are retried; `unknown` could not be attributed to the source's response.", "enum": [ "authentication", "misconfigured", "rate_limited", "upstream_unavailable", "unknown" ] }, "AISkipReason": { "type": "string", "description": "Why an AI task was skipped before execution.\n\n- `ai_unavailable_for_organization`: The organization's effective plan does not include AI or a\n required feature. Takes precedence when both the organization and site plans block the task.\n- `ai_unavailable_for_site`: The site's effective plan does not include the required feature.\n The site's applied plan takes precedence over its own plan.\n- `ai_paused`: AI usage is temporarily paused by automatic usage controls.\n- `ai_disabled`: AI or a required AI feature has been turned off in the organization's settings.\n- `ai_restricted`: AI is blocked by GitBook or a contractual restriction and cannot be enabled\n through organization settings.", "enum": [ "ai_unavailable_for_organization", "ai_unavailable_for_site", "ai_disabled", "ai_restricted", "ai_paused" ] }, "ContextSearchBoost": { "type": "string", "description": "Relative score adjustment applied to records from a connection when searching.", "enum": [ "x0.8", "x1.0", "x1.2" ] }, "ContextUsageSettings": { "type": "object", "properties": { "changeRequests": { "type": "boolean", "description": "Whether to use context to propose change requests" }, "search": { "type": "boolean", "description": "Whether to expose records in search results" }, "sync": { "type": "boolean", "description": "Whether the connection syncs GitBook change-request state outward to the connected external system (outbound write). Requires a write-capable token or role." }, "searchBoost": { "$ref": "#/components/schemas/ContextSearchBoost" } }, "required": [ "changeRequests", "search", "searchBoost" ] }, "YoutubeChannelId": { "type": "string", "description": "A YouTube channel ID starting with \"UC\".", "pattern": "^UC[A-Za-z0-9_-]{22}$" }, "YoutubeChannelName": { "type": "string", "description": "A YouTube channel handle starting with \"@\".", "pattern": "^@[A-Za-z0-9._-]{3,100}$" }, "YoutubeChannelPattern": { "description": "A YouTube channel identifier, either a channel ID or a channel handle.", "oneOf": [ { "$ref": "#/components/schemas/YoutubeChannelId" }, { "$ref": "#/components/schemas/YoutubeChannelName" } ] }, "JiraConnectorSetupSettings": { "type": "object", "properties": { "baseUrl": { "type": "string", "format": "uri", "minLength": 1, "maxLength": 2048, "description": "Base URL of the Jira Cloud site, e.g. https://your-team.atlassian.net." }, "apiEmail": { "type": "string", "format": "email", "minLength": 1, "maxLength": 254, "description": "Email of the Atlassian account whose API token is used." }, "apiToken": { "type": "string", "minLength": 1, "maxLength": 1024, "description": "Atlassian API token used for outbound writes. Redacted when read back. Omit it when updating a connection to keep the stored token; required when the site URL or account email changes." }, "projectKeys": { "type": "array", "maxItems": 100, "uniqueItems": true, "description": "Projects where GitBook handles issues. Empty means all accessible projects.", "items": { "type": "string", "minLength": 1, "maxLength": 255 } }, "statusMapping": { "type": "object", "description": "Jira status to move the linked issue to when the change request reaches a given status, e.g. `{ \"merged\": \"Done\" }`. A status left out is not synced.", "propertyNames": { "$ref": "#/components/schemas/ChangeRequestStatus" }, "additionalProperties": { "type": "string", "minLength": 1, "maxLength": 255 } } }, "required": [ "baseUrl", "apiEmail", "apiToken" ] }, "ContextConnectorSetup": { "oneOf": [ { "type": "object", "properties": { "connector": { "type": "string", "enum": [ "builtin:email" ] } }, "required": [ "connector" ] }, { "type": "object", "properties": { "connector": { "type": "string", "enum": [ "builtin:api" ] } }, "required": [ "connector" ] }, { "type": "object", "properties": { "connector": { "type": "string", "pattern": "^integration:[^:]+$", "x-typescript": "`integration:${string}`" } }, "required": [ "connector" ] }, { "type": "object", "properties": { "connector": { "type": "string", "enum": [ "builtin:website" ] }, "setupSettings": { "type": "object", "properties": { "url": { "type": "string", "format": "uri" } }, "required": [ "url" ] } }, "required": [ "connector", "setupSettings" ] }, { "type": "object", "properties": { "connector": { "type": "string", "enum": [ "builtin:youtube" ] }, "setupSettings": { "type": "object", "properties": { "channelId": { "$ref": "#/components/schemas/YoutubeChannelPattern" } }, "required": [ "channelId" ] } }, "required": [ "connector", "setupSettings" ] }, { "type": "object", "properties": { "connector": { "type": "string", "enum": [ "builtin:github-discussions" ] }, "setupSettings": { "type": "object", "properties": { "repository": { "type": "string", "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$" }, "token": { "type": "string", "minLength": 1 } }, "required": [ "repository", "token" ] } }, "required": [ "connector", "setupSettings" ] }, { "type": "object", "properties": { "connector": { "type": "string", "enum": [ "builtin:github-issues" ] }, "setupSettings": { "type": "object", "properties": { "repository": { "type": "string", "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$" }, "token": { "type": "string", "minLength": 1 } }, "required": [ "repository", "token" ] } }, "required": [ "connector", "setupSettings" ] }, { "type": "object", "properties": { "connector": { "type": "string", "enum": [ "builtin:intercom" ] }, "setupSettings": { "type": "object", "properties": { "token": { "type": "string", "minLength": 1 } }, "required": [ "token" ] } }, "required": [ "connector", "setupSettings" ] }, { "type": "object", "properties": { "connector": { "type": "string", "enum": [ "builtin:front" ] }, "setupSettings": { "type": "object", "properties": { "token": { "type": "string", "minLength": 1 } }, "required": [ "token" ] } }, "required": [ "connector", "setupSettings" ] }, { "type": "object", "properties": { "connector": { "type": "string", "enum": [ "builtin:zendesk" ] }, "setupSettings": { "type": "object", "properties": { "subdomain": { "type": "string", "minLength": 1 }, "email": { "type": "string", "minLength": 1 }, "apiToken": { "type": "string", "minLength": 1 } }, "required": [ "subdomain", "email", "apiToken" ] } }, "required": [ "connector", "setupSettings" ] }, { "type": "object", "properties": { "connector": { "type": "string", "enum": [ "builtin:zoho-desk" ] }, "setupSettings": { "type": "object", "properties": { "dataCenter": { "type": "string", "minLength": 1, "description": "Zoho data center hosting the account, given as its API domain suffix (e.g. `com`, `eu`, `in`, `com.au`). Zoho scopes both the accounts and desk API hosts by data center." }, "orgId": { "type": "string", "minLength": 1, "description": "Zoho Desk organization id the tickets belong to." }, "clientId": { "type": "string", "minLength": 1 }, "clientSecret": { "type": "string", "minLength": 1 }, "refreshToken": { "type": "string", "minLength": 1 } }, "required": [ "dataCenter", "orgId", "clientId", "clientSecret", "refreshToken" ] } }, "required": [ "connector", "setupSettings" ] }, { "type": "object", "properties": { "connector": { "type": "string", "enum": [ "builtin:freshdesk" ] }, "setupSettings": { "type": "object", "properties": { "domain": { "type": "string", "minLength": 1, "description": "Freshdesk domain hosting the account, e.g. `mycompany.freshdesk.com` or just `mycompany`. Tickets and the API are scoped by this domain." }, "apiKey": { "type": "string", "minLength": 1, "description": "Freshdesk API key with permission to read tickets. Sent as HTTP Basic auth and redacted when read back." } }, "required": [ "domain", "apiKey" ] } }, "required": [ "connector", "setupSettings" ] }, { "type": "object", "properties": { "connector": { "type": "string", "enum": [ "builtin:pylon" ] }, "setupSettings": { "type": "object", "properties": { "token": { "type": "string", "minLength": 1 } }, "required": [ "token" ] } }, "required": [ "connector", "setupSettings" ] }, { "type": "object", "properties": { "connector": { "type": "string", "enum": [ "builtin:hubspot" ] }, "setupSettings": { "type": "object", "properties": { "token": { "type": "string", "minLength": 1 } }, "required": [ "token" ] } }, "required": [ "connector", "setupSettings" ] }, { "type": "object", "properties": { "connector": { "type": "string", "enum": [ "builtin:linear" ] }, "setupSettings": { "type": "object", "properties": { "token": { "type": "string", "minLength": 1 } }, "required": [ "token" ] } }, "required": [ "connector", "setupSettings" ] }, { "type": "object", "properties": { "connector": { "type": "string", "enum": [ "builtin:jira" ] }, "setupSettings": { "$ref": "#/components/schemas/JiraConnectorSetupSettings" } }, "required": [ "connector", "setupSettings" ] } ] }, "ContextConnection": { "allOf": [ { "type": "object", "properties": { "object": { "type": "string", "enum": [ "context-connection" ] }, "id": { "type": "string", "description": "The ID of the connection" }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "syncedAt": { "$ref": "#/components/schemas/Timestamp" }, "label": { "$ref": "#/components/schemas/ContextConnectionLabel" }, "filter": { "$ref": "#/components/schemas/ContextConnectionFilter" }, "status": { "$ref": "#/components/schemas/ContextConnectionStatus" }, "records": { "type": "integer", "description": "Number of records ingested from this connection" }, "failureMessage": { "type": "string", "description": "Failure message when synchronization fails" }, "failureReason": { "$ref": "#/components/schemas/ContextConnectionFailureReason" }, "skipReason": { "$ref": "#/components/schemas/AISkipReason" }, "email": { "type": "object", "description": "Parameters associated with the connection when it is an email connection", "properties": { "ingestionAddress": { "type": "string", "description": "Inbound email address for the connection", "format": "email" } } }, "usageSettings": { "$ref": "#/components/schemas/ContextUsageSettings" }, "urls": { "type": "object", "description": "URLs associated with the connection", "properties": { "location": { "type": "string", "description": "URL of the connection in the API", "format": "uri" } }, "required": [ "location" ] } }, "required": [ "object", "id", "createdAt", "status", "records", "usageSettings", "urls" ] }, { "$ref": "#/components/schemas/ContextConnectorSetup" } ] }, "baseUrl": { "type": "string", "format": "uri", "minLength": 1, "maxLength": 2048, "description": "Base URL of the Jira Cloud site, e.g. https://your-team.atlassian.net." }, "apiEmail": { "type": "string", "format": "email", "minLength": 1, "maxLength": 254, "description": "Email of the Atlassian account whose API token is used." }, "apiToken": { "type": "string", "minLength": 1, "maxLength": 1024, "description": "Atlassian API token used for outbound writes. Redacted when read back. Omit it when updating a connection to keep the stored token; required when the site URL or account email changes." }, "projectKeys": { "type": "array", "maxItems": 100, "uniqueItems": true, "description": "Projects where GitBook handles issues. Empty means all accessible projects.", "items": { "type": "string", "minLength": 1, "maxLength": 255 } }, "statusMapping": { "type": "object", "description": "Jira status to move the linked issue to when the change request reaches a given status, e.g. `{ \"merged\": \"Done\" }`. A status left out is not synced.", "propertyNames": { "$ref": "#/components/schemas/ChangeRequestStatus" }, "additionalProperties": { "type": "string", "minLength": 1, "maxLength": 255 } }, "ContextConnectionTestResult": { "type": "object", "required": [ "object", "success" ], "properties": { "object": { "type": "string", "enum": [ "context-connection-test-result" ] }, "success": { "type": "boolean", "description": "Whether the stored credentials authenticated successfully." }, "error": { "type": "string", "description": "A human-readable reason for the failure, when the test failed." } } }, "SiteQuestionAnswerRelevance": { "type": "string", "description": "Relevance classification of the user question.", "enum": [ "relevant", "spam", "off-topic", "unclear" ] }, "SiteCoreChannelType": { "type": "string", "enum": [ "site", "embed", "api" ] }, "SiteConfigurableChannelType": { "type": "string", "enum": [ "builtin:slack", "builtin:discord", "builtin:github", "builtin:linear" ] }, "SiteChannelType": { "oneOf": [ { "$ref": "#/components/schemas/SiteCoreChannelType" }, { "$ref": "#/components/schemas/SiteConfigurableChannelType" } ] }, "SiteQuestionVisitorType": { "type": "string", "description": "Who asked the question: `human` for a person using a web browser, `agent` for an AI agent, `bot` for another automated client that names itself, such as a search engine crawler, and `unknown` when it can't be told, such as for a script calling the API.", "enum": [ "human", "agent", "bot", "unknown" ] }, "SiteInsightsVisitorBot": { "type": [ "string", "null" ], "enum": [ null, "unknown", "googlebot", "bingbot", "duckduckbot", "facebookbot", "applebot", "chatgpt", "openai", "claude", "anthropic", "gemini", "perplexity", "cohere", "mistral", "deepseek", "meta", "bytespider", "ccbot", "amazonbot", "youbot", "cursor", "vscode", "claude-code", "codex", "opencode", "gptbot", "claudebot", "meta-fetcher", "grok", "github-copilot", "meta-webindexer", "meta-ads", "duckassist", "amzn-searchbot", "amzn-user", "other-bot", "parallel", "exa", "linkup", "vertex-ai", "atlassian", "kapa", "bedrock" ] }, "SiteQuestionAnswerSiteSaid": { "type": "string", "description": "What the site's content said about the main thing asked, judged from the answer. Unlike `answered`, which measures the assistant, it tells a product limit from a content gap: `covered` the site confirms it is possible or explains how it works; `limited` possible only under a named condition such as a plan, version, role or quota; `unsupported` the site says it cannot be done; `no-answer` the site gave no answer to a question a page could answer for everyone; `needs-support` only a person can resolve it, because it concerns the asker's own account, order, data or contract.", "enum": [ "covered", "limited", "unsupported", "no-answer", "needs-support" ] }, "SiteQuestionEscalation": { "type": "string", "description": "Who should act on an answer, derived from what was asked and what the site said. `docs` the site had no answer, or only a weak one, to a question a page could answer for everyone, so the content should be written or fixed; `team` the question needs a decision or clarification from a team beyond the docs, such as product, sales or marketing, for example when the site said something is not supported or only available on another plan; `support` only a person can resolve it, because it concerns the asker's own account, order, data or contract; `none` the site answered it.", "enum": [ "docs", "team", "support", "none" ] }, "SiteQuestionVisitorAuthentication": { "type": "string", "description": "Whether the visitor who asked was signed in to the site: `authenticated` on a site behind authenticated access, or when they asked with a verified visitor token, and `anonymous` otherwise. Questions asked through the API or a connected channel, and those asked before this was recorded, are neither.", "enum": [ "authenticated", "anonymous" ] }, "SiteQuestionAnswerResolution": { "type": "string", "description": "Whether the response answered the question.", "enum": [ "no", "partially", "yes" ] }, "SiteTopicUsageSettings": { "type": "object", "properties": { "changeRequests": { "type": "boolean", "description": "Whether to use context to propose change requests" } }, "required": [ "changeRequests" ] }, "SiteTopic": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "context-topic" ] }, "id": { "type": "string", "description": "The ID of the topic" }, "label": { "type": "string", "description": "The label of the topic" }, "parent": { "type": "object", "description": "The parent topic when this topic is nested under another one", "properties": { "id": { "type": "string", "description": "The ID of the parent topic" }, "label": { "type": "string", "description": "The label of the parent topic" } }, "required": [ "id", "label" ] }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "updatedAt": { "$ref": "#/components/schemas/Timestamp" }, "icon": { "$ref": "#/components/schemas/Icon" }, "summary": { "$ref": "#/components/schemas/JSONDocument" }, "usageSettings": { "$ref": "#/components/schemas/SiteTopicUsageSettings" }, "pages": { "type": "number", "description": "The number of pages associated with the topic" }, "records": { "type": "number", "description": "The number of records in the topic" }, "findings": { "type": "object", "description": "The number of findings linked to the topic", "properties": { "open": { "type": "number", "description": "The number of open findings linked to the topic" }, "total": { "type": "number", "description": "The total number of findings linked to the topic" } }, "required": [ "open", "total" ] }, "questions": { "$ref": "#/components/schemas/SiteQuestionStats" }, "urls": { "type": "object", "description": "URLs associated with the topic", "properties": { "location": { "type": "string", "description": "URL of the topic in the API", "format": "uri" } }, "required": [ "location" ] } }, "required": [ "object", "id", "label", "summary", "icon", "usageSettings", "pages", "records", "findings", "questions", "createdAt", "updatedAt", "urls" ] }, "SiteQuestionAnswerSourceBase": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "site-question-answer-source" ] }, "id": { "type": "string", "description": "The ID of the source." }, "weight": { "type": "number", "description": "Relative weight of this source in the generated answer." }, "title": { "type": "string", "description": "The title of the source." }, "urls": { "type": "object", "description": "URLs associated with the site question answer.", "properties": { "location": { "type": "string", "format": "uri", "description": "URL of the site question answer in the API." } }, "required": [ "location" ] } }, "required": [ "object", "id", "title", "weight", "urls" ] }, "SiteQuestionAnswerSourcePage": { "allOf": [ { "$ref": "#/components/schemas/SiteQuestionAnswerSourceBase" }, { "type": "object", "title": "Page source", "description": "Source data pointing to a page used for a site question answer.", "properties": { "type": { "type": "string", "enum": [ "page" ] }, "space": { "type": "string", "description": "The space ID of the source page." }, "revision": { "type": "string", "description": "The revision ID used for this source page." }, "page": { "type": "string", "description": "The page ID of the source page." } }, "required": [ "type", "space", "revision", "page" ] } ] }, "SiteQuestionAnswerSourceRecord": { "allOf": [ { "$ref": "#/components/schemas/SiteQuestionAnswerSourceBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "record" ] }, "record": { "type": "string", "description": "The site context record ID." }, "connector": { "$ref": "#/components/schemas/ContextConnector" } }, "required": [ "type", "record" ] } ] }, "SiteQuestionAnswerSource": { "oneOf": [ { "$ref": "#/components/schemas/SiteQuestionAnswerSourcePage" }, { "$ref": "#/components/schemas/SiteQuestionAnswerSourceRecord" } ], "discriminator": { "propertyName": "type" } }, "SiteQuestionTimelineInterval": { "type": "string", "description": "Size of a timeline bucket. Weeks start on Sunday, and every bucket is in UTC.", "enum": [ "hour", "day", "week", "month" ] }, "SiteQuestionTimelineBucket": { "type": "object", "properties": { "time": { "description": "Start of the bucket.", "$ref": "#/components/schemas/Timestamp" }, "answers": { "type": "number", "description": "Count of answers given during the bucket." }, "visitors": { "type": "number", "description": "Count of distinct visitors who received those answers." } }, "required": [ "time", "answers", "visitors" ] }, "SiteQuestionTimeline": { "type": "object", "description": "Ask AI answers counted per bucket, oldest first.", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/SiteQuestionTimelineBucket" } } }, "required": [ "items" ] }, "SiteGoal": { "type": "object", "description": "A distinct goal AI agents gave when asking a site's questions: the task they were working on for someone. Agents giving the same goal in the same words share one goal.", "properties": { "object": { "type": "string", "enum": [ "site-goal" ] }, "id": { "type": "string", "description": "The ID of the site goal." }, "goal": { "type": "string", "description": "The goal as the first agent to give it wrote it." }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "stats": { "type": "object", "description": "Activity of the goal within the requested filters.", "properties": { "questions": { "type": "number", "description": "Count of distinct questions agents asked with this goal." }, "answers": { "type": "number", "description": "Count of answers given to questions asked with this goal." }, "askedAt": { "description": "When a question was last asked with this goal.", "$ref": "#/components/schemas/Timestamp" } }, "required": [ "questions", "answers", "askedAt" ] } }, "required": [ "object", "id", "goal", "createdAt", "stats" ] }, "SiteQuestionAnswerHelpfulness": { "type": "string", "description": "Helpfulness of the response for the end user need.", "enum": [ "low", "medium", "high" ] }, "SiteQuestionAnswer": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "site-question-answer" ] }, "id": { "type": "string", "description": "The ID of the site question answer." }, "question": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the parent site question." }, "type": { "$ref": "#/components/schemas/SiteQuestionType" } }, "required": [ "id", "type" ] }, "topics": { "type": "array", "description": "The IDs of the associated site topics.", "items": { "type": "string" } }, "input": { "type": "object", "required": [ "text", "raw" ], "properties": { "text": { "type": "string", "description": "Normalized question text for this answer." }, "raw": { "type": "string", "description": "Raw question text as asked by the user." } } }, "thread": { "type": "object", "required": [ "id", "previous" ], "properties": { "id": { "type": "string", "description": "The ID of the thread this answer belongs to." }, "previous": { "type": "string", "description": "ID of the previous answer in the same thread." } } }, "session": { "$ref": "#/components/schemas/SiteInsightsSession" }, "feedback": { "type": "object", "required": [ "rating" ], "properties": { "rating": { "type": "integer", "enum": [ -1, 1 ], "description": "Feedback rating provided by the user." } } }, "responseId": { "type": "string", "description": "The response identifier for this answer." }, "language": { "type": "string", "description": "ISO language code of the question." }, "answered": { "$ref": "#/components/schemas/SiteQuestionAnswerResolution" }, "helpfulness": { "$ref": "#/components/schemas/SiteQuestionAnswerHelpfulness" }, "relevance": { "$ref": "#/components/schemas/SiteQuestionAnswerRelevance" }, "channel": { "oneOf": [ { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/SiteCoreChannelType" } }, "required": [ "type" ] }, { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/SiteConfigurableChannelType" }, "id": { "type": [ "string", "null" ], "description": "ID of the associated site channel when the answer originates from a configurable channel. Null if the channel has been deleted." } }, "required": [ "type", "id" ] } ] }, "visitorType": { "$ref": "#/components/schemas/SiteQuestionVisitorType" }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "updatedAt": { "$ref": "#/components/schemas/Timestamp" }, "urls": { "type": "object", "description": "URLs associated with the site question answer.", "properties": { "location": { "type": "string", "format": "uri", "description": "URL of the site question answer in the API." } }, "required": [ "location" ] } }, "required": [ "object", "id", "question", "topics", "input", "responseId", "language", "answered", "helpfulness", "relevance", "channel", "visitorType", "createdAt", "urls" ] }, "AIMessageRole": { "type": "string", "enum": [ "user", "assistant", "developer" ] }, "AIMessageStepStartCondition": { "type": "string", "description": "Describe the state in which the steps started.", "enum": [ "compaction" ] }, "AIToolCallGetPageContent": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "getPageContent" ] }, "spaceId": { "type": "string", "description": "The ID of the space being accessed." }, "revisionId": { "type": "string", "description": "The ID of the revision within which the page content is being fetched." }, "page": { "$ref": "#/components/schemas/ChangedRevisionPage" } }, "required": [ "tool", "spaceId", "page", "revisionId" ] }, "AIToolCallGetRecordContent": { "type": "object", "description": "Tool to read the body of an external record.", "properties": { "tool": { "type": "string", "enum": [ "getRecordContent" ] }, "siteId": { "type": "string", "description": "The ID of the site owning the context record." }, "recordId": { "type": "string", "description": "The ID of the context record." }, "title": { "type": "string", "description": "The title of the record." }, "url": { "type": "string", "format": "uri", "description": "URL of the record in the source system." } }, "required": [ "tool", "siteId", "recordId", "title" ] }, "AIToolCallGetPages": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "getPages" ] }, "spaceId": { "type": "string", "description": "The ID of the space being accessed." }, "revisionId": { "type": "string", "description": "The revision ID of the space." } }, "required": [ "tool", "spaceId", "revisionId" ] }, "AIToolCallGetReusableContents": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "getReusableContents" ] }, "spaceId": { "type": "string", "description": "The ID of the space being accessed." }, "revisionId": { "type": "string", "description": "The revision ID of the space." } }, "required": [ "tool", "spaceId", "revisionId" ] }, "AIToolCallSearchResultPage": { "type": "object", "title": "Page result", "description": "Result of a search matching a page.", "properties": { "type": { "type": "string", "enum": [ "page" ] }, "spaceId": { "type": "string", "description": "The ID of the space" }, "pageId": { "type": "string", "description": "The ID of the page" }, "revisionId": { "type": "string", "description": "The revision ID of the result" }, "path": { "type": "string", "description": "The path of the page within its space, as the published site serves it." }, "anchor": { "type": "string", "description": "The anchor of the result" }, "title": { "type": "string", "description": "The title of the result" }, "description": { "type": "string", "description": "The description of the result" } }, "required": [ "type", "spaceId", "pageId", "revisionId", "title" ] }, "AIToolCallSearchResultRecord": { "type": "object", "title": "Site context record result", "description": "Result of a search matching a site context record.", "properties": { "type": { "type": "string", "enum": [ "record" ] }, "siteId": { "type": "string", "description": "The ID of the site owning the context record" }, "recordId": { "type": "string", "description": "The ID of the context record" }, "title": { "type": "string", "description": "The title of the record" }, "description": { "type": "string", "description": "The description of the record" }, "url": { "type": "string", "format": "uri", "description": "URL of the record in its original source" } }, "required": [ "type", "siteId", "recordId", "title" ] }, "AIToolCallSearchResult": { "description": "Result of a search", "oneOf": [ { "$ref": "#/components/schemas/AIToolCallSearchResultPage" }, { "$ref": "#/components/schemas/AIToolCallSearchResultRecord" } ], "discriminator": { "propertyName": "type" } }, "AIToolCallSearch": { "type": "object", "description": "Tool to search for content", "properties": { "tool": { "type": "string", "enum": [ "search" ] }, "query": { "type": "string", "description": "The query that has been searched for." }, "results": { "type": "array", "items": { "$ref": "#/components/schemas/AIToolCallSearchResult" } } }, "required": [ "tool", "query", "results" ] }, "AIToolCallEditPage": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "editPage" ] }, "spaceId": { "type": "string", "description": "The ID of the space being edited." }, "baseRevisionId": { "type": "string", "description": "The base revision ID used to compare the page change in the current conversation." }, "page": { "$ref": "#/components/schemas/ChangedRevisionPage" }, "changeRequestId": { "type": "string", "description": "The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits.\n" } }, "required": [ "tool", "spaceId", "baseRevisionId", "page" ] }, "AIToolCallCreatePage": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "createPage" ] }, "spaceId": { "type": "string", "description": "The ID of the space being edited." }, "baseRevisionId": { "type": "string", "description": "The base revision ID used to compare the page change in the current conversation." }, "page": { "$ref": "#/components/schemas/ChangedRevisionPage" }, "changeRequestId": { "type": "string", "description": "The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits.\n" } }, "required": [ "tool", "spaceId", "baseRevisionId", "page" ] }, "AIToolCallDeletePage": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "deletePage" ] }, "spaceId": { "type": "string", "description": "The ID of the space being edited." }, "baseRevisionId": { "type": "string", "description": "The base revision ID used to compare the page deletion in the current conversation." }, "page": { "$ref": "#/components/schemas/ChangedRevisionPage" }, "changeRequestId": { "type": "string", "description": "The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits.\n" } }, "required": [ "tool", "spaceId", "baseRevisionId", "page" ] }, "AIToolCallRenamePage": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "renamePage" ] }, "spaceId": { "type": "string", "description": "The ID of the space being edited." }, "baseRevisionId": { "type": "string", "description": "The base revision ID used to compare the page rename in the current conversation." }, "page": { "$ref": "#/components/schemas/ChangedRevisionPage" }, "changeRequestId": { "type": "string", "description": "The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits.\n" }, "title": { "type": "string", "description": "The new title of the page." } }, "required": [ "tool", "spaceId", "baseRevisionId", "page", "title" ] }, "AIToolCallMovePage": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "movePage" ] }, "spaceId": { "type": "string", "description": "The ID of the space being edited." }, "baseRevisionId": { "type": "string", "description": "The base revision ID used to compare the page move in the current conversation." }, "page": { "$ref": "#/components/schemas/ChangedRevisionPage" }, "changeRequestId": { "type": "string", "description": "The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits.\n" }, "to": { "$ref": "#/components/schemas/ChangedRevisionPage" }, "moveType": { "type": "string", "description": "Indicates how the page was moved relative to the \"to\" page.\n- `within`: moved as the last child of the target page (or to the root when `to` is omitted)\n- `before`: moved directly before the target page\n- `after`: moved directly after the target page\n", "enum": [ "within", "before", "after" ] } }, "required": [ "tool", "spaceId", "baseRevisionId", "page", "moveType" ] }, "AIToolCallListModifiedPages": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "listModifiedPages" ] }, "spaceId": { "type": "string", "description": "The ID of the space being accessed." } }, "required": [ "tool", "spaceId" ] }, "AIToolCallGetPageDiff": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "getPageDiff" ] }, "spaceId": { "type": "string", "description": "The ID of the space being accessed." }, "page": { "$ref": "#/components/schemas/ChangedRevisionPage" } }, "required": [ "tool", "spaceId", "page" ] }, "AIToolCallCreateReusableContent": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "createReusableContent" ] }, "spaceId": { "type": "string", "description": "The ID of the space being edited." }, "baseRevisionId": { "type": "string", "description": "The base revision ID used to compare the reusable content change in the current conversation." }, "reusableContent": { "$ref": "#/components/schemas/ChangedRevisionReusableContent" } }, "required": [ "tool", "spaceId", "baseRevisionId", "reusableContent" ] }, "AIToolCallEditReusableContent": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "editReusableContent" ] }, "spaceId": { "type": "string", "description": "The ID of the space being edited." }, "baseRevisionId": { "type": "string", "description": "The base revision ID used to compare the reusable content change in the current conversation." }, "reusableContent": { "$ref": "#/components/schemas/ChangedRevisionReusableContent" } }, "required": [ "tool", "spaceId", "baseRevisionId", "reusableContent" ] }, "AIToolCallGetReusableContent": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "getReusableContent" ] }, "spaceId": { "type": "string", "description": "The ID of the space being accessed." }, "revisionId": { "type": "string", "description": "The ID of the revision within which the reusable content is being fetched." }, "reusableContent": { "$ref": "#/components/schemas/ChangedRevisionReusableContent" } }, "required": [ "tool", "spaceId", "reusableContent", "revisionId" ] }, "AIToolCallGetVariables": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "getVariables" ] }, "spaceId": { "type": "string", "description": "The ID of the space being accessed." }, "revisionId": { "type": "string", "description": "The revision ID of the space." } }, "required": [ "tool", "spaceId", "revisionId" ] }, "AIToolCallUpdateVariables": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "updateVariables" ] }, "spaceId": { "type": "string", "description": "The ID of the space being edited." }, "baseRevisionId": { "type": "string", "description": "The base revision ID used to compare the change in the current conversation." }, "page": { "description": "The page whose variables are being updated. Omitted when updating space variables.", "$ref": "#/components/schemas/ChangedRevisionPage" } }, "required": [ "tool", "spaceId", "baseRevisionId" ] }, "AIToolCallGetTags": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "getTags" ] }, "spaceId": { "type": "string", "description": "The ID of the space being accessed." }, "revisionId": { "type": "string", "description": "The revision ID of the space." } }, "required": [ "tool", "spaceId", "revisionId" ] }, "AIToolCallUpdateTags": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "updateTags" ] }, "spaceId": { "type": "string", "description": "The ID of the space being edited." }, "baseRevisionId": { "type": "string", "description": "The base revision ID used to compare the change in the current conversation." } }, "required": [ "tool", "spaceId", "baseRevisionId" ] }, "AIToolCallCreateChangeRequest": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "createChangeRequest" ] }, "spaceId": { "type": "string", "description": "The ID of the space the change request belongs to." }, "action": { "type": "string", "enum": [ "create", "update" ] }, "changeRequest": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the change request." }, "number": { "type": "number", "description": "Incremental identifier of the change request." }, "subject": { "type": "string", "description": "A brief summary of the change request." } }, "required": [ "id", "number", "subject" ] } }, "required": [ "tool", "spaceId", "action", "changeRequest" ] }, "AIToolCallGetChangeRequestDetails": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "getChangeRequestDetails" ] }, "spaceId": { "type": "string", "description": "The ID of the space the change request belongs to." }, "changeRequestId": { "type": "string", "description": "The ID of the change request." } }, "required": [ "tool", "spaceId", "changeRequestId" ] }, "AIToolCallSetChangeRequestDetails": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "setChangeRequestDetails" ] }, "spaceId": { "type": "string", "description": "The ID of the space the change request belongs to." }, "changeRequestId": { "type": "string", "description": "The ID of the change request." } }, "required": [ "tool", "spaceId", "changeRequestId" ] }, "AIToolCallArchiveChangeRequest": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "archiveChangeRequest" ] }, "spaceId": { "type": "string", "description": "The ID of the space the change request belongs to." }, "changeRequestId": { "type": "string", "description": "The ID of the change request." }, "reason": { "type": "string", "description": "Why the agent gave up on implementing the change request." } }, "required": [ "tool", "spaceId", "changeRequestId", "reason" ] }, "AIToolCallMergeChangeRequest": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "mergeChangeRequest" ] }, "spaceId": { "type": "string", "description": "The ID of the space the change request belongs to." }, "changeRequestId": { "type": "string", "description": "The ID of the change request that was merged." } }, "required": [ "tool", "spaceId", "changeRequestId" ] }, "AIToolCallComment": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "comment" ] }, "spaceId": { "type": "string", "description": "The ID of the space being commented." }, "page": { "description": "The page being commented.", "$ref": "#/components/schemas/ChangedRevisionPage" }, "commentId": { "type": "string", "description": "The ID of the comment being posted." } }, "required": [ "tool", "spaceId", "commentId" ] }, "AIToolCallReplyToComment": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "replyToComment" ] }, "spaceId": { "type": "string", "description": "The ID of the space being commented." }, "page": { "description": "The page being commented.", "$ref": "#/components/schemas/ChangedRevisionPage" }, "commentId": { "type": "string", "description": "The ID of the comment being replied to." }, "replyId": { "type": "string", "description": "The ID of the reply being posted." } }, "required": [ "tool", "spaceId", "commentId", "replyId" ] }, "AIToolCallGetComments": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "getComments" ] }, "spaceId": { "type": "string", "description": "The ID of the space the comments were read from." }, "commentId": { "type": "string", "description": "The ID of the comment that was read, when a single comment was requested by URL or ID." }, "count": { "type": "integer", "description": "The number of comments that were read." } }, "required": [ "tool", "spaceId" ] }, "AIToolCallSubmitChangeRequestReview": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "submitChangeRequestReview" ] }, "spaceId": { "type": "string", "description": "The ID of the space where the review was submitted." }, "changeRequestId": { "type": "string", "description": "The ID of the change request being reviewed." }, "status": { "$ref": "#/components/schemas/ChangeRequestReviewStatus", "description": "Result of the review." }, "reviewId": { "type": "string", "description": "Identifier of the review that was created." }, "commentId": { "type": "string", "description": "Identifier of the comment that was created as part of the review." } }, "required": [ "tool", "spaceId", "changeRequestId", "status", "reviewId", "commentId" ] }, "AIToolCallStartContentImport": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "startContentImport" ] }, "spaceId": { "type": "string", "description": "The ID of the space the content is imported into." }, "changeRequestId": { "type": "string", "description": "The ID of the change request the content is imported into." }, "runId": { "type": "string", "description": "The ID of the import run." }, "url": { "type": "string", "description": "The URL the content is imported from, when importing a website." }, "files": { "type": "array", "description": "Names of the attached files the content is imported from, when importing files.", "items": { "type": "string" } } }, "required": [ "tool", "spaceId", "changeRequestId", "runId" ] }, "AIToolCallCheckContentImport": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "checkContentImport" ] }, "runId": { "type": "string", "description": "The ID of the import run." }, "status": { "type": "string", "description": "Status of the import when it was checked.", "enum": [ "pending", "in-progress", "completed", "failed", "cancelled" ] }, "importedPages": { "type": "number", "description": "Number of pages imported when the import was checked." }, "totalPages": { "type": "number", "description": "Number of pages the import has discovered so far." } }, "required": [ "tool", "runId", "status", "importedPages", "totalPages" ] }, "AIToolCallImportOpenAPISpec": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "importOpenAPISpec" ] }, "spaceId": { "type": "string", "description": "The ID of the space the API reference is added to." }, "changeRequestId": { "type": "string", "description": "The ID of the change request the API reference is added to." }, "specSlug": { "type": "string", "description": "The slug of the OpenAPI spec the reference is generated from." }, "url": { "type": "string", "description": "The URL the spec is imported from, when importing from a URL." }, "file": { "type": "string", "description": "Name of the attached file the spec is imported from, when importing a file." } }, "required": [ "tool", "spaceId", "changeRequestId", "specSlug" ] }, "AIToolCallSiteSetupStep": { "type": "object", "properties": { "tool": { "type": "string", "enum": [ "siteSetupStep" ] }, "step": { "$ref": "#/components/schemas/SiteSetupStepId" }, "status": { "type": "string", "description": "Where the setup step stands in the conversation.\n* `current`: The step is being worked on.\n* `done`: The step is completed.\n* `skipped`: The user skipped the step.\n* `pending`: The step is not started: it waits again after the user went back to an earlier step.\n", "enum": [ "current", "done", "skipped", "pending" ] } }, "required": [ "tool", "step", "status" ] }, "AIToolCallStartBackgroundAgent": { "type": "object", "description": "Tool call recording that the agent started a background agent: a child conversation running one bounded task on its own, in parallel with the conversation that started it. The client renders its live status from `AgentState.backgroundAgents`, matched on `agentId`, and can open the child conversation to read what it did.\n", "properties": { "tool": { "type": "string", "enum": [ "startBackgroundAgent" ] }, "agentId": { "type": "string", "description": "Identifier of the background agent within the conversation that started it." }, "conversationId": { "type": "string", "description": "The child conversation holding the background agent's transcript. It can only be read, never continued.\n" }, "title": { "type": "string", "description": "A few words naming what the background agent is doing, for a tab and a line of a transcript. The task itself is a brief and far too long to label anything with.\n" }, "task": { "type": "string", "description": "The task the background agent was given." }, "pages": { "type": "array", "description": "IDs of the pages the background agent owns, when it was started to change content. Two background agents of the same conversation never own the same page.\n", "items": { "type": "string" } } }, "required": [ "tool", "agentId", "conversationId", "title", "task" ] }, "AIToolCallMCP": { "type": "object", "description": "Tool called from an MCP server", "properties": { "tool": { "type": "string", "enum": [ "mcp" ] }, "mcpServerId": { "type": "string", "description": "The ID of the MCP server that has been called." }, "mcpToolName": { "type": "string", "description": "The name of the tool that has been called." }, "mcpToolTitle": { "type": "string", "description": "The title of the tool that has been called." } }, "required": [ "tool", "mcpServerId", "mcpToolName" ] }, "AIToolCallOtherSummary": { "type": "object", "description": "Summary of a generic tool call.", "properties": { "icon": { "$ref": "#/components/schemas/Icon" }, "text": { "type": "string", "description": "Text to display to the user to describe the tool call." } }, "required": [ "icon", "text" ] }, "AIToolCallOther": { "type": "object", "description": "Any tool call that is unknown by GitBook", "properties": { "tool": { "type": "string", "enum": [ "other" ] }, "summary": { "$ref": "#/components/schemas/AIToolCallOtherSummary" } }, "required": [ "tool", "summary" ] }, "AIToolCall": { "oneOf": [ { "$ref": "#/components/schemas/AIToolCallGetPageContent" }, { "$ref": "#/components/schemas/AIToolCallGetRecordContent" }, { "$ref": "#/components/schemas/AIToolCallGetPages" }, { "$ref": "#/components/schemas/AIToolCallGetReusableContents" }, { "$ref": "#/components/schemas/AIToolCallSearch" }, { "$ref": "#/components/schemas/AIToolCallEditPage" }, { "$ref": "#/components/schemas/AIToolCallCreatePage" }, { "$ref": "#/components/schemas/AIToolCallDeletePage" }, { "$ref": "#/components/schemas/AIToolCallRenamePage" }, { "$ref": "#/components/schemas/AIToolCallMovePage" }, { "$ref": "#/components/schemas/AIToolCallListModifiedPages" }, { "$ref": "#/components/schemas/AIToolCallGetPageDiff" }, { "$ref": "#/components/schemas/AIToolCallCreateReusableContent" }, { "$ref": "#/components/schemas/AIToolCallEditReusableContent" }, { "$ref": "#/components/schemas/AIToolCallGetReusableContent" }, { "$ref": "#/components/schemas/AIToolCallGetVariables" }, { "$ref": "#/components/schemas/AIToolCallUpdateVariables" }, { "$ref": "#/components/schemas/AIToolCallGetTags" }, { "$ref": "#/components/schemas/AIToolCallUpdateTags" }, { "$ref": "#/components/schemas/AIToolCallCreateChangeRequest" }, { "$ref": "#/components/schemas/AIToolCallGetChangeRequestDetails" }, { "$ref": "#/components/schemas/AIToolCallSetChangeRequestDetails" }, { "$ref": "#/components/schemas/AIToolCallArchiveChangeRequest" }, { "$ref": "#/components/schemas/AIToolCallMergeChangeRequest" }, { "$ref": "#/components/schemas/AIToolCallComment" }, { "$ref": "#/components/schemas/AIToolCallReplyToComment" }, { "$ref": "#/components/schemas/AIToolCallGetComments" }, { "$ref": "#/components/schemas/AIToolCallSubmitChangeRequestReview" }, { "$ref": "#/components/schemas/AIToolCallStartContentImport" }, { "$ref": "#/components/schemas/AIToolCallCheckContentImport" }, { "$ref": "#/components/schemas/AIToolCallImportOpenAPISpec" }, { "$ref": "#/components/schemas/AIToolCallSiteSetupStep" }, { "$ref": "#/components/schemas/AIToolCallStartBackgroundAgent" }, { "$ref": "#/components/schemas/AIToolCallMCP" }, { "$ref": "#/components/schemas/AIToolCallOther" } ] }, "AIMessageStepPhase": { "type": "string", "description": "The phase of a step in a message from the AI agent.", "enum": [ "commentary", "final_answer" ] }, "Timerange": { "type": "object", "properties": { "start": { "$ref": "#/components/schemas/Timestamp" }, "end": { "$ref": "#/components/schemas/Timestamp" } }, "required": [ "start", "end" ] }, "AIAttachmentImage": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image" ] }, "url": { "$ref": "#/components/schemas/URL" }, "filename": { "type": "string", "description": "Name of the image file." } }, "required": [ "type", "url" ] }, "AIAttachmentFile": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "file" ] }, "url": { "$ref": "#/components/schemas/URL" }, "filename": { "type": "string", "description": "Name of the file." }, "contentType": { "type": "string", "description": "MIME type of the file. Must be a file type supported by the underlying model (see the OpenAI file-inputs documentation)." } }, "required": [ "type", "url", "filename", "contentType" ] }, "AIAttachmentImportFile": { "type": "object", "description": "A file attached for the sole purpose of being imported. Its content is never given to the model — the type is one the importer accepts but the model cannot read, such as a ZIP archive — so the model only learns that the file is attached and can import it.", "properties": { "type": { "type": "string", "enum": [ "import-file" ] }, "url": { "$ref": "#/components/schemas/URL" }, "filename": { "type": "string", "description": "Name of the file." }, "contentType": { "type": "string", "description": "MIME type of the file. Must be a file type supported by the content import." } }, "required": [ "type", "url", "filename", "contentType" ] }, "AIAttachment": { "oneOf": [ { "$ref": "#/components/schemas/AIAttachmentImage" }, { "$ref": "#/components/schemas/AIAttachmentFile" }, { "$ref": "#/components/schemas/AIAttachmentImportFile" } ] }, "AIMessageContext": { "type": "object", "description": "Context about the current user sending a message.", "properties": { "location": { "type": "object", "properties": { "spaceId": { "type": "string", "description": "ID of the current space." }, "pageId": { "type": "string", "description": "ID of the current page." } }, "required": [ "spaceId", "pageId" ] }, "comments": { "type": "array", "description": "Comments on the content the user is referring to in the message.", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the comment." }, "content": { "type": "string", "description": "Snapshot of the comment for display." } }, "required": [ "id" ] } }, "selection": { "type": "object", "description": "Range of the current selection in a document.", "properties": { "anchorKey": { "oneOf": [ { "type": "string" }, { "type": "null" } ] }, "anchorOffset": { "type": "integer" }, "focusKey": { "oneOf": [ { "type": "string" }, { "type": "null" } ] }, "focusOffset": { "type": "integer" }, "content": { "type": "string", "description": "Snapshot of the selection for display." } }, "required": [ "anchorKey", "anchorOffset", "focusKey", "focusOffset" ] } } }, "AIMessageStep": { "type": "object", "description": "A step in a message from the AI agent.", "properties": { "startCondition": { "$ref": "#/components/schemas/AIMessageStepStartCondition" }, "content": { "$ref": "#/components/schemas/JSONDocument" }, "reasoning": { "$ref": "#/components/schemas/JSONDocument" }, "toolCalls": { "type": "array", "items": { "$ref": "#/components/schemas/AIToolCall" } }, "phase": { "$ref": "#/components/schemas/AIMessageStepPhase" }, "timing": { "type": "object", "description": "The timing of the step.", "properties": { "reasoning": { "$ref": "#/components/schemas/Timerange" } } }, "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/AIAttachment" } }, "context": { "$ref": "#/components/schemas/AIMessageContext" } } }, "AIMessageTask": { "oneOf": [ { "type": "object", "description": "When the agent is responding to a comment.", "properties": { "type": { "type": "string", "enum": [ "respond_to_comment" ] }, "spaceId": { "type": "string", "description": "The ID of the space to respond to the comment in." }, "changeRequestId": { "type": "string", "description": "The ID of the change request to respond to the comment in." }, "commentId": { "type": "string", "description": "The ID of the comment to respond to." } }, "required": [ "type", "spaceId", "commentId" ] }, { "type": "object", "description": "When the agent is reviewing a change request.", "properties": { "type": { "type": "string", "enum": [ "review_change_request" ] }, "spaceId": { "type": "string", "description": "The ID of the space the change request is in." }, "changeRequestId": { "type": "string", "description": "The ID of the change request to review." } }, "required": [ "type", "spaceId", "changeRequestId" ] }, { "type": "object", "description": "When the agent is implementing a task in a change request.", "properties": { "type": { "type": "string", "enum": [ "implement_change_request" ] }, "spaceId": { "type": "string", "description": "The ID of the space the change request is in." }, "changeRequestId": { "type": "string", "description": "The ID of the change request to implement the task in." } }, "required": [ "type", "spaceId", "changeRequestId" ] }, { "type": "object", "description": "When the agent is a background agent running one task for the conversation that started it.\n", "properties": { "type": { "type": "string", "enum": [ "background_agent" ] }, "parentConversationId": { "type": "string", "description": "The conversation that started this background agent." } }, "required": [ "type", "parentConversationId" ] } ] }, "AIMessageResponseMetadata": { "description": "The response that generated this message.", "type": "object", "properties": { "stopReason": { "type": "string", "description": "The reason the response was stopped. If not defined, the response finished normally.", "enum": [ "aborted" ] }, "id": { "type": "string", "description": "The ID of the response that generated this message. It can be undefined if the stream was aborted." }, "previous": { "type": "string", "description": "The ID of the previous response that this message is based on." } } }, "AIMessage": { "type": "object", "properties": { "id": { "type": "string" }, "role": { "$ref": "#/components/schemas/AIMessageRole" }, "steps": { "type": "array", "items": { "$ref": "#/components/schemas/AIMessageStep" } }, "task": { "$ref": "#/components/schemas/AIMessageTask" }, "response": { "$ref": "#/components/schemas/AIMessageResponseMetadata" }, "createdAt": { "type": "string", "format": "date-time", "description": "When the message was added to the conversation. Absent on messages recorded before this field existed.\n" }, "clientMessageId": { "type": "string", "description": "The identifier the client gave the message when it sent it. Absent on messages the agent wrote, and on messages sent without one.\n" } }, "required": [ "id", "role", "steps" ] }, "SiteQuestionAnswerWithResponse": { "allOf": [ { "$ref": "#/components/schemas/SiteQuestionAnswer" }, { "type": "object", "properties": { "response": { "$ref": "#/components/schemas/AIMessage" }, "visitorClaims": { "description": "Claims of the site visitor who asked, as recorded by site insights. Absent when the visitor sent no claims.", "$ref": "#/components/schemas/PlainObject" } }, "required": [ "response" ] } ] }, "SiteSpaceCustomizationSettings": { "allOf": [ { "$ref": "#/components/schemas/SiteCustomizationSettings" }, { "type": "object", "properties": { "hasOverrides": { "type": "boolean", "description": "Indicates whether the site customization settings have been overridden." } }, "required": [ "hasOverrides" ] } ] }, "SiteRevisionNodeContentSpace": { "type": "object", "title": "Site revision node content from a space", "description": "A space, at a revision.", "properties": { "type": { "type": "string", "enum": [ "space" ] }, "space": { "type": "string", "description": "ID of the space." }, "revision": { "type": "string", "description": "ID of the revision." } }, "required": [ "type", "space", "revision" ] }, "SiteRevisionNodeContent": { "title": "Site revision node content", "description": "Content a space node shows.", "oneOf": [ { "$ref": "#/components/schemas/SiteRevisionNodeContentSpace" } ], "discriminator": { "propertyName": "type", "mapping": { "space": "#/components/schemas/SiteRevisionNodeContentSpace" } } }, "SiteRevisionChangePageCreated": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "page_created" ] }, "page": { "type": "string", "description": "ID of the page." } }, "required": [ "type", "page" ] }, "SiteRevisionChangePageEdited": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "page_edited" ] }, "page": { "type": "string", "description": "ID of the page." }, "attributes": { "description": "Attributes of the page that changed.", "anyOf": [ { "type": "object", "description": "Attributes every kind of page has.", "minProperties": 1, "properties": { "title": { "$ref": "#/components/schemas/ChangeAttributeString" }, "emoji": { "$ref": "#/components/schemas/ChangeAttributeString" } } }, { "oneOf": [ { "$ref": "#/components/schemas/RevisionPageDocumentChangeAttributes" }, { "$ref": "#/components/schemas/RevisionPageGroupChangeAttributes" }, { "$ref": "#/components/schemas/RevisionPageLinkChangeAttributes" } ] } ] } }, "required": [ "type", "page", "attributes" ] }, "SiteRevisionChangePageDeleted": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "page_deleted" ] }, "page": { "type": "string", "description": "ID of the page." } }, "required": [ "type", "page" ] }, "SiteRevisionChangePageMoved": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "page_moved" ] }, "page": { "type": "string", "description": "ID of the page." }, "parent": { "type": "object", "description": "ID of the page it is in. Null at the top of the node.", "properties": { "before": { "oneOf": [ { "type": "string" }, { "type": "null" } ] }, "after": { "oneOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "before", "after" ] } }, "required": [ "type", "page", "parent" ] }, "SiteRevisionContentChange": { "title": "Site revision content change", "description": "A change of a page or of the library of a space.", "oneOf": [ { "$ref": "#/components/schemas/SiteRevisionChangePageCreated" }, { "$ref": "#/components/schemas/SiteRevisionChangePageEdited" }, { "$ref": "#/components/schemas/SiteRevisionChangePageDeleted" }, { "$ref": "#/components/schemas/SiteRevisionChangePageMoved" }, { "$ref": "#/components/schemas/RevisionSemanticChangeFileCreated" }, { "$ref": "#/components/schemas/RevisionSemanticChangeFileEdited" }, { "$ref": "#/components/schemas/RevisionSemanticChangeFileDeleted" }, { "$ref": "#/components/schemas/RevisionSemanticChangeVariablesEdited" }, { "$ref": "#/components/schemas/RevisionSemanticChangeReusableContentCreated" }, { "$ref": "#/components/schemas/RevisionSemanticChangeReusableContentDeleted" }, { "$ref": "#/components/schemas/RevisionSemanticChangeReusableContentEdited" }, { "$ref": "#/components/schemas/RevisionSemanticChangeTagCreated" }, { "$ref": "#/components/schemas/RevisionSemanticChangeTagDeleted" }, { "$ref": "#/components/schemas/RevisionSemanticChangeTagEdited" } ] }, "SiteRevisionChangeSpaceContentEdited": { "type": "object", "description": "The content of the space a node shows changed. `before` and `after` are always the same space; a node that shows another space is a different change. A space shown by several nodes has this change, with the same page changes, under each of them. Pages the changes refer to are listed under the node in `includes.pages`.", "properties": { "type": { "type": "string", "enum": [ "space_content_edited" ] }, "node": { "type": "string", "description": "Key of the space node." }, "content": { "type": "object", "properties": { "before": { "description": "Content in the base. Absent when the base has none, in which case every page is listed as created.", "$ref": "#/components/schemas/SiteRevisionNodeContent" }, "after": { "description": "Content in the site revision.", "$ref": "#/components/schemas/SiteRevisionNodeContent" } }, "required": [ "after" ] }, "changes": { "type": "array", "description": "Changes of the content's pages and library.", "items": { "$ref": "#/components/schemas/SiteRevisionContentChange" } } }, "required": [ "type", "node", "content", "changes" ] }, "SiteRevisionStructureChange": { "title": "Site revision structure change", "description": "A change to a node of the site's structure.", "oneOf": [ { "$ref": "#/components/schemas/SiteRevisionChangeSpaceContentEdited" } ] }, "ChangedOpenAPISpec": { "type": "object", "description": "An OpenAPI spec of the organization.", "properties": { "id": { "type": "string", "description": "ID of the spec." }, "slug": { "type": "string", "description": "Slug of the spec." } }, "required": [ "id", "slug" ] }, "SiteRevisionChangeOpenAPISpecEdited": { "type": "object", "description": "An OpenAPI spec is at another version.", "properties": { "type": { "type": "string", "enum": [ "openapi_spec_edited" ] }, "spec": { "$ref": "#/components/schemas/ChangedOpenAPISpec" }, "version": { "type": "object", "description": "Version of the spec.", "properties": { "before": { "type": "string", "description": "Version in the base. Absent when the base has none." }, "after": { "type": "string", "description": "Version in the site revision." } }, "required": [ "after" ] } }, "required": [ "type", "spec", "version" ] }, "SiteRevisionOpenAPIChange": { "title": "Site revision OpenAPI change", "description": "A change to an OpenAPI spec.", "oneOf": [ { "$ref": "#/components/schemas/SiteRevisionChangeOpenAPISpecEdited" } ] }, "SiteRevisionNodeType": { "type": "string", "description": "Type of a node of the site's structure.", "enum": [ "section-group", "section", "space" ] }, "SiteRevisionNode": { "type": "object", "description": "A node of the site's structure: a section group, a section or a space. A space node is a place where the site shows content; the same content can be shown by several of them. Fields hold the node as it is in the site revision, whether or not they changed; a change to one is listed as its own change.", "properties": { "key": { "type": "string", "description": "Key of the node, unique across the nodes of the site. It is the node's key in the site's Git Sync configuration, or the key exporting the site would store for it when it has none yet." }, "type": { "$ref": "#/components/schemas/SiteRevisionNodeType" }, "parent": { "description": "Key of the node it is in. Null for a node at the top of the site.", "oneOf": [ { "type": "string" }, { "type": "null" } ] }, "title": { "type": "string" }, "path": { "type": "string", "description": "Path of a section or space in the site's URLs." }, "icon": { "description": "Icon of a section or section group, if it has one.", "$ref": "#/components/schemas/Icon" }, "emoji": { "description": "Emoji of the space a space node shows. It'll match the emoji shown in the GitBook app.", "$ref": "#/components/schemas/Emoji" }, "iconURL": { "description": "URL of the icon of the space a space node shows, if defined.", "$ref": "#/components/schemas/URL" }, "draft": { "type": "boolean", "description": "Whether the node is a draft, not shown on the live site." }, "hidden": { "type": "boolean", "description": "Whether a space node is hidden from the site's navigation. Only on space nodes: a section is hidden when all of its space nodes are." }, "content": { "description": "Content a space node shows.", "$ref": "#/components/schemas/SiteRevisionNodeContent" } }, "required": [ "key", "type", "parent", "title", "draft" ] }, "SiteRevisionPage": { "type": "object", "description": "A page of the content a space node shows. Fields hold the page as it is in the site revision, or in the base for a page deleted since.", "properties": { "node": { "type": "string", "description": "Key of the space node showing the page." }, "id": { "type": "string", "description": "ID of the page, unique within the node." }, "type": { "$ref": "#/components/schemas/RevisionPageType" }, "title": { "type": "string" }, "path": { "type": "string", "description": "Path of the page within the node. Absent for a link." }, "parent": { "description": "ID of the page it is in. Null for a page at the top of the node.", "oneOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "node", "id", "type", "title", "parent" ] }, "SiteRevisionChanges": { "title": "Site revision changes", "description": "Changes between a site revision and its base. A space or spec the site revision doesn't pin is read live, so it is never a change. Changes refer to nodes and pages, which are listed once in `includes`.", "type": "object", "properties": { "head": { "type": "string", "description": "Site revision whose changes are listed." }, "base": { "type": "string", "description": "Site revision compared against. Absent when compared against the live site." }, "structure": { "type": "object", "description": "Changes to the site's structure and the content it shows, in site order.", "properties": { "changes": { "type": "array", "description": "Changes the caller can view.", "items": { "$ref": "#/components/schemas/SiteRevisionStructureChange" } } }, "required": [ "changes" ] }, "openapi": { "type": "object", "description": "Changes to OpenAPI specs. Empty when the caller can't read the organization's specs.", "properties": { "changes": { "type": "array", "items": { "$ref": "#/components/schemas/SiteRevisionOpenAPIChange" } } }, "required": [ "changes" ] }, "includes": { "type": "object", "description": "What the changes refer to, with their ancestors, each listed once. Every entry comes after its parent, so a tree can be built in one pass.", "properties": { "structure": { "type": "array", "description": "Nodes of the site's structure the changes refer to, and their ancestors, as a flat list in site order. Nodes are linked to their parent by `parent`.", "items": { "$ref": "#/components/schemas/SiteRevisionNode" } }, "pages": { "type": "array", "description": "Pages the changes refer to, and their ancestors, under the space node showing them. Pages come in the order of the node's content; a page deleted since the base comes after those of the site revision.", "items": { "$ref": "#/components/schemas/SiteRevisionPage" } } }, "required": [ "structure", "pages" ] } }, "required": [ "head", "structure", "openapi", "includes" ] }, "SiteSectionGroupPointer": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "site-section", "site-section-group" ] }, "id": { "type": "string", "description": "Unique identifier for the site section" } }, "required": [ "type", "id" ] }, "SiteSectionGroupMovePosition": { "type": "object", "description": "Position at which to move the site section group.", "properties": { "before": { "$ref": "#/components/schemas/SiteSectionGroupPointer" }, "after": { "$ref": "#/components/schemas/SiteSectionGroupPointer" } } }, "SiteSectionPointer": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "site-section" ] }, "siteSection": { "type": "string", "description": "Unique identifier for the site section" } }, "required": [ "type", "siteSection" ] }, "SiteSectionMovePosition": { "type": "object", "description": "Position at which to move the site section to.", "properties": { "before": { "$ref": "#/components/schemas/SiteSectionPointer" }, "after": { "$ref": "#/components/schemas/SiteSectionPointer" } } }, "SiteSpacePointer": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "site-space" ] }, "siteSpace": { "type": "string", "description": "Unique identifier for the site space" } }, "required": [ "type", "siteSpace" ] }, "SiteSpaceMovePosition": { "type": "object", "description": "Position at which to move the site space to.", "properties": { "before": { "$ref": "#/components/schemas/SiteSpacePointer" }, "after": { "$ref": "#/components/schemas/SiteSpacePointer" } } }, "InviteSiteUsersAndTeams": { "type": "object", "properties": { "role": { "description": "Role to set.", "$ref": "#/components/schemas/MemberRoleOrGuest" } }, "anyOf": [ { "type": "object", "properties": { "teams": { "type": "array", "minItems": 1, "items": { "type": "string", "description": "The ID of the team to be invited" } } }, "required": [ "teams" ] }, { "type": "object", "properties": { "users": { "type": "array", "minItems": 1, "items": { "type": "string", "description": "The ID of the user to be invited" } } }, "required": [ "users" ] } ], "required": [ "role" ] }, "OrganizationPointer": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "organization" ] }, "organization": { "type": "string", "description": "Unique identifier for the organization" } }, "required": [ "type", "organization" ] }, "UserSitePermissionSiteOrigin": { "type": "object", "description": "Direct site permission origin.", "properties": { "type": { "type": "string", "enum": [ "site" ] }, "site": { "type": "string", "description": "Unique identifier for the site" }, "reason": { "type": "string", "description": "Why the permission was enforced at the site level.", "enum": [ "member", "team", "default" ] }, "team": { "type": "string", "description": "Unique identifier for the team when the permission comes from a team override." } }, "required": [ "type", "site", "reason" ] }, "UserSitePermissionOrigin": { "description": "The origin that enforced the effective permission level for a user in a site.", "oneOf": [ { "$ref": "#/components/schemas/SpacePointer" }, { "$ref": "#/components/schemas/OrganizationPointer" }, { "$ref": "#/components/schemas/UserSitePermissionSiteOrigin" } ] }, "UserSitePermission": { "type": "object", "description": "Permission of a user in a site.", "properties": { "permission": { "$ref": "#/components/schemas/MemberRoleOrGuest" }, "user": { "$ref": "#/components/schemas/User" }, "origin": { "$ref": "#/components/schemas/UserSitePermissionOrigin" }, "disabled": { "$ref": "#/components/schemas/MemberDisabled" }, "lastSeenAt": { "description": "Date at which the user was last seen", "$ref": "#/components/schemas/Timestamp" } }, "required": [ "permission", "user", "origin", "disabled" ] }, "UserSitePermissionOverride": { "type": "object", "description": "Permission override of a user in a site.", "properties": { "permission": { "$ref": "#/components/schemas/MemberRoleOrGuest" }, "user": { "$ref": "#/components/schemas/User" } }, "required": [ "permission", "user" ] }, "TeamSitePermissionOverride": { "type": "object", "description": "Permission override of a team in a site.", "properties": { "permission": { "$ref": "#/components/schemas/MemberRoleOrGuest" }, "team": { "$ref": "#/components/schemas/OrganizationTeam" } }, "required": [ "permission", "team" ] }, "AIMessageInput": { "type": "object", "description": "Input version of an AI message.", "properties": { "role": { "$ref": "#/components/schemas/AIMessageRole" }, "content": { "oneOf": [ { "type": "string", "maxLength": 2048 }, { "$ref": "#/components/schemas/JSONDocument" } ] }, "context": { "$ref": "#/components/schemas/AIMessageContext" }, "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/AIAttachment" } }, "clientMessageId": { "type": "string", "maxLength": 64, "description": "Identifier the client gives the message it sends, echoed on the message the agent adds to the conversation, so the client can tell its own message apart from any other.\n" } }, "required": [ "role", "content" ] }, "AIModel": { "type": "string", "enum": [ "fast", "reasoning-low", "reasoning-medium", "reasoning-high" ] }, "AIToolDefinition": { "type": "object", "description": "Description of a tool that can be called from an AI agent.", "properties": { "name": { "type": "string", "description": "The name of the tool. It should be unique within the agent." }, "description": { "type": "string", "description": "The description of the tool, passed to the AI agent." }, "inputSchema": { "type": "object", "description": "JSON schema describing the input of the tool.", "properties": { "type": { "type": "string", "enum": [ "object" ] }, "properties": { "type": "object", "additionalProperties": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "string", "number", "boolean", "array", "object" ] }, "description": { "type": "string", "description": "Description of the property." } }, "required": [ "type", "description" ], "additionalProperties": true } } }, "required": [ "type", "properties" ] } }, "required": [ "name", "description" ] }, "AIToolCallResult": { "type": "object", "description": "Result of a tool call.", "required": [ "tool", "toolCallId", "output" ], "properties": { "tool": { "type": "string", "description": "The name of the tool that was called." }, "toolCallId": { "type": "string", "description": "The ID of the tool call." }, "output": { "type": "object", "description": "The output to the tool call." }, "summary": { "$ref": "#/components/schemas/AIToolCallOtherSummary" } } }, "AIStreamResponseStart": { "type": "object", "description": "Message emitted by the server to indicate the start of the AI response.\n", "properties": { "type": { "type": "string", "enum": [ "response_start" ] }, "messageId": { "type": "string", "description": "The ID of the message that this event is composing.\n" }, "task": { "$ref": "#/components/schemas/AIMessageTask" } }, "required": [ "type", "messageId" ] }, "AIStreamResponseStepStart": { "type": "object", "description": "Message emitted by the server to indicate the start of a step in the AI response.\n", "properties": { "type": { "type": "string", "enum": [ "response_step_start" ] }, "messageId": { "type": "string", "description": "The ID of the message that this event is composing.\n" }, "stepIndex": { "type": "integer", "description": "The index of the step of the message that this event is composing.\n" }, "phase": { "$ref": "#/components/schemas/AIMessageStepPhase" } }, "required": [ "type", "messageId", "stepIndex" ] }, "AIStreamResponseFinish": { "type": "object", "description": "Message emitted by the server to indicate the end of the AI response. It contains the ID of the response to be referenced for followup requests.\n", "properties": { "type": { "type": "string", "enum": [ "response_finish" ] }, "messageId": { "type": "string", "description": "The ID of the message that this event is composing.\n" }, "responseId": { "type": "string", "deprecated": true, "description": "The ID of the response" }, "response": { "description": "The response metadata associated with the message.", "$ref": "#/components/schemas/AIMessageResponseMetadata" } }, "required": [ "type", "messageId", "response" ] }, "AIStreamResponseDocument": { "type": "object", "description": "Message emitted by the server to indicate the latest block of the document. The block can either be a new block or an update to the previous block.\n", "properties": { "type": { "type": "string", "enum": [ "response_document", "response_reasoning" ] }, "messageId": { "type": "string", "description": "The ID of the message that this event is composing.\n" }, "stepIndex": { "type": "integer", "description": "The index of the step of the message that this event is composing.\n" }, "operation": { "type": "string", "enum": [ "insert", "update" ] }, "blocks": { "type": "array", "items": { "$ref": "#/components/schemas/DocumentBlocksTopLevels" } } }, "required": [ "type", "messageId", "stepIndex", "operation", "blocks" ] }, "AIStreamResponseObject": { "type": "object", "description": "Message emitted by the server to indicate a chunk of the JSON object response.\n", "properties": { "type": { "type": "string", "enum": [ "response_object" ] }, "messageId": { "type": "string", "description": "The ID of the message that this event is composing.\n" }, "jsonChunk": { "type": "string", "description": "The chunk of the JSON object response" } }, "required": [ "type", "messageId", "jsonChunk" ] }, "AIStreamResponseToolCall": { "type": "object", "description": "Message emitted by the server to indicate that the AI has called a tool.\n", "properties": { "type": { "type": "string", "enum": [ "response_tool_call" ] }, "messageId": { "type": "string", "description": "The ID of the message that this event is composing.\n" }, "stepIndex": { "type": "integer", "description": "The index of the step of the message that this event is composing.\n" }, "toolCall": { "$ref": "#/components/schemas/AIToolCall" } }, "required": [ "type", "messageId", "stepIndex", "toolCall" ] }, "AIStreamResponseToolCallPending": { "type": "object", "description": "Message emitted by the server to indicate that the AI is calling a client-side tool.\n", "properties": { "type": { "type": "string", "enum": [ "response_tool_call_pending" ] }, "messageId": { "type": "string", "description": "The ID of the message that this event is composing.\n" }, "stepIndex": { "type": "integer", "description": "The index of the step of the message that this event is composing.\n" }, "toolCall": { "type": "object", "description": "The tool call that the AI is calling.", "required": [ "tool", "input" ], "properties": { "tool": { "type": "string", "description": "The name of the tool that the AI is calling." }, "input": { "type": "object", "description": "The input to the tool call." } } }, "toolCallId": { "type": "string", "description": "The ID of the tool call that the AI is calling." } }, "required": [ "type", "messageId", "stepIndex", "toolCall", "toolCallId" ] }, "AIStreamResponseFollowupSuggestion": { "type": "object", "description": "Message emitted by the server to suggest a followup message the user could respond with.\n", "properties": { "type": { "type": "string", "enum": [ "response_followup_suggestion" ] }, "messageId": { "type": "string", "description": "The ID of the message that this event is composing.\n" }, "suggestions": { "type": "array", "items": { "type": "string", "description": "A followup message the user could respond with.\n" } } }, "required": [ "type", "messageId", "suggestions" ] }, "AIStreamResponseAttachment": { "type": "object", "description": "Message emitted by the server to indicate that the AI has attached an image.\n", "properties": { "type": { "type": "string", "enum": [ "response_attachment" ] }, "messageId": { "type": "string", "description": "The ID of the message that this event is composing.\n" }, "stepIndex": { "type": "integer", "description": "The index of the step of the message that this event is composing.\n" }, "attachment": { "$ref": "#/components/schemas/AIAttachment" } }, "required": [ "type", "messageId", "stepIndex", "attachment" ] }, "AIStreamResponseCompaction": { "type": "object", "description": "Message emitted by the server to indicate a context compaction event.\n", "properties": { "type": { "type": "string", "enum": [ "response_compaction" ] }, "messageId": { "type": "string", "description": "The ID of the message that this event is composing.\n" }, "stepIndex": { "type": "integer", "description": "The index of the step of the message that this event is composing.\n" } }, "required": [ "type", "messageId", "stepIndex" ] }, "AIStreamResponse": { "oneOf": [ { "$ref": "#/components/schemas/AIStreamResponseStart" }, { "$ref": "#/components/schemas/AIStreamResponseStepStart" }, { "$ref": "#/components/schemas/AIStreamResponseFinish" }, { "$ref": "#/components/schemas/AIStreamResponseDocument" }, { "$ref": "#/components/schemas/AIStreamResponseObject" }, { "$ref": "#/components/schemas/AIStreamResponseToolCall" }, { "$ref": "#/components/schemas/AIStreamResponseToolCallPending" }, { "$ref": "#/components/schemas/AIStreamResponseFollowupSuggestion" }, { "$ref": "#/components/schemas/AIStreamResponseAttachment" }, { "$ref": "#/components/schemas/AIStreamResponseCompaction" } ] }, "SiteSettingsBrokenLinksAutonomyLevel": { "type": "string", "description": "How much GitBook may do on its own when it resolves broken links automatically. GitBook never\napplies a fix it isn't sure about, at any level.\n - `suggest-fixes` drafts fixes for approval and applies none.\n - `fix-clear-matches` applies the clearest fixes and drafts the less certain ones for approval.\n - `fix-close-matches` applies the clear and the close fixes.\nAt every level, GitBook drafts change requests that fix broken links to other sites, and never\nmerges them.\n", "enum": [ "suggest-fixes", "fix-clear-matches", "fix-close-matches" ] }, "SiteSettingsBrokenLinks": { "type": "object", "description": "Settings for how GitBook resolves the broken links it finds on a site.", "properties": { "autoResolve": { "type": "boolean", "description": "Whether GitBook resolves broken links automatically." }, "autonomyLevel": { "$ref": "#/components/schemas/SiteSettingsBrokenLinksAutonomyLevel" } }, "required": [ "autoResolve", "autonomyLevel" ] }, "SiteSettingsScanTopics": { "type": "string", "enum": [ "auto", "never" ], "description": "Controls when topics are being scanned for findings." }, "SiteSettingsFindingChangeRequests": { "type": "string", "enum": [ "always", "auto-fixable", "never" ], "description": "Controls how issue remediation change requests should be handled for a site." }, "SiteAgentSettingsInput": { "type": "object", "properties": { "scans": { "description": "Settings related to scanning for a site.", "type": "object", "properties": { "topics": { "$ref": "#/components/schemas/SiteSettingsScanTopics" } }, "required": [ "topics" ] }, "findings": { "description": "Settings related to processing of findings for a site.", "type": "object", "properties": { "changeRequests": { "$ref": "#/components/schemas/SiteSettingsFindingChangeRequests" } }, "required": [ "changeRequests" ] }, "editing": { "description": "Site-specific instructions for the editing agent.", "type": "object", "properties": { "customInstructions": { "$ref": "#/components/schemas/JSONDocument" } }, "required": [ "customInstructions" ] }, "brokenLinks": { "$ref": "#/components/schemas/SiteSettingsBrokenLinks" } }, "required": [ "scans", "findings", "editing" ] }, "SiteAgentSettings": { "allOf": [ { "type": "object", "properties": { "object": { "type": "string", "enum": [ "site-agent-settings" ] }, "brokenLinks": { "$ref": "#/components/schemas/SiteSettingsBrokenLinks" }, "updatedAt": { "$ref": "#/components/schemas/Timestamp" }, "updatedBy": { "type": "string", "description": "Identifier of the member who last updated the settings." }, "urls": { "type": "object", "properties": { "location": { "type": "string", "description": "Relative URL to the resource in the API." } }, "required": [ "location" ] } }, "required": [ "object", "brokenLinks", "urls" ] }, { "$ref": "#/components/schemas/SiteAgentSettingsInput" } ] }, "SiteStyleguideRun": { "type": "object", "description": "A style guide check run: one time a user asked GitBook Agent to check a set of the site's spaces against the site's style guide, opening a change request for each.", "properties": { "object": { "type": "string", "enum": [ "styleguide-run" ] }, "id": { "type": "string", "description": "The ID of the run" }, "site": { "type": "string", "description": "ID of the site the run belongs to" }, "styleguide": { "type": "string", "description": "ID of the style guide space the run checked against" }, "spaces": { "type": "array", "description": "IDs of the spaces the run was asked to check. A change request may have failed to open for one of them, so this is the intent rather than the result.", "items": { "type": "string" } }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "createdBy": { "$ref": "#/components/schemas/User" } }, "required": [ "object", "id", "site", "styleguide", "spaces", "createdAt", "createdBy" ] }, "SiteInsightsUserAgent": { "type": "string", "description": "User agent of the visitor.\nhttps://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent\n" }, "SiteInsightsEventSession": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsSession" }, { "type": "object", "description": "Analytics info on the GitBook's site session.", "properties": { "cookies": { "type": "object", "description": "The visitors cookies.", "additionalProperties": { "type": "string" } }, "ip": { "type": "string", "description": "IP address of the visitor.\nIf not defined, it'll default to the IP executing the request.\n" }, "userAgent": { "$ref": "#/components/schemas/SiteInsightsUserAgent" }, "language": { "type": [ "string", "null" ], "description": "Language of the visitor.\nhttps://developer.mozilla.org/en-US/docs/Web/API/Navigator/language\n" }, "referrer": { "description": "Referrer of the session", "oneOf": [ { "type": "null" }, { "type": "string", "enum": [ "" ] }, { "$ref": "#/components/schemas/URL" } ] }, "visitorAuthToken": { "type": [ "string", "null" ], "deprecated": true, "description": "Deprecated, use visitorAuthClaims instead." }, "visitorAuthClaims": { "description": "Claims of the visitor.\nThis is used to identify the visitor with adaptive content.\n", "$ref": "#/components/schemas/PlainObject" } }, "required": [ "cookies", "userAgent", "language", "referrer" ] } ] }, "SiteInsightsDisplayContext": { "type": "string", "description": "Context in which the event was recorded.", "enum": [ "site", "server", "embed", "mcp" ] }, "SiteInsightsEventLocation": { "type": "object", "description": "Location of the event.", "properties": { "url": { "description": "URL of the location.", "$ref": "#/components/schemas/URL" }, "previousUrl": { "description": "URL of the page of the site the visitor was on before this one, if any. Unlike the session referrer, it follows navigation within the site. Only recorded when it has the same origin as `url`; any other value is discarded.", "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/URL" } ] }, "displayContext": { "description": "Whether the event was tracked on the site, the server, or an embed widget.", "$ref": "#/components/schemas/SiteInsightsDisplayContext", "default": "site" }, "siteSection": { "type": [ "string", "null" ], "description": "ID of the concerned site section." }, "siteSpace": { "type": [ "string", "null" ], "description": "ID of the concerned site space." }, "siteShareKey": { "type": [ "string", "null" ], "description": "ID of the concerned site share key." }, "space": { "type": [ "string", "null" ], "description": "ID of the concerned space." }, "revision": { "type": [ "string", "null" ], "description": "ID of the concerned revision." }, "page": { "type": [ "string", "null" ], "description": "ID of the concerned page." } }, "required": [ "url", "siteSection", "siteSpace", "siteShareKey", "page", "space", "revision" ] }, "SiteInsightsEventBase": { "type": "object", "properties": { "session": { "$ref": "#/components/schemas/SiteInsightsEventSession" }, "location": { "$ref": "#/components/schemas/SiteInsightsEventLocation" }, "timestamp": { "description": "Optional timestamp of the event. If not provided, the current timestamp will be used. Must be within 5 minutes of the current time.", "$ref": "#/components/schemas/Timestamp" } }, "required": [ "session", "location" ] }, "SiteInsightsEventPageView": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "page_view" ] } }, "required": [ "type" ] } ] }, "SiteInsightsMarkdownSource": { "description": "How a page's markdown was requested. `page-action` means a reader used the site's page-actions menu — its copy or view-as-markdown action — rather than a client fetching the URL directly.", "type": "string", "enum": [ "page-action" ] }, "SiteInsightsEventPageMarkdownRequest": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "page_markdown_request" ] }, "markdownSource": { "$ref": "#/components/schemas/SiteInsightsMarkdownSource" } }, "required": [ "type" ] } ] }, "SiteInsightsEventSearchOpen": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "search_open" ] } }, "required": [ "type" ] } ] }, "SiteInsightsEventSearchTypeQuery": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "search_type_query" ] }, "query": { "type": "string", "description": "Query of the search." } }, "required": [ "type", "query" ] } ] }, "SiteInsightsSearchResultNumber": { "type": "integer", "minimum": 1, "maximum": 20, "description": "Published site search displays up to ten page results and ten supplemental records per request." }, "SiteInsightsEventSearchOpenResult": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "search_open_result" ] }, "query": { "type": "string", "description": "Query of the search." }, "position": { "description": "One-based position of the opened result in the displayed list.", "allOf": [ { "$ref": "#/components/schemas/SiteInsightsSearchResultNumber" } ] }, "resultsCount": { "description": "Number of results in the displayed list.", "allOf": [ { "$ref": "#/components/schemas/SiteInsightsSearchResultNumber" } ] }, "searchId": { "$ref": "#/components/schemas/SiteSearchId" }, "result": { "description": "Target of the opened search result.", "oneOf": [ { "type": "object", "properties": { "spaceId": { "type": "string", "description": "ID of the concerned space." }, "pageId": { "type": "string", "description": "ID of the concerned page." } }, "required": [ "spaceId", "pageId" ] }, { "type": "object", "properties": { "recordId": { "type": "string", "description": "ID of the concerned record." } }, "required": [ "recordId" ] } ] } }, "required": [ "type", "query", "result" ] } ] }, "PageFeedbackRating": { "type": "string", "enum": [ "bad", "ok", "good" ] }, "SiteInsightsEventPagePostFeedback": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "page_post_feedback" ] }, "feedback": { "type": "object", "properties": { "rating": { "$ref": "#/components/schemas/PageFeedbackRating" } }, "required": [ "rating" ] } }, "required": [ "type", "feedback" ] } ] }, "SiteInsightsEventPagePostFeedbackComment": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "page_post_feedback_comment" ] }, "feedback": { "type": "object", "properties": { "rating": { "$ref": "#/components/schemas/PageFeedbackRating" }, "comment": { "type": "string", "minLength": 1, "maxLength": 512 } }, "required": [ "rating", "comment" ] } }, "required": [ "type", "feedback" ] } ] }, "SiteInsightsEventAgentFeedback": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "agent_feedback" ] } }, "required": [ "type" ] } ] }, "SiteInsightsEventAskQuestion": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "ask_question" ] }, "query": { "type": "string", "description": "Question being asked." }, "goal": { "type": "string", "description": "The end goal the calling agent is trying to accomplish on behalf of the user, when provided alongside the question. Used to measure the goal→completion lifecycle per agent." } }, "required": [ "type", "query" ] } ] }, "SiteInsightsEventAskView": { "description": "Event when a user views the ask UI.", "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "ask_view" ] }, "trigger": { "type": "string", "enum": [ "hover", "selection", "site", "page", "code", "embed" ] } }, "required": [ "type" ] } ] }, "SiteInsightsEventAskTriggerClick": { "description": "Event when a user clicks an entry point that opens the ask UI.", "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "ask_trigger_click" ] }, "trigger": { "type": "string", "enum": [ "hover", "selection", "site", "page", "code" ] } }, "required": [ "type", "trigger" ] } ] }, "SiteInsightsEventAskRateResponse": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "ask_rate_response" ] }, "query": { "type": "string", "description": "Question asked." }, "rating": { "type": "integer", "enum": [ 1, -1 ] }, "responseId": { "type": "string", "description": "ID of the AI response." } }, "required": [ "type", "query", "rating", "responseId" ] } ] }, "SiteInsightsLinkPosition": { "type": "string", "enum": [ "announcement", "header", "footer", "sidebar", "content" ] }, "SiteInsightsEventLinkClick": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "link_click" ] }, "link": { "type": "object", "properties": { "target": { "$ref": "#/components/schemas/ContentRef" }, "position": { "$ref": "#/components/schemas/SiteInsightsLinkPosition" } }, "required": [ "target", "position" ] } }, "required": [ "type", "link" ] } ] }, "SiteInsightsEventAPIClientOpen": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "api_client_open" ] }, "operation": { "$ref": "#/components/schemas/OpenAPIOperationPointer" } }, "required": [ "type", "operation" ] } ] }, "SiteInsightsEventAPIClientRequest": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "api_client_request" ] }, "operation": { "$ref": "#/components/schemas/OpenAPIOperationPointer" } }, "required": [ "type", "operation" ] } ] }, "SiteInsightsTrademarkPlacement": { "type": "string", "enum": [ "sidebar", "ad", "footer", "pdf", "embed" ] }, "SiteInsightsEventTrademarkClick": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "trademark_click" ] }, "placement": { "$ref": "#/components/schemas/SiteInsightsTrademarkPlacement" } }, "required": [ "type", "placement" ] } ] }, "SiteInsightsAdPlacement": { "type": "string", "enum": [ "aside" ] }, "SiteInsightsAd": { "type": "object", "properties": { "domain": { "type": "string" }, "zoneId": { "type": "string" }, "placement": { "$ref": "#/components/schemas/SiteInsightsAdPlacement" } }, "required": [ "domain", "zoneId", "placement" ] }, "SiteInsightsEventAdClick": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "ad_click" ] }, "ad": { "$ref": "#/components/schemas/SiteInsightsAd" } }, "required": [ "type", "ad" ] } ] }, "SiteInsightsEventAdDisplay": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "ad_display" ] }, "ad": { "$ref": "#/components/schemas/SiteInsightsAd" } }, "required": [ "type", "ad" ] } ] }, "SiteInsightsLLMSVariant": { "type": "string", "enum": [ "standard", "full" ] }, "SiteInsightsEventLLMSRequest": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "llms_request" ] }, "llmsVariant": { "$ref": "#/components/schemas/SiteInsightsLLMSVariant" } }, "required": [ "type", "llmsVariant" ] } ] }, "SiteInsightsEventMCPRequest": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "mcp_request" ] } }, "required": [ "type" ] } ] }, "SiteInsightsEventRSSRequest": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsEventBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "rss_request" ] } }, "required": [ "type" ] } ] }, "SiteInsightsEvent": { "oneOf": [ { "$ref": "#/components/schemas/SiteInsightsEventPageView" }, { "$ref": "#/components/schemas/SiteInsightsEventPageMarkdownRequest" }, { "$ref": "#/components/schemas/SiteInsightsEventSearchOpen" }, { "$ref": "#/components/schemas/SiteInsightsEventSearchTypeQuery" }, { "$ref": "#/components/schemas/SiteInsightsEventSearchOpenResult" }, { "$ref": "#/components/schemas/SiteInsightsEventPagePostFeedback" }, { "$ref": "#/components/schemas/SiteInsightsEventPagePostFeedbackComment" }, { "$ref": "#/components/schemas/SiteInsightsEventAgentFeedback" }, { "$ref": "#/components/schemas/SiteInsightsEventAskQuestion" }, { "$ref": "#/components/schemas/SiteInsightsEventAskView" }, { "$ref": "#/components/schemas/SiteInsightsEventAskTriggerClick" }, { "$ref": "#/components/schemas/SiteInsightsEventAskRateResponse" }, { "$ref": "#/components/schemas/SiteInsightsEventLinkClick" }, { "$ref": "#/components/schemas/SiteInsightsEventAPIClientOpen" }, { "$ref": "#/components/schemas/SiteInsightsEventAPIClientRequest" }, { "$ref": "#/components/schemas/SiteInsightsEventTrademarkClick" }, { "$ref": "#/components/schemas/SiteInsightsEventAdClick" }, { "$ref": "#/components/schemas/SiteInsightsEventAdDisplay" }, { "$ref": "#/components/schemas/SiteInsightsEventLLMSRequest" }, { "$ref": "#/components/schemas/SiteInsightsEventMCPRequest" }, { "$ref": "#/components/schemas/SiteInsightsEventRSSRequest" } ] }, "SiteInsightsQueryDateTimeColumn": { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "datetime" ] }, "interval": { "type": "string", "enum": [ "hour", "day", "week", "month" ] } } }, "SiteInsightsQueryEventsColumn": { "oneOf": [ { "$ref": "#/components/schemas/SiteInsightsQueryDateTimeColumn" }, { "type": "object", "description": "Day of the week the event happened in `timezone`, from 1 (Monday) to 7 (Sunday). Group by it alongside `hourOfDay` to fold any range into a weekly activity profile.", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "dayOfWeek" ] }, "timezone": { "type": "string", "description": "IANA time zone the event is read in, UTC when omitted.", "example": "Europe/Paris" } } }, { "type": "object", "description": "Hour of the day the event happened in `timezone`, from 0 to 23.", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "hourOfDay" ] }, "timezone": { "type": "string", "description": "IANA time zone the event is read in, UTC when omitted.", "example": "Europe/Paris" } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "url" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "urlPath" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventType" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventsCount" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "sessionsCount" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "visitorsCount" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "siteSection" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "siteSpace" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "siteShareKey" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "displayContext" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "page" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "visitorGeoCountry" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "visitorGeoPoint" ] }, "precision": { "type": "integer", "minimum": 0, "maximum": 15 } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "visitorDevice" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "visitorBrowser" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "visitorOS" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "visitorBot" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "visitorLanguage" ] } } }, { "type": "object", "description": "The raw `User-Agent` header of the request. `visitorBot`, `visitorBrowser`, `visitorOS` and `visitorDevice` are parsed from it.", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "visitorUserAgent" ] } } }, { "type": "object", "description": "Pseudonymous identifier of the visitor, stable across a browser's visits. Events served by the server (`displayContext` of `server` or `mcp`: markdown pages, llms.txt, RSS, MCP) get a new one per request, so it only tells visitors apart on `site` and `embed`.", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "visitorId" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventLinkTargetValue" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventLinkTargetKind" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventLinkTargetDomain" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventLinkPosition" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventAPIOperationPath" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventAPIOperationMethod" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventLLMSVariant" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventPageNotFoundType" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventMarkdownSource" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventSearchQuery" ] } } }, { "type": "object", "description": "Search query in lowercase with leading and trailing whitespace removed and internal whitespace collapsed.", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventNormalizedSearchQuery" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventSearchResultRecordId" ] } } }, { "type": "object", "description": "Clicked search result position bucket. Null when rank was not recorded.", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventSearchResultPositionBucket" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventPageFeedbackRating" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventPageFeedbackComment" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventAskResponseRating" ] } } }, { "type": "object", "description": "How a page was rated, counted once per rating a reader submitted rather than once per\nevent: rating a page and then commenting on it records two events carrying the same\nrating, and a reader may rate a page again on a later visit.\n", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "pageFeedbackRating" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "askResponseRating" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "referrer" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "referrerDomain" ] } } }, { "type": "object", "description": "Path of the page of the site the visitor was on before the event, without the origin, share-link prefix, query string or fragment. Empty when the visitor came from another origin, or for events tracked before it was recorded.", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "previousUrl" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "utmSource" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "utmMedium" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "utmCampaign" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "utmTerm" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "utmContent" ] } } }, { "type": "object", "description": "Whether the visitor was authenticated when the event happened. Recorded at ingest from the site's visibility and the visitor's claims, so it is only exact for events tracked after that became available; older events fall back to the presence of any claim.", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "visitorAuthenticated" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "visitorClaimProperty" ] } } }, { "type": "object", "required": [ "column", "claim" ], "properties": { "column": { "type": "string", "enum": [ "visitorClaim" ] }, "claim": { "type": "string" } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventAdDomain" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventAdPlacement" ] } } }, { "type": "object", "required": [ "column" ], "properties": { "column": { "type": "string", "enum": [ "eventTrademarkPlacement" ] } } } ] }, "SiteInsightsEventType": { "type": "string", "enum": [ "page_view", "page_markdown_request", "search_open", "search_type_query", "search_open_result", "page_post_feedback", "page_post_feedback_comment", "agent_feedback", "ask_question", "ask_view", "ask_trigger_click", "ask_rate_response", "link_click", "api_client_open", "api_client_request", "ad_click", "ad_display", "trademark_click", "llms_request", "mcp_request", "rss_request" ] }, "SiteInsightsVisitorBrowser": { "type": "string", "enum": [ "chrome", "firefox", "safari", "edge", "ie", "opera", "unknown" ] }, "SiteInsightsVisitorDevice": { "type": "string", "enum": [ "desktop", "tablet", "mobile", "unknown" ] }, "SiteInsightsVisitorOS": { "type": "string", "enum": [ "windows", "macos", "linux", "android", "ios", "unknown" ] }, "SiteInsightsPageNotFoundType": { "description": "Why a site URL returned a 404. `conditional` means the URL targets content gated by an adaptive-content condition, so the visitor lacked access to a page that exists. Computed by GitBook when the event is ingested; 404s recorded before this existed, and those on genuinely missing pages, carry no value.", "type": "string", "enum": [ "conditional" ] }, "SiteInsightsQueryEventsValues": { "oneOf": [ { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "datetime" ] }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/Timestamp" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "dayOfWeek" ] }, "values": { "type": "array", "items": { "type": "integer", "minimum": 1, "maximum": 7 } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "hourOfDay" ] }, "values": { "type": "array", "items": { "type": "integer", "minimum": 0, "maximum": 23 } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "url" ] }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/URL" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "urlPath" ] }, "values": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventsCount" ] }, "values": { "type": "array", "items": { "type": "number" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "sessionsCount" ] }, "values": { "type": "array", "items": { "type": "number" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "visitorsCount" ] }, "values": { "type": "array", "items": { "type": "number" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventType" ] }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/SiteInsightsEventType" } } } }, { "type": "object", "required": [ "column", "claim", "values" ], "properties": { "column": { "type": "string", "enum": [ "visitorClaim" ] }, "claim": { "type": "string" }, "values": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "visitorAuthenticated" ] }, "values": { "type": "array", "items": { "type": [ "boolean", "null" ] } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "visitorClaimProperty" ] }, "values": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "visitorBrowser" ] }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/SiteInsightsVisitorBrowser" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "visitorDevice" ] }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/SiteInsightsVisitorDevice" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "visitorOS" ] }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/SiteInsightsVisitorOS" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "visitorBot" ] }, "values": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/SiteInsightsVisitorBot" }, { "type": "string", "enum": [ "" ] } ] } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventLinkTargetValue" ] }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/ContentRef" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventLinkTargetKind" ] }, "values": { "type": "array", "items": { "type": "string", "enum": [ "url", "page", "file", "anchor", "space", "collection", "user", "reusable-content" ] } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventLinkPosition" ] }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/SiteInsightsLinkPosition" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "siteSection" ] }, "values": { "type": "array", "items": { "type": [ "string", "null" ] } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventLLMSVariant" ] }, "values": { "type": "array", "items": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SiteInsightsLLMSVariant" } ] } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventPageNotFoundType" ] }, "values": { "type": "array", "items": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SiteInsightsPageNotFoundType" } ] } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventMarkdownSource" ] }, "values": { "type": "array", "items": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SiteInsightsMarkdownSource" } ] } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "siteSpace" ] }, "values": { "type": "array", "items": { "type": [ "string", "null" ] } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "siteShareKey" ] }, "values": { "type": "array", "items": { "type": [ "string", "null" ] } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "displayContext" ] }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/SiteInsightsDisplayContext" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "page" ] }, "values": { "description": "Pages to match. `null` matches events that resolved to no page, which for `page_view` events is a 404 (a broken URL).", "type": "array", "items": { "oneOf": [ { "type": "null" }, { "type": "object", "required": [ "page", "space" ], "properties": { "page": { "type": [ "string", "null" ] }, "space": { "type": "string" } } } ] } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "visitorGeoCountry" ] }, "values": { "type": "array", "items": { "type": [ "string", "null" ] } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "visitorGeoPoint" ] }, "values": { "type": "array", "items": { "type": [ "object", "null" ], "required": [ "latitude", "longitude", "h3" ], "properties": { "latitude": { "type": "number" }, "longitude": { "type": "number" }, "h3": { "type": "string" } } } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "visitorLanguage" ] }, "values": { "type": "array", "items": { "type": [ "string", "null" ] } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "visitorUserAgent" ] }, "values": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "visitorId" ] }, "values": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventLinkTargetDomain" ] }, "values": { "type": "array", "items": { "type": [ "string", "null" ] } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventAPIOperationPath" ] }, "values": { "type": "array", "items": { "type": [ "string", "null" ] } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventAPIOperationMethod" ] }, "values": { "type": "array", "items": { "type": [ "string", "null" ] } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventSearchQuery" ] }, "values": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "description": "Search query in lowercase with leading and trailing whitespace removed and internal whitespace collapsed.", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventNormalizedSearchQuery" ] }, "values": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventSearchResultRecordId" ] }, "values": { "type": "array", "items": { "type": [ "string", "null" ] } } } }, { "type": "object", "description": "Clicked search result position bucket. Null when rank was not recorded.", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventSearchResultPositionBucket" ] }, "values": { "type": "array", "items": { "oneOf": [ { "type": "null" }, { "type": "string", "enum": [ "first", "secondToFourth", "fifthOrLater" ] } ] } } } }, { "type": "object", "description": "Ratings submitted on a page, counted once per rating a reader submitted rather than once\nper event.\n", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "pageFeedbackRating" ] }, "values": { "type": "array", "items": { "type": "object", "required": [ "ok", "good", "bad" ], "properties": { "ok": { "type": "number" }, "good": { "type": "number" }, "bad": { "type": "number" } } } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "askResponseRating" ] }, "values": { "type": "array", "items": { "type": "object", "required": [ "positive", "negative" ], "properties": { "positive": { "type": "number" }, "negative": { "type": "number" } } } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventPageFeedbackRating" ] }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/PageFeedbackRating" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventAskResponseRating" ] }, "values": { "type": "array", "items": { "type": "integer" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventPageFeedbackComment" ] }, "values": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "referrer" ] }, "values": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "referrerDomain" ] }, "values": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "previousUrl" ] }, "values": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "utmSource" ] }, "values": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "utmMedium" ] }, "values": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "utmCampaign" ] }, "values": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "utmTerm" ] }, "values": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "utmContent" ] }, "values": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventAdDomain" ] }, "values": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventAdPlacement" ] }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/SiteInsightsAdPlacement" } } } }, { "type": "object", "required": [ "column", "values" ], "properties": { "column": { "type": "string", "enum": [ "eventTrademarkPlacement" ] }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/SiteInsightsTrademarkPlacement" } } } } ] }, "SiteInsightsQueryOperator": { "type": "string", "enum": [ "in", "notIn", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual" ] }, "SiteInsightsQueryEventsFilter": { "allOf": [ { "$ref": "#/components/schemas/SiteInsightsQueryEventsValues" }, { "type": "object", "properties": { "operator": { "$ref": "#/components/schemas/SiteInsightsQueryOperator" } } } ] }, "SiteInsightsQueryRangePreset": { "type": "string", "enum": [ "yearToDate", "lastYear", "last3Months", "last30Days", "last7Days", "last24Hours" ] }, "SiteInsightsQueryRangeCustom": { "type": "object", "properties": { "from": { "$ref": "#/components/schemas/Timestamp" }, "to": { "$ref": "#/components/schemas/Timestamp" } }, "required": [ "from", "to" ] }, "SiteInsightsQueryRange": { "oneOf": [ { "$ref": "#/components/schemas/SiteInsightsQueryRangePreset" }, { "$ref": "#/components/schemas/SiteInsightsQueryRangeCustom" } ] }, "SiteInsightsQueryEventsAggregation": { "type": "object", "required": [ "range" ], "properties": { "select": { "type": "array", "items": { "$ref": "#/components/schemas/SiteInsightsQueryEventsColumn" } }, "where": { "type": "array", "items": { "$ref": "#/components/schemas/SiteInsightsQueryEventsFilter" } }, "groupBy": { "type": "array", "items": { "$ref": "#/components/schemas/SiteInsightsQueryEventsColumn" } }, "order": { "type": "object", "required": [ "by", "direction" ], "properties": { "by": { "$ref": "#/components/schemas/SiteInsightsQueryEventsColumn" }, "direction": { "type": "string", "enum": [ "asc", "desc" ] } } }, "range": { "$ref": "#/components/schemas/SiteInsightsQueryRange" }, "limit": { "type": "integer", "default": 1000, "minimum": 1, "maximum": 1000 }, "includeSearchRankTrackingStart": { "type": "boolean", "description": "Return the site's earliest recorded ranked browser search open by a human. The date is independent of the query's range and filters." }, "includeLowSearchResultPages": { "type": "boolean", "description": "Count only search opens at position 5 or later, and return page details for each query. Group by eventNormalizedSearchQuery alone. The page size is capped at 50." }, "page": { "type": "string", "description": "The `next.page` value of a previous result, to fetch the rows that follow it. Send the rest of the query unchanged. Relative ranges stay fixed to the time of the first page, but events recorded while paging can still move rows between pages." } } }, "SiteInsightsLowSearchResultPage": { "type": "object", "required": [ "query", "page", "medianPosition", "otherPagesCount" ], "properties": { "query": { "type": "string", "description": "Normalized search query." }, "page": { "type": "object", "description": "The page with the most opens at position 5 or later for this query.", "required": [ "space", "page" ], "properties": { "space": { "type": "string", "description": "ID of the space that contains the opened page." }, "page": { "type": "string", "description": "ID of the opened page." } } }, "medianPosition": { "type": "number", "description": "Median position across opens of this page at position 5 or later." }, "otherPagesCount": { "type": "integer", "minimum": 0, "description": "Number of other distinct pages opened at position 5 or later for this query." } } }, "SiteInsightsQueryEventsAggregationResult": { "allOf": [ { "$ref": "#/components/schemas/List" }, { "type": "object", "required": [ "columns" ], "properties": { "searchRankTrackingStart": { "type": [ "string", "null" ], "format": "date-time", "description": "Returned when requested. Null if the site has no recorded ranked search opens." }, "lowSearchResultPages": { "type": "array", "description": "Returned when requested. Queries with no page opens are omitted.", "items": { "$ref": "#/components/schemas/SiteInsightsLowSearchResultPage" } }, "columns": { "type": "array", "items": { "$ref": "#/components/schemas/SiteInsightsQueryEventsValues" } } } } ] }, "SiteInsightsVisitorSegment": { "type": "object", "description": "A segment of visitors with the same characteristics.", "properties": { "title": { "type": "string", "description": "The title of the visitor profile." }, "claims": { "$ref": "#/components/schemas/PlainObject" }, "events": { "type": "number", "description": "The number of events for this visitor profile." }, "visitors": { "type": "number", "description": "The number of visitors for this visitor profile." }, "sessions": { "type": "number", "description": "The number of sessions for this visitor profile." } }, "required": [ "title", "claims", "events", "visitors", "sessions" ] }, "SiteAdsStats": { "type": "object", "required": [ "impressions", "clicks", "revenue" ], "properties": { "impressions": { "type": "number" }, "clicks": { "type": "number" }, "revenue": { "type": "string" } } }, "SiteRedirectOrderBy": { "type": "string", "enum": [ "createdAt", "updatedAt", "source" ], "default": "createdAt", "description": "The field to sort site redirects by. `createdAt` returns the most recently created redirects first. `updatedAt` returns the most recently updated redirects first (falling back to the creation date for redirects never updated). `source` returns redirects sorted alphabetically by source path. Defaults to 'createdAt'." }, "SiteRedirectDestinationSiteSection": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "site-section" ] }, "siteSectionId": { "type": "string", "description": "Unique identifier for the site section to redirect to" } }, "required": [ "kind", "siteSectionId" ] }, "SiteRedirectDestinationSiteSpace": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "site-space" ] }, "siteSpaceId": { "type": "string", "description": "Unique identifier for the site space to redirect to" } }, "required": [ "kind", "siteSpaceId" ] }, "SiteRedirectDestinationPage": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "site-page" ] }, "siteSpaceId": { "type": "string", "description": "Unique identifier for the site space of the page" }, "pageId": { "type": "string", "description": "Unique identifier for the page within the site space to redirect to" } }, "required": [ "kind", "siteSpaceId", "pageId" ] }, "SiteRedirectDestinationExternal": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "external" ] }, "url": { "$ref": "#/components/schemas/URL" } }, "required": [ "kind", "url" ] }, "SiteRedirectDestination": { "oneOf": [ { "$ref": "#/components/schemas/SiteRedirectDestinationSiteSection" }, { "$ref": "#/components/schemas/SiteRedirectDestinationSiteSpace" }, { "$ref": "#/components/schemas/SiteRedirectDestinationPage" }, { "$ref": "#/components/schemas/SiteRedirectDestinationExternal" } ] }, "SiteRedirect": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "site-redirect" ] }, "id": { "type": "string", "description": "The unique identifier for the redirect." }, "source": { "$ref": "#/components/schemas/SiteRedirectSourcePath" }, "draft": { "type": "boolean", "description": "Whether the redirect is draft and not live." }, "captureWildcard": { "type": "boolean", "description": "Capture and append the wildcard-matched suffix to the destination URL." }, "permanent": { "type": "boolean", "description": "Whether the redirect is configured as permanent. Permanent redirects are served as HTTP 308 for public live traffic and HTTP 307 in non-public contexts." }, "destination": { "$ref": "#/components/schemas/SiteRedirectDestination" }, "createdAt": { "type": "string", "format": "date-time", "description": "When the redirect was created." }, "updatedAt": { "type": "string", "format": "date-time", "description": "When the redirect was last updated. Absent if never updated since creation." } }, "required": [ "object", "id", "source", "draft", "captureWildcard", "permanent", "destination", "createdAt" ] }, "SiteRedirectInputDestination": { "oneOf": [ { "$ref": "#/components/schemas/SiteRedirectDestination" }, { "$ref": "#/components/schemas/SiteRedirectInputDestinationPath" } ] }, "SiteMcpServerName": { "type": "string", "description": "Name of the MCP server", "minLength": 1, "maxLength": 100 }, "SiteMcpServerTransport": { "type": "string", "description": "Transport protocol used to connect to the MCP server", "enum": [ "sse", "http" ], "default": "sse" }, "SiteMcpServerHeaders": { "type": "object", "additionalProperties": { "type": "string", "minLength": 1, "maxLength": 512 }, "description": "HTTP headers sent with requests to this server" }, "SiteMcpServer": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "site-mcp-server" ] }, "id": { "type": "string", "description": "Unique identifier for the MCP server" }, "name": { "$ref": "#/components/schemas/SiteMcpServerName" }, "url": { "$ref": "#/components/schemas/URL" }, "transport": { "$ref": "#/components/schemas/SiteMcpServerTransport" }, "headers": { "$ref": "#/components/schemas/SiteMcpServerHeaders" }, "condition": { "description": "Conditional expression used to evaluate whether the MCP server should be available to the site's visitor.", "$ref": "#/components/schemas/Expression" }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "location": { "type": "string", "description": "URL of the MCP server in the API", "format": "uri" } }, "required": [ "location" ] } }, "required": [ "object", "id", "name", "url", "transport", "headers", "urls" ] }, "GenericChannelPattern": { "type": "string", "description": "A generic channel name or pattern. For example, \"general\" or \"support-*\".", "pattern": "^[a-zA-Z0-9_\\*-]+$" }, "GitHubRepositoryPattern": { "type": "string", "description": "A GitHub repository name or pattern in the format \"owner/repository\". For example, \"my-org/my-repo\" or \"my-org/*\" to allow all repositories under \"my-org\".", "pattern": "^[a-zA-Z0-9._*-]+\\/[a-zA-Z0-9._*-]+$" }, "SiteChannelSetup": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": [ "builtin:slack" ] }, "setupSettings": { "type": "object", "additionalProperties": false, "properties": { "allowedChannels": { "description": "List of allowed Slack channel names or patterns. If empty, all channels are allowed.", "type": "array", "items": { "$ref": "#/components/schemas/GenericChannelPattern" } } } } }, "required": [ "type", "setupSettings" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "builtin:linear" ] }, "setupSettings": { "type": "object", "additionalProperties": false, "properties": { "allowedTeams": { "description": "List of allowed Linear team keys or patterns. If empty, all teams are allowed.", "type": "array", "items": { "$ref": "#/components/schemas/GenericChannelPattern" } } } } }, "required": [ "type", "setupSettings" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "builtin:github" ] }, "setupSettings": { "type": "object", "additionalProperties": false, "properties": { "allowedRepositories": { "description": "List of allowed GitHub repository names or patterns. If empty, all repositories are allowed.", "type": "array", "items": { "$ref": "#/components/schemas/GitHubRepositoryPattern" } } } } }, "required": [ "type", "setupSettings" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "builtin:discord" ] }, "setupSettings": { "type": "object", "additionalProperties": false, "properties": { "allowedChannels": { "description": "List of allowed Discord channel names or patterns. If empty, all channels are allowed.", "type": "array", "items": { "$ref": "#/components/schemas/GenericChannelPattern" } } } } }, "required": [ "type", "setupSettings" ] } ] }, "SiteChannelStatus": { "type": "string", "enum": [ "active", "pending" ] }, "SiteChannelRole": { "type": "string", "enum": [ "collaborator", "support" ] }, "SiteChannel": { "allOf": [ { "$ref": "#/components/schemas/SiteChannelSetup" }, { "type": "object", "properties": { "object": { "type": "string", "enum": [ "site-channel" ] }, "id": { "type": "string", "description": "Unique identifier for the site channel." }, "status": { "$ref": "#/components/schemas/SiteChannelStatus" }, "role": { "$ref": "#/components/schemas/SiteChannelRole" }, "answers": { "type": "integer", "minimum": 0, "description": "Number of answers linked to this channel." }, "createdAt": { "$ref": "#/components/schemas/Timestamp" }, "urls": { "type": "object", "properties": { "location": { "type": "string", "format": "uri", "description": "URL of the site channel in the API." } }, "required": [ "location" ] } }, "required": [ "object", "id", "status", "role", "answers", "createdAt", "urls" ] } ] }, "Subdomain": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "subdomain" ] }, "subdomain": { "type": "string", "description": "The GitBook subdomain, for example \"my-company\" in \"my-company.gitbook.io\"", "pattern": "^[a-z0-9][a-z0-9-]{1,30}[a-z0-9]$", "minLength": 3, "maxLength": 32 }, "target": { "oneOf": [ { "$ref": "#/components/schemas/OrganizationPointer" } ] }, "isActive": { "type": "boolean" } }, "required": [ "object", "subdomain", "target", "isActive" ] }, "CustomHostnameDnsStatus": { "type": "string", "enum": [ "dns_passed", "dns_wrong_cname", "dns_no_cname", "dns_cloudflare_proxied", "dns_wrong_caa" ] }, "CustomHostnameSslStatus": { "type": "string", "enum": [ "live", "ssl_unknown", "ssl_pending", "ssl_failed", "ssl_retry_expired" ] }, "CustomHostnameErrorStatus": { "type": "string", "enum": [ "invalid_domain", "internal_error" ] }, "CustomHostnameStatus": { "type": "string", "oneOf": [ { "$ref": "#/components/schemas/CustomHostnameDnsStatus" }, { "$ref": "#/components/schemas/CustomHostnameSslStatus" }, { "$ref": "#/components/schemas/CustomHostnameErrorStatus" } ] }, "CustomHostname": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "custom-hostname" ] }, "hostname": { "$ref": "#/components/schemas/SiteHostname" }, "target": { "oneOf": [ { "$ref": "#/components/schemas/OrganizationPointer" }, { "$ref": "#/components/schemas/SitePointer" } ] }, "isActive": { "type": "boolean" }, "status": { "$ref": "#/components/schemas/CustomHostnameStatus" }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "location": { "type": "string", "description": "URL of the custom hostname in the API", "format": "uri" } }, "required": [ "location" ] } }, "required": [ "object", "hostname", "target", "isActive", "urls" ] }, "PasskeyAuthenticationResponse": { "type": "object", "description": "The browser's answer to the passkey sign-in options (AuthenticationResponseJSON).", "properties": { "id": { "type": "string" }, "rawId": { "type": "string" }, "type": { "type": "string", "enum": [ "public-key" ] }, "response": { "type": "object", "properties": { "clientDataJSON": { "type": "string" }, "authenticatorData": { "type": "string" }, "signature": { "type": "string" }, "userHandle": { "type": "string" } }, "required": [ "clientDataJSON", "authenticatorData", "signature" ] }, "clientExtensionResults": { "type": "object", "additionalProperties": true }, "authenticatorAttachment": { "type": "string", "enum": [ "platform", "cross-platform" ] } }, "required": [ "id", "rawId", "type", "response", "clientExtensionResults" ] }, "UnsplashImage": { "type": "object", "required": [ "kind", "id", "description", "downloadLocation", "urls", "author" ], "properties": { "kind": { "type": "string", "enum": [ "unsplash_image" ] }, "id": { "type": "string" }, "description": { "type": "string" }, "downloadLocation": { "type": "string" }, "urls": { "type": "object", "properties": { "full": { "type": "string" }, "small": { "type": "string" } }, "required": [ "full", "small" ] }, "author": { "type": "object", "properties": { "name": { "type": "string" }, "url": { "type": "string" } }, "required": [ "name", "url" ] } } }, "HiveAccessToken": { "type": "object", "description": "JWT tokens to authenticate in Hive for all content.", "properties": { "contents": { "type": "object", "additionalProperties": { "description": "The Hive JWT access token.", "type": "string" } } }, "required": [ "contents" ] }, "APIIntercomMessengerToken": { "type": "object", "properties": { "token": { "type": "string", "description": "Short-lived JWT used to authenticate the user with Intercom Messenger" }, "expiresAt": { "type": "integer", "description": "Unix timestamp in seconds when the token expires" } }, "required": [ "token", "expiresAt" ] }, "SignedURL": { "type": "object", "properties": { "object": { "type": "string", "description": "The kind of signed URL", "enum": [ "signed-url" ] }, "url": { "$ref": "#/components/schemas/URL", "description": "Signed URL that can be opened by the browser" }, "expiresAt": { "$ref": "#/components/schemas/Timestamp", "description": "Expiration time of the signed URL" } }, "required": [ "object", "url", "expiresAt" ] }, "APIProfilingSession": { "type": "object", "required": [ "object", "id", "status", "releaseVersion", "releaseBuild", "createdAt", "expiresAt", "startedBy", "urls" ], "properties": { "object": { "type": "string", "enum": [ "api_cpu_profiling_session" ] }, "id": { "type": "string", "format": "uuid" }, "status": { "type": "string", "enum": [ "active", "stopped", "expired" ] }, "mode": { "type": "string", "enum": [ "cpu", "allocations", "heap-snapshot" ], "description": "The profiler selected for this session. Earlier sessions without this field use CPU profiling." }, "releaseVersion": { "type": "string" }, "releaseBuild": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "expiresAt": { "type": "string", "format": "date-time" }, "stoppedAt": { "type": "string", "format": "date-time" }, "startedBy": { "type": "string" }, "urls": { "type": "object", "required": [ "location" ], "properties": { "location": { "type": "string" } } } } }, "APICPUProfile": { "type": "object", "required": [ "object", "id", "instanceId", "startedAt", "endedAt", "bytes", "urls" ], "properties": { "object": { "type": "string", "enum": [ "api_cpu_profile", "api_allocation_profile" ] }, "mode": { "type": "string", "enum": [ "cpu", "allocations" ] }, "id": { "type": "string", "format": "uuid" }, "instanceId": { "type": "string" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "bytes": { "type": "integer" }, "urls": { "type": "object", "required": [ "location" ], "properties": { "location": { "type": "string" }, "devtools": { "type": "string", "description": "Download the raw .cpuprofile or .heapprofile for Chrome DevTools." } } } } }, "PurgeCDNCacheContext": { "type": "object", "description": "The context to send when purging the CDN Cache", "properties": { "tags": { "type": "array", "description": "The list of tags to purge", "items": { "type": "string" } } }, "required": [ "tags" ] }, "CloudflareHostnameStatus": { "type": "string", "description": "The Cloudflare Hostname status", "enum": [ "pending", "active", "blocked", "moved", "deleted" ] }, "CloudflareHostnameTLSStatus": { "type": "string", "description": "The Cloudflare Hostname TLS status", "enum": [ "initializing", "pending_validation", "pending_issuance", "pending_deployment", "active", "pending_deletion", "pending_cleanup", "deleted" ] }, "CloudflareHostnameTLSValidationMethod": { "type": "string", "description": "The Cloudflare Hostname TLS validation method", "enum": [ "http", "txt", "email" ] }, "CloudflareHostnameTLSCertificate": { "type": "object", "description": "The Cloudflare Hostname TLS certificate", "properties": { "issuer": { "type": "string" }, "expiresOn": { "type": "string" }, "issuedOn": { "type": "string" } } }, "CloudflareHostnameTLSValidationError": { "type": "object", "description": "The Cloudflare Hostname TLS validation error", "properties": { "message": { "type": "string" } }, "required": [ "message" ] }, "CloudflareHostnameTLSInfo": { "type": "object", "description": "The Cloudflare Hostname TLS information", "properties": { "status": { "$ref": "#/components/schemas/CloudflareHostnameTLSStatus" }, "method": { "$ref": "#/components/schemas/CloudflareHostnameTLSValidationMethod" }, "certificateAuthority": { "type": "string" }, "certificates": { "type": "array", "items": { "$ref": "#/components/schemas/CloudflareHostnameTLSCertificate" } }, "validationErrors": { "type": "array", "items": { "$ref": "#/components/schemas/CloudflareHostnameTLSValidationError" } } }, "required": [ "status", "method", "certificates", "validationErrors" ] }, "CustomDomainInfo": { "type": "object", "description": "Cloudflare Custom Domain's information", "properties": { "hostname": { "type": "string" }, "status": { "$ref": "#/components/schemas/CloudflareHostnameStatus" }, "createdAt": { "type": "string" }, "ssl": { "$ref": "#/components/schemas/CloudflareHostnameTLSInfo" }, "verificationErrors": { "type": "array", "items": { "type": "string" } } }, "required": [ "hostname", "status", "createdAt", "verificationErrors" ] }, "FirebaseUserInfo": { "type": "object", "description": "The User Firebase Auth Info.", "properties": { "uid": { "type": "string" }, "displayName": { "type": "string" }, "email": { "type": "string" }, "phoneNumber": { "type": "string" }, "photoUrl": { "type": "string" }, "providerId": { "type": "string" } }, "required": [ "uid" ] }, "UserBackOfficeInfo": { "type": "object", "description": "The GitBook User info shown in the BackOffice.", "properties": { "id": { "type": "string" }, "authProviders": { "type": "array", "items": { "$ref": "#/components/schemas/FirebaseUserInfo" } }, "createdAt": { "type": "string" }, "lastSignInAt": { "type": "string" }, "disabled": { "type": "boolean" } }, "required": [ "id", "authProviders", "createdAt", "lastSignInAt", "disabled" ] }, "BlockContext": { "type": "object", "description": "The context to send when blocking/unblocking", "properties": { "block": { "type": "boolean" }, "reason": { "$ref": "#/components/schemas/BlockReason" } }, "required": [ "block" ] }, "UserImpersonationInfo": { "type": "object", "description": "The GitBook User impersonation info.", "properties": { "authURL": { "type": "string" }, "impersonatorId": { "type": "string" } }, "required": [ "authURL", "impersonatorId" ] }, "UserImpersonation": { "type": "object", "description": "The info returned when impersonating a GitBook User.", "allOf": [ { "$ref": "#/components/schemas/UserBackOfficeInfo" }, { "type": "object", "properties": { "impersonation": { "$ref": "#/components/schemas/UserImpersonationInfo" } }, "required": [ "impersonation" ] } ] }, "UserOrganizationsTeamsPermissions": { "type": "object", "description": "The teams permissions of a user", "properties": { "role": { "$ref": "#/components/schemas/TeamMemberRole" } }, "required": [ "role" ] }, "UserOrganizationsPermissions": { "type": "object", "description": "The organizations permissions of a user", "properties": { "role": { "$ref": "#/components/schemas/MemberRoleOrGuest" }, "teams": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/UserOrganizationsTeamsPermissions" } }, "disabled": { "type": "boolean" } }, "required": [ "role", "teams" ] }, "UserCollectionsPermissions": { "type": "object", "description": "The collections permissions of a user", "properties": { "organization": { "type": "string" }, "level": { "$ref": "#/components/schemas/MemberRoleOrGuest" }, "collection": { "type": "string" } }, "required": [ "organization", "level" ] }, "UserSpacesPermissions": { "type": "object", "description": "The spaces permissions of a user", "properties": { "organization": { "type": "string" }, "level": { "$ref": "#/components/schemas/MemberRoleOrGuest" }, "collection": { "type": "string" } }, "required": [ "organization", "level" ] }, "_index": { "type": "object", "description": "All the permissions of a user", "properties": { "updatedAt": { "$ref": "#/components/schemas/Timestamp" }, "organizations": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/UserOrganizationsPermissions" } }, "collections": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/UserCollectionsPermissions" } }, "spaces": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/UserSpacesPermissions" } } }, "required": [ "updatedAt", "organizations", "collections", "spaces" ] }, "OrganizationBillingDateOverride": { "description": "Date-based billing override value, either indefinite or a timestamp.", "oneOf": [ { "type": "boolean", "enum": [ true ] }, { "$ref": "#/components/schemas/Timestamp" } ] }, "OrganizationBillingNumericOverride": { "type": "integer", "minimum": 0, "description": "Current numeric billing override, when set." }, "Percentage": { "type": "number", "minimum": 0, "maximum": 100, "description": "A percentage from 0 to 100." }, "OrganizationBillingOverrides": { "type": "object", "properties": { "overrides": { "type": "object", "properties": { "frozenInterval": { "description": "Current interval-change override, when set.", "$ref": "#/components/schemas/OrganizationBillingDateOverride" }, "enableSAML": { "description": "Current SAML override, when set.", "$ref": "#/components/schemas/OrganizationBillingDateOverride" }, "aiCreditAllowance": { "description": "Contractual AI credit allowance for Enterprise organizations only.", "$ref": "#/components/schemas/OrganizationBillingNumericOverride" }, "aiCreditRollover": { "description": "Percentage of remaining paid AI credits carried into the next billing period. Paid self-serve organizations default to 50% when unset.", "$ref": "#/components/schemas/Percentage" }, "aiCreditAlertThreshold": { "description": "Percentage of total AI credits remaining at which to send a low-balance alert.", "$ref": "#/components/schemas/Percentage" }, "aiCreditPauseEnabled": { "description": "Whether AI features pause automatically once all AI credits are used, before usage is billed as overage.", "type": "boolean" }, "hasAI": { "description": "False when the organization's contract requires AI to stay off, regardless of the admin setting.", "type": "boolean", "enum": [ false ] }, "minUsers": { "description": "Current minimum users override, when set.", "$ref": "#/components/schemas/OrganizationBillingNumericOverride" }, "maxUsers": { "description": "Current maximum users override, when set.", "$ref": "#/components/schemas/OrganizationBillingNumericOverride" }, "minPremiumSites": { "description": "Current minimum premium sites override, when set.", "$ref": "#/components/schemas/OrganizationBillingNumericOverride" }, "maxPremiumSites": { "description": "Current maximum premium sites override, when set.", "$ref": "#/components/schemas/OrganizationBillingNumericOverride" }, "minUltimateSites": { "description": "Current minimum ultimate sites override, when set.", "$ref": "#/components/schemas/OrganizationBillingNumericOverride" }, "maxUltimateSites": { "description": "Current maximum ultimate sites override, when set.", "$ref": "#/components/schemas/OrganizationBillingNumericOverride" } } } }, "required": [ "overrides" ] }, "PercentageThreshold": { "description": "A percentage threshold, or null when disabled.", "oneOf": [ { "$ref": "#/components/schemas/Percentage" }, { "type": "null" } ] }, "BackOfficeSite": { "allOf": [ { "$ref": "#/components/schemas/Site" }, { "type": "object", "properties": { "organization": { "type": "string", "description": "ID of the organization owning this site" } }, "required": [ "organization" ] } ] }, "PublishedContentRedirect": { "oneOf": [ { "type": "object", "title": "Redirect to the application or a different content in the site", "properties": { "target": { "type": "string", "description": "Type of target for the redirect", "enum": [ "application", "content" ] }, "redirect": { "$ref": "#/components/schemas/URL" } }, "required": [ "target", "redirect" ] }, { "type": "object", "title": "Redirect to an external resource from the site", "properties": { "target": { "type": "string", "description": "Type of target for the redirect", "enum": [ "external" ] }, "site": { "type": "string", "description": "ID of the resolved site." }, "redirect": { "$ref": "#/components/schemas/URL" } }, "required": [ "target", "site", "redirect" ] } ], "discriminator": { "propertyName": "target" } }, "PublishedSiteContentLive": { "type": "object", "title": "Live content", "description": "Site content at the live revision of its spaces.", "properties": {} }, "PublishedSiteContentAtRevision": { "type": "object", "title": "Content at a revision", "description": "Site content previewed at a revision of its space.", "properties": { "revision": { "type": "string", "description": "Identifier of the revision being previewed in this URL." } }, "required": [ "revision" ] }, "PublishedSiteContentInChangeRequest": { "type": "object", "title": "Content in a change request", "description": "Site content previewed in a change request of its space.", "properties": { "changeRequest": { "type": "string", "description": "Identifier of the change request being previewed in this URL." } }, "required": [ "changeRequest" ] }, "PublishedSiteContentAtSiteRevision": { "type": "object", "title": "Content at a site revision", "description": "Site content previewed at a site revision: each space is read at the revision the site revision pins, and live when it pins none.", "properties": { "siteRevision": { "type": "string", "description": "Identifier of the site revision being previewed in this URL." } }, "required": [ "siteRevision" ] }, "PublishedSiteContent": { "type": "object", "title": "Site Content", "description": "Content a site URL resolves to: live, or previewed at a space revision, a change request or a site revision named in the URL. At most one of `revision`, `changeRequest` and `siteRevision` is returned.", "allOf": [ { "type": "object", "properties": { "site": { "type": "string", "description": "ID of the site matching." }, "siteSection": { "type": "string", "description": "ID of the site-section matching." }, "siteSpace": { "type": "string", "description": "ID of the site-space matching." }, "space": { "type": "string", "description": "ID of the space matching." }, "pathname": { "type": "string", "description": "Path of the content relative to the input URL being resolved" }, "basePath": { "type": "string", "description": "Prefix of the path in the input URL being resolved" }, "siteBasePath": { "type": "string", "description": "Prefix of the site path in the input URL being resolved" }, "apiToken": { "type": "string", "description": "Short-lived API token to fetch content related to the space in the context of the URL." }, "organization": { "type": "string", "description": "ID of the organization." }, "shareKey": { "type": "string", "description": "Share link key of the site in case the site was published with share-links." }, "complete": { "type": "boolean", "description": "Whether the resolved site URL is complete and at it's terminal point, meaning no more site path segments can be further expected before any page path segments." }, "contextId": { "type": "string", "description": "Context returned only for a authenticated access session to track changes in the visitor session context that affect content rendering (used for cache invalidation)." }, "canonicalUrl": { "type": "string", "description": "The canonical URL of the resolution." }, "preview": { "type": "boolean", "description": "Whether the URL is a preview URL" } }, "required": [ "site", "siteSpace", "space", "pathname", "basePath", "siteBasePath", "apiToken", "organization", "complete", "canonicalUrl" ] }, { "oneOf": [ { "$ref": "#/components/schemas/PublishedSiteContentLive" }, { "$ref": "#/components/schemas/PublishedSiteContentAtRevision" }, { "$ref": "#/components/schemas/PublishedSiteContentInChangeRequest" }, { "$ref": "#/components/schemas/PublishedSiteContentAtSiteRevision" } ] } ] }, "PublishedSiteContentLookup": { "oneOf": [ { "$ref": "#/components/schemas/PublishedContentRedirect" }, { "$ref": "#/components/schemas/PublishedSiteContent" } ] }, "SiteVisitorPayload": { "type": "object", "description": "An object that describes the payload of site visitor info. It can include a jwt token with signed claims and/or a record of its unsigned claims.", "properties": { "type": { "type": "string", "enum": [ "human", "agent" ], "description": "Whether the visitor is a human or an AI agent. Defaults to human when omitted." }, "jwtToken": { "type": "string", "description": "JWT token generated for a authenticated access session." }, "country": { "type": "string", "description": "ISO 3166-1 alpha-2 code of the country the visitor is browsing from, as detected by the renderer." }, "unsignedClaims": { "$ref": "#/components/schemas/PlainObject" } } }, "SiteAdaptiveJSONSchema": { "type": "object", "description": "JSON schema describing the expected attributes of an Adaptive site schema.", "properties": { "$schema": { "type": "string", "enum": [ "http://json-schema.org/draft-07/schema#" ] }, "type": { "type": "string", "enum": [ "object" ] }, "properties": { "type": "object", "properties": { "unsigned": { "type": "object", "description": "Unsigned claims of the site visitor.", "properties": { "type": { "type": "string", "enum": [ "object" ] }, "description": { "type": "string", "enum": [ "Unsigned claims of the site visitor." ] }, "properties": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/SiteAdaptiveJSONSchemaClaimsProperties" } }, "additionalProperties": { "type": "boolean", "enum": [ false ] } }, "required": [ "type", "description", "properties", "additionalProperties" ] } }, "additionalProperties": { "$ref": "#/components/schemas/SiteAdaptiveJSONSchemaClaimsProperties" } }, "additionalProperties": { "type": "boolean", "enum": [ false ] } }, "required": [ "type", "properties", "additionalProperties" ], "additionalProperties": false }, "GitSyncGitHubRepository": { "type": "object", "description": "GitHub repository that can be selected for Git Sync.", "properties": { "id": { "type": "number" }, "accountName": { "type": "string" }, "repositoryName": { "type": "string" }, "fullName": { "type": "string" }, "defaultBranch": { "type": [ "string", "null" ] } }, "required": [ "id", "accountName", "repositoryName", "fullName", "defaultBranch" ] }, "GitSyncBranch": { "type": "object", "description": "Branch that can be used for Git Sync.", "properties": { "name": { "type": "string" }, "ref": { "type": "string" } }, "required": [ "name", "ref" ] }, "GitSyncRepositoryFile": { "type": "object", "description": "A file found in a Git Sync repository at a specific ref.", "properties": { "name": { "type": "string" }, "path": { "type": "string" }, "sha": { "type": "string" }, "size": { "type": "number" } }, "required": [ "name", "path", "sha", "size" ] }, "GitSyncGitLabProject": { "type": "object", "description": "GitLab project that can be selected for Git Sync.", "properties": { "id": { "type": "number" }, "accountName": { "type": "string" }, "repositoryName": { "type": "string" }, "fullName": { "type": "string" }, "defaultBranch": { "type": [ "string", "null" ] } }, "required": [ "id", "accountName", "repositoryName", "fullName", "defaultBranch" ] }, "SHA256": { "type": "string", "minLength": 64, "maxLength": 64 }, "SpaceTrackPageView": { "type": "object", "properties": { "pageId": { "type": "string", "description": "Unique identifier of the page." }, "visitor": { "type": "object", "description": "Analytics info on the GitBook's content visitor.", "properties": { "anonymousId": { "type": "string", "description": "GitBook's unique identifier of the visitor." }, "cookies": { "type": "object", "description": "The visitors cookies.", "additionalProperties": { "type": "string" } }, "ip": { "type": "string", "description": "IP address of the visitor.\nIf undefined, it'll default to the IP executing the request.\n" }, "userAgent": { "type": "string", "description": "User-agent of the visitor.\nhttps://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent\n" }, "language": { "type": "string", "description": "Language of the visitor.\nhttps://developer.mozilla.org/en-US/docs/Web/API/Navigator/language\n" } }, "required": [ "anonymousId", "cookies", "userAgent" ] }, "url": { "type": "string", "description": "The GitBook content's URL visited (including URL params)." }, "referrer": { "type": "string", "description": "The URL of referrer that linked to the page." } }, "required": [ "visitor", "url", "referrer" ] }, "SiteTrackPageView": { "allOf": [ { "type": "object", "properties": { "pageId": { "type": "string", "description": "Unique identifier of the page." }, "visitor": { "type": "object", "description": "Analytics info on the GitBook's content visitor.", "properties": { "anonymousId": { "type": "string", "description": "GitBook's unique identifier of the visitor." }, "cookies": { "type": "object", "description": "The visitors cookies.", "additionalProperties": { "type": "string" } }, "ip": { "type": "string", "description": "IP address of the visitor.\nIf undefined, it'll default to the IP executing the request.\n" }, "userAgent": { "type": "string", "description": "User-agent of the visitor.\nhttps://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent\n" }, "language": { "type": "string", "description": "Language of the visitor.\nhttps://developer.mozilla.org/en-US/docs/Web/API/Navigator/language\n" } }, "required": [ "anonymousId", "cookies", "userAgent" ] }, "url": { "type": "string", "description": "The GitBook content's URL visited (including URL params)." }, "referrer": { "type": "string", "description": "The URL of referrer that linked to the page." } }, "required": [ "visitor", "url", "referrer" ] }, { "oneOf": [ { "type": "object", "properties": { "spaceId": { "type": "string", "description": "Unique identifier of the space." } }, "required": [ "spaceId" ] }, { "type": "object", "properties": { "siteSpaceId": { "description": "The site-space that was viewed", "type": "string" } }, "required": [ "siteSpaceId" ] } ] } ] }, "UpdateContentPublishingAuth": { "type": "object", "properties": { "fallbackURL": { "type": "string", "format": "uri", "description": "A fallback URL that will be used if authentication fails." } } }, "GitBookUsers": { "type": "string", "description": "Predefined GitBook user identifiers", "enum": [ "gitbook:agent", "gitbook:gitsync" ] }, "ContentLocationRevisionContext": { "type": "object", "required": [ "type", "revision" ], "properties": { "type": { "type": "string", "enum": [ "revision" ] }, "revision": { "$ref": "#/components/schemas/Revision" } } }, "ContentLocationChangeRequestContext": { "type": "object", "required": [ "type", "changeRequest" ], "properties": { "type": { "type": "string", "enum": [ "changeRequest" ] }, "changeRequest": { "$ref": "#/components/schemas/ChangeRequest" } } }, "ContentLocationFile": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "file" ] }, "organization": { "$ref": "#/components/schemas/Organization" }, "space": { "$ref": "#/components/schemas/Space" }, "versionContext": { "oneOf": [ { "$ref": "#/components/schemas/ContentLocationRevisionContext" }, { "$ref": "#/components/schemas/ContentLocationChangeRequestContext" } ] }, "file": { "$ref": "#/components/schemas/RevisionFile" } }, "required": [ "kind", "organization", "space", "file" ] }, "ContentLocationURL": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "url" ] }, "url": { "type": "string" } }, "required": [ "kind", "url" ] }, "ContentLocationPageAnchor": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "anchor" ] }, "anchor": { "description": "The anchor within the page.", "type": "string" } }, "required": [ "type", "anchor" ] }, "ContentLocationPageNode": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "node" ] }, "node": { "description": "The node id within the page.", "type": "string" } }, "required": [ "type", "node" ] }, "ContentLocationPage": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "page" ] }, "organization": { "$ref": "#/components/schemas/Organization" }, "page": { "$ref": "#/components/schemas/RevisionPage" }, "space": { "$ref": "#/components/schemas/Space" }, "versionContext": { "oneOf": [ { "$ref": "#/components/schemas/ContentLocationRevisionContext" }, { "$ref": "#/components/schemas/ContentLocationChangeRequestContext" } ] }, "internalLocation": { "oneOf": [ { "$ref": "#/components/schemas/ContentLocationPageAnchor" }, { "$ref": "#/components/schemas/ContentLocationPageNode" } ] } }, "required": [ "kind", "organization", "space", "page" ] }, "ContentLocationUser": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "user" ] }, "user": { "$ref": "#/components/schemas/User" } }, "required": [ "kind", "user" ] }, "ContentLocationCollection": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "collection" ] }, "organization": { "$ref": "#/components/schemas/Organization" }, "collection": { "$ref": "#/components/schemas/Collection" } }, "required": [ "kind", "organization", "collection" ] }, "ContentLocationSpace": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "space" ] }, "organization": { "$ref": "#/components/schemas/Organization" }, "space": { "$ref": "#/components/schemas/Space" } }, "required": [ "kind", "organization", "space" ] }, "ContentLocationReusableContent": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "reusable-content" ] }, "organization": { "$ref": "#/components/schemas/Organization" }, "space": { "$ref": "#/components/schemas/Space" }, "versionContext": { "oneOf": [ { "$ref": "#/components/schemas/ContentLocationRevisionContext" }, { "$ref": "#/components/schemas/ContentLocationChangeRequestContext" } ] }, "reusableContent": { "$ref": "#/components/schemas/RevisionReusableContent" } }, "required": [ "kind", "organization", "space", "reusableContent" ] }, "ContentLocationOpenAPI": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "openapi" ] }, "organization": { "$ref": "#/components/schemas/Organization" }, "openAPISpec": { "$ref": "#/components/schemas/OpenAPISpec" } }, "required": [ "kind", "organization", "openAPISpec" ] }, "ContentLocation": { "description": "An absolute reference to content in GitBook.", "oneOf": [ { "$ref": "#/components/schemas/ContentLocationFile" }, { "$ref": "#/components/schemas/ContentLocationURL" }, { "$ref": "#/components/schemas/ContentLocationPage" }, { "$ref": "#/components/schemas/ContentLocationUser" }, { "$ref": "#/components/schemas/ContentLocationCollection" }, { "$ref": "#/components/schemas/ContentLocationSpace" }, { "$ref": "#/components/schemas/ContentLocationReusableContent" }, { "$ref": "#/components/schemas/ContentLocationOpenAPI" } ], "discriminator": { "propertyName": "kind" } }, "SpaceTemplate": { "type": "object", "properties": { "id": { "type": "string" }, "contentId": { "type": "string" }, "title": { "type": "string", "description": "A title of the template." }, "subtitle": { "type": "string", "description": "A subtitle for the template." }, "emoji": { "description": "An emoji representing the template.", "$ref": "#/components/schemas/Emoji" }, "openAPISpec": { "description": "An optional OpenAPI spec to create along with the template.", "properties": { "slug": { "$ref": "#/components/schemas/OpenAPISpecSlug" }, "sourceURL": { "$ref": "#/components/schemas/URL" } }, "required": [ "slug", "sourceURL" ] }, "features": { "type": "array", "description": "A list of features that the template supports.", "items": { "type": "string", "description": "A feature supported by the template." } }, "previewImage": { "type": "object", "properties": { "light": { "$ref": "#/components/schemas/URL" }, "dark": { "$ref": "#/components/schemas/URL" } }, "required": [ "light", "dark" ] }, "urls": { "type": "object", "description": "URLs associated with the object", "properties": { "preview": { "$ref": "#/components/schemas/URL" } }, "required": [ "preview" ] } }, "required": [ "id", "contentId", "title", "subtitle", "emoji", "features", "previewImage", "urls" ] }, "ComputedContentSource": { "oneOf": [ { "$ref": "#/components/schemas/ComputedContentSourceDocument" }, { "$ref": "#/components/schemas/ComputedContentSourceRevision" } ] }, "InputPageBase": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[a-zA-Z0-9]{1,40}$", "description": "Optional unique identifier for the page.\nIt can be used to reference pages in document links.\n" }, "title": { "type": "string", "minLength": 1 }, "linkTitle": { "description": "Optional custom title for the page ToC and mention entries instead of the page title.", "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "title" ] }, { "oneOf": [ { "type": "object", "properties": { "emoji": { "description": "Emoji of the page.", "$ref": "#/components/schemas/Emoji" } }, "required": [ "emoji" ] }, { "type": "object", "properties": { "icon": { "description": "Icon of the page.", "$ref": "#/components/schemas/Icon" } } } ] } ] }, "InputPageDocument": { "allOf": [ { "$ref": "#/components/schemas/InputPageBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "document" ] }, "description": { "type": "string", "maxLength": 300, "minLength": 0 }, "tagTitle": { "description": "Optional custom title overriding only the page-title segment of the composed `<title>` tag (`<tagTitle || title> | <section> | <site>`).", "type": "string", "maxLength": 100, "minLength": 0 }, "slug": { "description": "Page's slug in its direct parent", "type": "string" }, "pages": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/InputPageDocument" }, { "$ref": "#/components/schemas/InputPageLink" }, { "$ref": "#/components/schemas/InputPageComputed" } ] } }, "computed": { "$ref": "#/components/schemas/ComputedContentSourceDocument" } }, "required": [ "type" ] } ] }, "InputPageLink": { "allOf": [ { "$ref": "#/components/schemas/InputPageBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "link" ] }, "target": { "$ref": "#/components/schemas/ContentRef" } }, "required": [ "type", "target" ] } ] }, "InputPageComputed": { "allOf": [ { "$ref": "#/components/schemas/InputPageBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "computed" ] }, "computed": { "$ref": "#/components/schemas/ComputedContentSourceRevision" } }, "required": [ "type", "computed" ] } ] }, "InputPageGroup": { "allOf": [ { "$ref": "#/components/schemas/InputPageBase" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "group" ] }, "slug": { "description": "Page's slug in its direct parent", "type": "string" }, "pages": { "type": "array", "minLength": 1, "items": { "oneOf": [ { "$ref": "#/components/schemas/InputPageDocument" }, { "$ref": "#/components/schemas/InputPageLink" }, { "$ref": "#/components/schemas/InputPageComputed" } ] } } }, "required": [ "type", "pages" ] } ] }, "InputPage": { "oneOf": [ { "$ref": "#/components/schemas/InputPageDocument" }, { "$ref": "#/components/schemas/InputPageLink" }, { "$ref": "#/components/schemas/InputPageComputed" }, { "$ref": "#/components/schemas/InputPageGroup" } ] }, "InputFile": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "contentType": { "type": "string" }, "downloadURL": { "type": "string" }, "size": { "type": "number" }, "dimensions": { "type": "object", "description": "For images, it contains the dimensions of it.", "properties": { "width": { "type": "number" }, "height": { "type": "number" } }, "required": [ "width", "height" ] } }, "required": [ "name", "contentType", "downloadURL", "size" ] }, "RevisionSemanticChangeType": { "type": "string", "description": "The type of semantic change.", "enum": [ "page_created", "page_edited", "page_deleted", "page_moved", "file_created", "file_edited", "file_deleted", "custom_fields_edited", "tag_created", "tag_deleted", "tag_edited" ] }, "GitSyncOperationStage": { "type": "string", "description": "Core stages of a Git Sync process. This is not exhaustive, but should cover\nthe important ones.\n- repo_fetch: Includes fetching the latest repository contents from remote provider.\n- config_check: Includes checking if the YAML config is valid, etc.\n- content_process: Includes processing of pages & files to be imported/exported.\n- finalize: Includes finalizing the sync process like creating the commit on git, or\ncreating a new revision.\n", "enum": [ "repo_fetch", "config_check", "content_process", "finalize" ] }, "GitSyncSpaceOperation": { "type": "object", "properties": { "state": { "$ref": "#/components/schemas/GitSyncOperationState" }, "direction": { "$ref": "#/components/schemas/GitSyncOperationDirection" }, "stage": { "$ref": "#/components/schemas/GitSyncOperationStage" }, "dispatchedTasks": { "type": "number", "deprecated": true, "description": "Always `0`. Task-level progress is no longer tracked; read `stage` instead." }, "completedTasks": { "type": "number", "deprecated": true, "description": "Always `0`. Task-level progress is no longer tracked; read `stage` instead." }, "startedAt": { "description": "Date when the operation was started", "$ref": "#/components/schemas/Timestamp" }, "updatedAt": { "description": "Date when the operation was last updated", "$ref": "#/components/schemas/Timestamp" }, "completedAt": { "description": "Date when the operation was successful (when state is `success`)", "$ref": "#/components/schemas/Timestamp" }, "error": { "type": "string", "description": "Error details, defined if state is `failure`." }, "errorAction": { "$ref": "#/components/schemas/GitSyncOperationErrorAction" } }, "required": [ "state", "direction", "stage", "dispatchedTasks", "completedTasks", "startedAt", "updatedAt" ] }, "GitSyncOperation": { "description": "Deprecated. Use `GitSyncSpaceOperation` instead.", "deprecated": true, "allOf": [ { "$ref": "#/components/schemas/GitSyncSpaceOperation" } ] }, "GitSyncSiteOperation": { "type": "object", "properties": { "state": { "$ref": "#/components/schemas/GitSyncOperationState" }, "direction": { "$ref": "#/components/schemas/GitSyncOperationDirection" }, "stage": { "$ref": "#/components/schemas/GitSyncOperationStage" }, "startedAt": { "description": "Date when the operation was started", "$ref": "#/components/schemas/Timestamp" }, "updatedAt": { "description": "Date when the operation was last updated", "$ref": "#/components/schemas/Timestamp" }, "completedAt": { "description": "Date when the operation was successful (when state is `success`)", "$ref": "#/components/schemas/Timestamp" }, "error": { "type": "string", "description": "Error details, defined if state is `failure`." }, "errorAction": { "$ref": "#/components/schemas/GitSyncOperationErrorAction" }, "spaces": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/GitSyncSpaceOperation" } } }, "required": [ "state", "direction", "stage", "startedAt", "updatedAt" ] }, "GitSyncRunOperation": { "type": "string", "description": "Operation performed by a durable Git Sync run.", "enum": [ "import", "export", "check", "merge", "recovery" ] }, "GitSyncRunState": { "type": "string", "description": "Lifecycle state of a durable Git Sync run.", "enum": [ "queued", "running", "success", "failure", "timeout", "cancelled" ] }, "GitProviderChangeState": { "type": "string", "description": "Lifecycle state of a pull or merge request on the Git provider.", "enum": [ "open", "closed", "merged" ] }, "GitSyncSiteStructureSectionGroup": { "type": "object", "additionalProperties": false, "description": "A section group — a container that nests sections (and other section\ngroups). Discriminated by `type: section-group`. Up to one level of nested\nsection groups is allowed.\n", "properties": { "type": { "type": "string", "enum": [ "section-group" ], "description": "Discriminator for a section group node." }, "key": { "type": "string", "description": "Stable identifier for this section group, used as the Git Sync key.\nMust be unique amongst all other section groups of the site. For\nexample: `section-group-product` or `section-group-1`.\nYou can nest section groups only one level deep. For example, `section-group-1` can have a child section group `section-group-1-1`, but `section-group-1-1` cannot have a child section group.\n", "minLength": 1 }, "title": { "$ref": "#/components/schemas/SiteSectionGroupTitle" }, "localizedTitle": { "$ref": "#/components/schemas/LocalizedString128" }, "icon": { "$ref": "#/components/schemas/Icon" }, "condition": { "$ref": "#/components/schemas/Expression" }, "draft": { "type": "boolean", "description": "Whether the section group is draft and not live." }, "children": { "type": "array", "description": "Section, section group, or external link nodes nested under this group.", "items": { "oneOf": [ { "$ref": "#/components/schemas/GitSyncSiteStructureSectionGroup" }, { "$ref": "#/components/schemas/GitSyncSiteStructureSection" }, { "$ref": "#/components/schemas/GitSyncSiteStructureExternalLink" } ] } } }, "required": [ "type", "key", "title" ] }, "GitSyncSiteStructureSpace": { "type": "object", "additionalProperties": false, "description": "A space — a single content unit in the site's navigation tree. Discriminated\nby `type: space`.\n\nThe space's content either lives in the synced repository at the directory\npointed to by `content.directory`, or does not inherit the site's repository\nwhen `content.directory` is `null`. Hierarchy comes from where the space\nappears in the YAML (under a section, a section group, or at the root), not\nfrom an explicit parent reference.\n\nThe directory is read as one book — the Markdown files it holds become the\npages of the space.\n", "properties": { "type": { "type": "string", "enum": [ "space" ], "description": "Discriminator for a space node." }, "key": { "type": "string", "description": "Stable identifier for this space, used as the Git Sync key. Must be\nunique amongst all other spaces of the site. For example: `space-docs`\nor `space-1`.\n", "minLength": 1 }, "title": { "type": "string", "minLength": 1 }, "localizedTitle": { "$ref": "#/components/schemas/LocalizedString128" }, "path": { "$ref": "#/components/schemas/SiteSpacePath" }, "default": { "type": "boolean", "description": "Whether this is the default space of its parent — the one opened when the\nsite or the section is visited without a space path. Exactly one space\namong each set of siblings carries it.\n" }, "hidden": { "type": "boolean", "description": "Whether the space is hidden from the site's navigation." }, "draft": { "type": "boolean", "description": "Whether the space is draft and not live." }, "condition": { "$ref": "#/components/schemas/Expression" }, "content": { "type": "object", "additionalProperties": false, "description": "Where the space's content is managed.", "properties": { "directory": { "oneOf": [ { "type": "string", "description": "Directory holding this space's content, resolved from the site's\nproject directory — `./guides` under a site rooted at `docs/`\nreads `docs/guides`. A leading slash escapes to the repository\nroot instead, so `/guides` always reads `guides`. Parent-directory\nsegments (`..`) are rejected.\n", "minLength": 1 }, { "type": "null", "description": "The space does not inherit the site's repository." } ] }, "language": { "$ref": "#/components/schemas/TranslationLanguage" } }, "required": [ "directory" ] } }, "required": [ "type", "key", "title", "path", "content" ] }, "GitSyncSiteStructureSection": { "type": "object", "additionalProperties": false, "description": "A section — a group of spaces sharing a top-level navigation entry.\nDiscriminated by `type: section`.\n\nSpaces inside a section are listed inline under `children`; a section holds\nnothing else — nest sections under a section group instead. A site with\nsections must mark exactly one section with `default: true`, and cannot also\nlist spaces at the top level of its structure.\n", "properties": { "type": { "type": "string", "enum": [ "section" ], "description": "Discriminator for a section node." }, "key": { "type": "string", "description": "Stable identifier for this section, used as the Git Sync key. Must be\nunique amongst all other sections of the site. For example:\n`section-guides` or `section-1`.\n", "minLength": 1 }, "title": { "$ref": "#/components/schemas/SiteSectionTitle" }, "localizedTitle": { "$ref": "#/components/schemas/LocalizedString128" }, "description": { "$ref": "#/components/schemas/SiteSectionDescription" }, "localizedDescription": { "$ref": "#/components/schemas/LocalizedString256" }, "icon": { "$ref": "#/components/schemas/Icon" }, "default": { "type": "boolean", "description": "Whether this is the default section for the site." }, "path": { "$ref": "#/components/schemas/SiteSectionPath" }, "condition": { "$ref": "#/components/schemas/Expression" }, "children": { "type": "array", "description": "Space nodes nested under this section.", "items": { "$ref": "#/components/schemas/GitSyncSiteStructureSpace" } } }, "required": [ "type", "key", "title", "path" ] }, "SiteExternalLinkTitle": { "type": "string", "description": "Title of the external link", "minLength": 2, "maxLength": 128 }, "SiteExternalLinkDescription": { "type": "string", "description": "Description of the external link", "minLength": 0, "maxLength": 256 }, "GitSyncSiteStructureExternalLink": { "type": "object", "additionalProperties": false, "description": "An external link — a leaf that navigates away from the site to an absolute\nHTTP(S) URL. Discriminated by `type: external-link`.\n\nAn external link only exists in a section-based site structure: it may sit\nat the root alongside sections and section groups, or nested under a\nsection group, but never inside a section.\n", "properties": { "type": { "type": "string", "enum": [ "external-link" ], "description": "Discriminator for an external link node." }, "key": { "type": "string", "description": "Stable identifier for this external link, used as the Git Sync key.\nMust be unique amongst all other nodes of the site. For example:\n`link-status` or `link-1`.\n", "minLength": 1 }, "title": { "$ref": "#/components/schemas/SiteExternalLinkTitle" }, "localizedTitle": { "$ref": "#/components/schemas/LocalizedString128" }, "description": { "$ref": "#/components/schemas/SiteExternalLinkDescription" }, "localizedDescription": { "$ref": "#/components/schemas/LocalizedString256" }, "icon": { "$ref": "#/components/schemas/Icon" }, "url": { "$ref": "#/components/schemas/URL", "description": "Absolute HTTP or HTTPS URL opened by the external link." }, "draft": { "type": "boolean", "description": "Whether the external link is draft and not live." }, "condition": { "$ref": "#/components/schemas/Expression" } }, "required": [ "type", "key", "title", "url" ] }, "GitSyncSiteStructureNode": { "description": "A single node in a Git Sync site structure tree — a section group, a\nsection, a space, or an external link, discriminated by `type`.\n", "oneOf": [ { "$ref": "#/components/schemas/GitSyncSiteStructureSectionGroup" }, { "$ref": "#/components/schemas/GitSyncSiteStructureSection" }, { "$ref": "#/components/schemas/GitSyncSiteStructureSpace" }, { "$ref": "#/components/schemas/GitSyncSiteStructureExternalLink" } ] }, "GitSyncSiteStructure": { "type": "array", "description": "Hierarchical structure of a site in a Git Sync YAML. Each entry is one of\nfour node types: a section group, a section, a space, or an external link.\n\nA **space** is a leaf holding content, pointed at a repository directory. A\n**section** gathers spaces behind one top-level navigation entry. A\n**section group** gathers sections. An **external link** is a leaf that\nnavigates away from the site to an absolute HTTP(S) URL — it may sit at the\nroot or under a section group, but never inside a section, and only exists\nin a site that also has at least one section. A site either uses sections\n(optionally alongside external links) or lists its spaces at the top level,\nnever both.\n\n```yaml\nstructure:\n - type: space\n key: space-guides\n title: Guides\n path: guides\n default: true\n content:\n directory: ./guides\n - type: space\n key: space-api\n title: API reference\n path: api\n content:\n directory: ./api\n```\n\nThe same two spaces behind top-level navigation entries:\n\n```yaml\nstructure:\n - type: section\n key: section-product\n title: Product\n path: product\n default: true\n children:\n - type: space\n key: space-guides\n title: Guides\n path: guides\n default: true\n content:\n directory: ./guides\n - type: section\n key: section-reference\n title: Reference\n path: reference\n children:\n - type: space\n key: space-api\n title: API reference\n path: api\n default: true\n content:\n directory: ./api\n```\n\nRules checked on import — a violation fails the sync, naming the offending\nnode:\n\n- Every `key` is unique across the file, whatever the node type. Git Sync\n recognises a node from one sync to the next by its key, so a reused key\n leaves two nodes indistinguishable.\n- Each section marks exactly one of its spaces `default: true`, and a site\n without sections marks one among its top-level spaces. The default is the\n space that opens when the site or the section is visited without a space\n path of its own.\n- A site declaring any section marks exactly one of those sections\n `default: true`, and lists no space at the top level: once a section\n exists, every space belongs inside one.\n- Sections hold only spaces. Section groups hold only sections, nested\n section groups (one further level), or external links — nothing nests\n deeper than that.\n- External links are only valid at the root or nested in a section group,\n never inside a section. A site containing an external link must use\n sections, with at least one section declared.\n- Spaces pointed at the same `content.directory` declare the same\n `content.language`. One directory is read once, so it cannot produce two\n languages at the same time.\n", "items": { "$ref": "#/components/schemas/GitSyncSiteStructureNode" } }, "GitSyncSiteOpenAPISpecPath": { "type": "string", "description": "Path of a YAML or JSON file, relative to the directory holding\n`gitbook-docs.yaml`. The path must stay inside that directory.\n", "minLength": 1, "maxLength": 1024, "pattern": "\\.(ya?ml|json)$" }, "GitSyncSiteOpenAPISpec": { "description": "An OpenAPI specification imported from the repository. Either the path of\nthe specification file, or an object with the file as `source`.\n", "oneOf": [ { "$ref": "#/components/schemas/GitSyncSiteOpenAPISpecPath" }, { "type": "object", "additionalProperties": false, "properties": { "source": { "$ref": "#/components/schemas/GitSyncSiteOpenAPISpecPath", "description": "Path of the specification file." } }, "required": [ "source" ] } ] }, "GitSyncSiteConfig": { "type": "object", "description": "Schema for a site `gitbook-docs.yaml` file — the canonical contract for what\ncan be authored in Git Sync to drive a site's structure.\n\nThe file lives at the root of the site's project directory in the synced\nrepository. It names the site and maps the repository's content directories\nonto the site's navigation.\n", "properties": { "$schema": { "type": "string", "format": "uri", "description": "URL of the schema used by editors to validate the site configuration." }, "version": { "type": "integer", "description": "Reserved for future use. When a breaking schema change ships, this\nfield lets the parser branch on the version; absence means v1.\n", "enum": [ 1 ], "default": 1 }, "site": { "type": "object", "additionalProperties": false, "properties": { "title": { "type": "string", "description": "Display title for the site.", "minLength": 1 }, "structure": { "$ref": "#/components/schemas/GitSyncSiteStructure" } }, "required": [ "title", "structure" ] }, "openapi": { "type": "object", "description": "OpenAPI specifications imported from the repository, keyed by the slug\nof the organization's specification they update. Each value is either\nthe path of the specification file, or an object with the file as\n`source`:\n\n```yaml\nopenapi:\n petstore: ./petstore.yaml\n billing:\n source: ./billing.yaml\n```\n\nThis is in early rollout: it may not take effect for your organization\nyet, in which case listed specifications are not imported.\n\nEach commit that changes a listed file updates the specification, which\nis created private if the organization has none with that slug. Changes\nmade in GitBook are not written back to the repository: the next commit\nto the file replaces them. Removing an entry leaves the specification in\nGitBook.\n", "maxProperties": 50, "propertyNames": { "$ref": "#/components/schemas/OpenAPISpecSlug" }, "additionalProperties": { "$ref": "#/components/schemas/GitSyncSiteOpenAPISpec" } } }, "required": [ "site" ] }, "SiteRevisionChangeType": { "type": "string", "description": "The type of change between two site revisions.", "enum": [ "space_content_edited", "openapi_spec_edited" ] }, "IntegrationEnvironmentSpaceInstallation": { "allOf": [ { "$ref": "#/components/schemas/IntegrationContentInstallationBase" }, { "type": "object", "properties": { "space": { "description": "The space the integration is installed on.", "type": "string" } }, "required": [ "space" ] } ] }, "IntegrationEnvironmentSiteInstallation": { "allOf": [ { "$ref": "#/components/schemas/IntegrationContentInstallationBase" }, { "type": "object", "properties": { "site": { "description": "The site the integration is installed on.", "type": "string" } }, "required": [ "site" ] } ] }, "IntegrationEnvironment": { "type": "object", "description": "Runtime environment provided during the execution of integration's code.", "properties": { "authToken": { "type": "string", "description": "Authentication token to use with the HTTP API. Depending on the context, the token might be representing the installation or the integration.", "deprecated": true }, "integration": { "$ref": "#/components/schemas/Integration" }, "installation": { "$ref": "#/components/schemas/IntegrationInstallation" }, "spaceInstallation": { "$ref": "#/components/schemas/IntegrationEnvironmentSpaceInstallation" }, "siteInstallation": { "$ref": "#/components/schemas/IntegrationEnvironmentSiteInstallation" }, "secrets": { "$ref": "#/components/schemas/IntegrationSecrets" }, "signingSecret": { "type": "string", "description": "Secret that can be used to verify the authenticity of incoming HTTP requests to the integration.", "deprecated": true }, "signingSecrets": { "type": "object", "properties": { "integration": { "type": "string", "description": "Secret that can be used to verify the authenticity of incoming HTTP requests to the integration." }, "installation": { "type": "string", "description": "Secret that can be used to verify the authenticity of incoming HTTP requests to the installation." }, "spaceInstallation": { "type": "string", "description": "Secret that can be used to verify the authenticity of incoming HTTP requests to the space installation." }, "siteInstallation": { "type": "string", "description": "Secret that can be used to verify the authenticity of incoming HTTP requests to the site installation." } }, "required": [ "integration" ] }, "apiEndpoint": { "type": "string", "description": "URL of the HTTP API" }, "apiTokens": { "type": "object", "properties": { "integration": { "type": "string", "description": "API authentication token representing the integration." }, "installation": { "type": "string", "description": "API authentication token representing the current installation." } }, "required": [ "integration" ] }, "network": { "$ref": "#/components/schemas/IntegrationNetwork", "description": "Network configuration for the integration environment" } }, "required": [ "apiEndpoint", "apiTokens", "integration", "signingSecrets", "secrets" ] }, "SpaceIntegrationScript": { "type": "object", "properties": { "script": { "description": "Script URL to load.", "$ref": "#/components/schemas/URL" }, "contentSecurityPolicy": { "description": "Content Security Policy to secure the loading of this script.", "type": "string" }, "cookies": { "type": "boolean", "description": "If true, the script will potentially load use cookies and visitors should be aware." } }, "required": [ "script", "cookies" ] }, "BaseEvent": { "description": "Common properties for all events.", "type": "object", "properties": { "eventId": { "description": "Unique identifier for the event.", "type": "string" }, "type": { "description": "Type of the event.", "type": "string" } }, "required": [ "eventId", "type" ] }, "InstallationEvent": { "allOf": [ { "$ref": "#/components/schemas/BaseEvent" }, { "type": "object", "description": "Common properties for all events related to an installation", "properties": { "installationId": { "type": "string", "description": "ID of the integration installation" } }, "required": [ "installationId" ] } ] }, "InstallationSetupEvent": { "allOf": [ { "$ref": "#/components/schemas/InstallationEvent" }, { "type": "object", "description": "Event received when integration has been installed or updated.", "properties": { "type": { "type": "string", "enum": [ "installation_setup" ] }, "status": { "$ref": "#/components/schemas/IntegrationInstallationStatus" }, "previous": { "type": "object", "description": "The state of the installation at the account level before it was updated.", "properties": { "status": { "$ref": "#/components/schemas/IntegrationInstallationStatus" }, "configuration": { "type": "object", "description": "The previous configuration of the installation at the account level." } }, "required": [ "status" ] } }, "required": [ "type", "status" ] } ] }, "InstallationDeletedEvent": { "allOf": [ { "$ref": "#/components/schemas/InstallationEvent" }, { "type": "object", "description": "Event received when integration has been uninstalled from an organization.", "properties": { "type": { "type": "string", "enum": [ "installation_deleted" ] }, "previous": { "type": "object", "description": "The state of the installation before it was deleted.", "properties": { "configuration": { "type": "object", "description": "The previous configuration of the installation." } } } }, "required": [ "type", "previous" ] } ] }, "SpaceEvent": { "allOf": [ { "$ref": "#/components/schemas/InstallationEvent" }, { "type": "object", "description": "Common properties for all events related to a specific space.", "properties": { "spaceId": { "type": "string", "description": "ID of the space" } }, "required": [ "spaceId" ] } ] }, "SpaceInstallationSetupEvent": { "allOf": [ { "$ref": "#/components/schemas/SpaceEvent" }, { "type": "object", "description": "Event received when integration has been installed or updated on a space.", "properties": { "type": { "type": "string", "enum": [ "space_installation_setup" ] }, "status": { "$ref": "#/components/schemas/IntegrationInstallationStatus" }, "previous": { "type": "object", "description": "The state of the Space installation before it was updated.", "properties": { "status": { "$ref": "#/components/schemas/IntegrationInstallationStatus" }, "configuration": { "type": "object", "description": "The previous configuration of the Space installation." } }, "required": [ "status" ] } }, "required": [ "type", "status" ] } ] }, "SpaceInstallationDeletedEvent": { "allOf": [ { "$ref": "#/components/schemas/SpaceEvent" }, { "type": "object", "description": "Event received when integration has been uninstalled from a space.", "properties": { "type": { "type": "string", "enum": [ "space_installation_deleted" ] }, "previous": { "type": "object", "description": "The state of the Space installation before it was deleted.", "properties": { "configuration": { "type": "object", "description": "The previous configuration of the Space installation." } } } }, "required": [ "type", "previous" ] } ] }, "SiteEvent": { "allOf": [ { "$ref": "#/components/schemas/InstallationEvent" }, { "type": "object", "description": "Common properties for all events related to a specific site.", "properties": { "siteId": { "type": "string", "description": "ID of the site" } }, "required": [ "siteId" ] } ] }, "SiteInstallationSetupEvent": { "allOf": [ { "$ref": "#/components/schemas/SiteEvent" }, { "type": "object", "description": "Event received when integration has been installed or updated on a site.", "properties": { "type": { "type": "string", "enum": [ "site_installation_setup" ] }, "status": { "$ref": "#/components/schemas/IntegrationInstallationStatus" }, "previous": { "type": "object", "description": "The state of the site installation before it was updated.", "properties": { "status": { "$ref": "#/components/schemas/IntegrationInstallationStatus" }, "configuration": { "type": "object", "description": "The previous configuration of the site installation." } }, "required": [ "status" ] } }, "required": [ "type", "status" ] } ] }, "SiteInstallationDeletedEvent": { "allOf": [ { "$ref": "#/components/schemas/SiteEvent" }, { "type": "object", "description": "Event received when integration has been uninstalled from a site.", "properties": { "type": { "type": "string", "enum": [ "site_installation_deleted" ] }, "previous": { "type": "object", "description": "The state of the site installation before it was deleted.", "properties": { "configuration": { "type": "object", "description": "The previous configuration of the site installation." } } } }, "required": [ "type", "previous" ] } ] }, "EventVisitor": { "type": "object", "description": "Analytics info on the GitBook's content visitor.", "properties": { "anonymousId": { "type": "string", "description": "GitBook's unique identifier of the visitor." }, "cookies": { "type": "object", "description": "The visitors cookies.", "additionalProperties": { "type": "string" } }, "userAgent": { "type": "string", "description": "User-agent of the visitor." }, "ip": { "type": "string", "description": "IP address of the visitor." }, "language": { "type": "string", "description": "Language of the visitor." } }, "required": [ "anonymousId", "cookies", "userAgent", "ip" ] }, "SiteViewEvent": { "allOf": [ { "$ref": "#/components/schemas/SiteEvent" }, { "type": "object", "description": "Event received when a page has been visited on a site.", "properties": { "type": { "type": "string", "enum": [ "site_view" ] }, "spaceId": { "type": "string", "description": "Unique identifier of the visited space in the site.", "deprecated": true }, "siteSpaceId": { "description": "The site-space that was viewed", "type": "string" }, "pageId": { "type": "string", "description": "Unique identifier of the visited page." }, "visitor": { "$ref": "#/components/schemas/EventVisitor" }, "url": { "type": "string", "description": "The GitBook content's URL visited (including URL params)." }, "referrer": { "type": "string", "description": "The URL of referrer that linked to the page." } }, "required": [ "type", "visitor", "url", "referrer" ] } ] }, "SpaceContentUpdatedEvent": { "allOf": [ { "$ref": "#/components/schemas/SpaceEvent" }, { "type": "object", "description": "Event when the primary content of a space has been updated.", "properties": { "type": { "type": "string", "enum": [ "space_content_updated" ] }, "revisionId": { "type": "string", "description": "Unique identifier of the new content revision" }, "updatedBy": { "type": "array", "description": "Users who updated the content", "items": { "$ref": "#/components/schemas/User" } } }, "required": [ "type", "revisionId", "updatedBy" ] } ] }, "SpaceGitSyncCompletedEvent": { "allOf": [ { "$ref": "#/components/schemas/SpaceEvent" }, { "type": "object", "description": "Event when a GitSync operation has been completed.", "properties": { "type": { "type": "string", "enum": [ "space_gitsync_completed" ] }, "state": { "type": "string", "enum": [ "success", "failure" ] }, "revisionId": { "type": "string", "description": "Unique identifier of the new content revision" }, "commitId": { "type": "string", "description": "Unique identifier for the commit (sha)" } }, "required": [ "type", "state", "revisionId", "commitId" ] } ] }, "SpaceGitSyncStartedEvent": { "allOf": [ { "$ref": "#/components/schemas/SpaceEvent" }, { "type": "object", "description": "Event when a GitSync operation has been started.", "properties": { "type": { "type": "string", "enum": [ "space_gitsync_started" ] }, "revisionId": { "type": "string", "description": "Unique identifier of the new content revision" }, "commitId": { "type": "string", "description": "Unique identifier for the commit (sha)" } }, "required": [ "type", "revisionId", "commitId" ] } ] }, "SpaceVisibilityUpdatedEvent": { "allOf": [ { "$ref": "#/components/schemas/SpaceEvent" }, { "type": "object", "description": "Event when the visibility of the space has been changed.", "properties": { "type": { "type": "string", "enum": [ "space_visibility_updated" ] }, "previousVisibility": { "$ref": "#/components/schemas/ContentVisibility" }, "visibility": { "$ref": "#/components/schemas/ContentVisibility" } }, "required": [ "type", "previousVisibility", "visibility" ] } ] }, "TaskEvent": { "allOf": [ { "$ref": "#/components/schemas/BaseEvent" }, { "type": "object", "description": "Event representing a background task trigger for an integration.", "properties": { "type": { "type": "string", "enum": [ "task" ] }, "task": { "type": "object", "description": "Payload associated with the integration task." } }, "required": [ "type", "task" ] } ] }, "FetchRequest": { "type": "object", "properties": { "method": { "type": "string", "enum": [ "post", "get", "put", "delete" ] }, "url": { "type": "string" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } } }, "required": [ "method", "url", "headers" ] }, "FetchEvent": { "allOf": [ { "$ref": "#/components/schemas/BaseEvent" }, { "type": "object", "description": "Event representing an incoming HTTP request.", "properties": { "spaceId": { "type": "string", "description": "The space ID, if requests are specific to a single space" }, "siteId": { "type": "string", "description": "The site ID, if requests are specific to a single site" }, "installationId": { "type": "string", "description": "The installation ID, if requests are specific to a single installation" }, "auth": { "type": "object", "properties": { "userId": { "type": "string", "description": "The user's ID." } }, "required": [ "userId" ] }, "type": { "type": "string", "enum": [ "fetch" ] }, "request": { "$ref": "#/components/schemas/FetchRequest" } }, "required": [ "type", "request" ] } ] }, "FetchPublishedScriptEvent": { "allOf": [ { "$ref": "#/components/schemas/SiteEvent" }, { "type": "object", "description": "Common properties for all events related to fetching a published script from an installation", "properties": { "type": { "type": "string", "enum": [ "fetch_published_script" ] } }, "required": [ "type" ] } ] }, "FetchVisitorAuthenticationEvent": { "allOf": [ { "$ref": "#/components/schemas/SiteEvent" }, { "type": "object", "description": "Common properties for all events related to authenticated access from an installation", "properties": { "type": { "type": "string", "enum": [ "fetch_visitor_authentication" ] }, "location": { "type": "string" }, "searchParams": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Whitelisted search parameters from the visitor authentication request." }, "cookies": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Whitelisted cookies from the visitor authentication request." }, "action": { "type": "string", "enum": [ "logout" ], "description": "The visitor authentication action to resolve. If omitted, integrations resolve to the existing login redirect." } }, "required": [ "type" ] } ] }, "UIRenderEvent": { "allOf": [ { "oneOf": [ { "$ref": "#/components/schemas/SpaceEvent" }, { "$ref": "#/components/schemas/SiteEvent" }, { "$ref": "#/components/schemas/InstallationEvent" } ] }, { "type": "object", "description": "Event generated when rendering a UI", "properties": { "auth": { "type": "object", "properties": { "userId": { "type": "string", "description": "The user's ID." } }, "required": [ "userId" ] }, "type": { "type": "string", "enum": [ "ui_render" ] }, "componentId": { "type": "string" }, "props": { "description": "Properties to render the UI.", "type": "object" }, "state": { "description": "State of the UI.", "type": "object" }, "context": { "$ref": "#/components/schemas/ContentKitContext" }, "action": { "type": "object" } }, "required": [ "type", "componentId", "props", "context" ] } ] }, "ContentComputeEvent": { "allOf": [ { "$ref": "#/components/schemas/SpaceEvent" }, { "type": "object", "description": "Generic event when computing the content of a space", "properties": { "sourceId": { "type": "string" }, "props": { "description": "Properties passed to the rendering.", "$ref": "#/components/schemas/PlainObject" }, "dependencies": { "description": "Dependencies of the computation.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/ComputedContentDependencyResolved" } } }, "required": [ "sourceId", "props", "dependencies" ] } ] }, "ContentComputeDocumentEvent": { "allOf": [ { "$ref": "#/components/schemas/ContentComputeEvent" }, { "type": "object", "description": "Event generated when computing the document of a pages.\nThe integration should respond with a `Document`.\n", "properties": { "type": { "type": "string", "enum": [ "content_compute_document" ] } }, "required": [ "type" ] } ] }, "ContentComputeRevisionEvent": { "allOf": [ { "$ref": "#/components/schemas/ContentComputeEvent" }, { "type": "object", "description": "Event generated when computing revision in a content.\nThe integration should respond with an array of pages and files.\n", "properties": { "type": { "type": "string", "enum": [ "content_compute_revision" ] } }, "required": [ "type" ] } ] }, "PageFeedbackEvent": { "allOf": [ { "$ref": "#/components/schemas/BaseEvent" }, { "type": "object", "description": "Event received when feedback has been submitted on a page.", "properties": { "type": { "type": "string", "enum": [ "page_feedback" ] }, "installationId": { "type": "string", "description": "ID of the integration installation" }, "spaceId": { "type": "string", "description": "Unique identifier of the space in the site.", "deprecated": true }, "siteId": { "type": "string", "description": "Unique identifier of the site." }, "pageId": { "type": "string", "description": "Unique identifier of the page where feedback was submitted." }, "feedback": { "type": "object", "description": "The feedback data submitted by the visitor.", "properties": { "rating": { "$ref": "#/components/schemas/PageFeedbackRating" }, "comment": { "type": "string", "description": "Optional comment provided with the feedback.", "minLength": 1, "maxLength": 512 } }, "required": [ "rating" ] }, "visitor": { "$ref": "#/components/schemas/EventVisitor" }, "url": { "type": "string", "description": "The GitBook content's URL where feedback was submitted." }, "referrer": { "type": "string", "description": "The URL of referrer that linked to the page." } }, "required": [ "type", "installationId", "siteId", "feedback", "visitor", "url", "referrer" ] } ] }, "Event": { "description": "Any event that can be received from GitBook.", "oneOf": [ { "$ref": "#/components/schemas/InstallationSetupEvent" }, { "$ref": "#/components/schemas/InstallationDeletedEvent" }, { "$ref": "#/components/schemas/SpaceInstallationSetupEvent" }, { "$ref": "#/components/schemas/SpaceInstallationDeletedEvent" }, { "$ref": "#/components/schemas/SiteInstallationSetupEvent" }, { "$ref": "#/components/schemas/SiteInstallationDeletedEvent" }, { "$ref": "#/components/schemas/SiteViewEvent" }, { "$ref": "#/components/schemas/SpaceContentUpdatedEvent" }, { "$ref": "#/components/schemas/SpaceGitSyncCompletedEvent" }, { "$ref": "#/components/schemas/SpaceGitSyncStartedEvent" }, { "$ref": "#/components/schemas/SpaceVisibilityUpdatedEvent" }, { "$ref": "#/components/schemas/TaskEvent" }, { "$ref": "#/components/schemas/FetchEvent" }, { "$ref": "#/components/schemas/FetchPublishedScriptEvent" }, { "$ref": "#/components/schemas/FetchVisitorAuthenticationEvent" }, { "$ref": "#/components/schemas/UIRenderEvent" }, { "$ref": "#/components/schemas/ContentComputeDocumentEvent" }, { "$ref": "#/components/schemas/ContentComputeRevisionEvent" }, { "$ref": "#/components/schemas/PageFeedbackEvent" } ], "discriminator": { "propertyName": "type" } }, "ContentComputeDocumentEventResponse": { "type": "object", "description": "Response expected for an event of type `content_compute_document`.", "properties": { "document": { "$ref": "#/components/schemas/Document" } }, "required": [ "document" ] }, "ContentComputeRevisionEventResponse": { "type": "object", "description": "Response expected for an event of type `content_compute_pages`.", "properties": { "pages": { "type": "array", "items": { "$ref": "#/components/schemas/InputPage" } }, "files": { "type": "array", "items": { "$ref": "#/components/schemas/InputFile" } } } }, "FeatureUpgradeRequirement": { "description": "The plan upgrade that would make a feature available.", "oneOf": [ { "type": "object", "title": "Organization plan upgrade", "properties": { "type": { "type": "string", "enum": [ "organization" ] }, "feature": { "$ref": "#/components/schemas/OrganizationFeature" }, "requiredPlan": { "description": "The internal identifier of the minimum organization plan that includes the feature. The human-readable name is provided in requiredPlanName.", "$ref": "#/components/schemas/BillingProduct" }, "requiredPlanName": { "type": "string", "description": "The human-readable name of the required organization plan.", "example": "Pro" }, "url": { "type": "string", "format": "uri", "description": "Where an admin may upgrade the organization's plan." } }, "additionalProperties": false, "required": [ "type", "feature", "requiredPlan", "requiredPlanName", "url" ] }, { "type": "object", "title": "Site plan upgrade", "properties": { "type": { "type": "string", "enum": [ "site" ] }, "feature": { "$ref": "#/components/schemas/SiteFeatureKey" }, "requiredPlan": { "description": "The internal identifier of the minimum site plan that includes the feature. The human-readable name is provided in requiredPlanName.", "$ref": "#/components/schemas/SiteType" }, "requiredPlanName": { "type": "string", "description": "The human-readable name of the required site plan.", "example": "Ultimate" }, "url": { "type": "string", "format": "uri", "description": "Where an admin may upgrade the site's plan." } }, "additionalProperties": false, "required": [ "type", "feature", "requiredPlan", "requiredPlanName", "url" ] } ], "discriminator": { "propertyName": "type" } }, "BillingStatus": { "type": "string", "enum": [ "trialing", "active", "past_due", "incomplete_expired", "canceled", "unpaid", "paused" ] }, "BillingDiscount": { "type": "object", "properties": { "duration": { "description": "How many months the discount will last", "type": "number" }, "percentOff": { "description": "Percent that will be deducted from the subtotal of the invoice", "type": "number" } }, "required": [ "duration", "percentOff" ] }, "APIIntegrationScope": { "type": "string", "enum": [ "integration:read", "integration:update", "integration:installation:read", "integration:installation:update" ] }, "APIScope": { "anyOf": [ { "$ref": "#/components/schemas/IntegrationScope" }, { "$ref": "#/components/schemas/APIIntegrationScope" } ] }, "ContentAPIBaseToken": { "type": "object", "description": "Common properties for all Content API tokens.", "properties": { "organization": { "type": "string", "description": "ID of the organization that owns the content. A content token is always scoped to spaces from the same organization." }, "spaces": { "type": "array", "items": { "type": "string" }, "description": "List of spaces that the token is allowed to access." }, "visitorType": { "type": "string", "enum": [ "human", "agent" ], "description": "Whether the visitor, for which the token was generated, is a human or an AI agent. Defaults to human when omitted." }, "visitorIsAuthenticated": { "type": "boolean", "description": "Whether the visitor is authenticated. Only set for sites with adaptive content enabled when token verification succeeded." }, "visitorRegion": { "type": "string", "description": "The region containing the country of the visitor for whom the token was generated. Omitted if the country isn't in any region." }, "claims": { "type": "object", "description": "Attributes or assertions that provide specific details about the visitor for which the token was generated.", "additionalProperties": true }, "rateLimitMultiplier": { "type": "number", "description": "Multiplier for the rate limit applied to the token." } }, "required": [ "organization", "spaces" ] }, "SpaceAPIToken": { "allOf": [ { "$ref": "#/components/schemas/ContentAPIBaseToken" }, { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "space" ] }, "space": { "type": "string", "description": "ID of the space that the token is allowed to access." } }, "required": [ "kind", "space" ] } ] }, "CollectionAPIToken": { "allOf": [ { "$ref": "#/components/schemas/ContentAPIBaseToken" }, { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "collection" ] }, "collection": { "type": "string", "description": "ID of the collection that the token is allowed to access." } }, "required": [ "kind", "collection" ] } ] }, "SiteAPIToken": { "allOf": [ { "$ref": "#/components/schemas/ContentAPIBaseToken" }, { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "site" ] }, "site": { "type": "string", "description": "ID of the site that the token is allowed to access." }, "siteSpace": { "type": "string", "description": "ID of the site-space to be used when using this token for rendering published content." }, "siteSection": { "type": "string", "description": "ID of the site-section to be used when using this token for rendering published content. Only defined for section sites." }, "space": { "type": "string", "description": "ID of the space to be used when using this token for rendering published content." }, "draft": { "type": "boolean", "default": false, "description": "Whether to include draft data when using this token for rendering content. If false, only live data will be included when rendering content with this token." } }, "required": [ "kind", "site", "siteSpace", "space" ] } ] }, "ContentAPITokenPayload": { "description": "Content properties stored in a Content API token.", "oneOf": [ { "$ref": "#/components/schemas/SpaceAPIToken" }, { "$ref": "#/components/schemas/CollectionAPIToken" }, { "$ref": "#/components/schemas/SiteAPIToken" } ] }, "APIChannelSpaceInfo": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "space" ] }, "space": { "type": "string" } }, "required": [ "channel", "space" ] }, "APIChannelSpaceContent": { "type": "object", "description": "Channel notified when the main content of a space is changed.", "properties": { "channel": { "type": "string", "enum": [ "space-content" ] }, "space": { "type": "string" } }, "required": [ "channel", "space" ] }, "APIChannelSpaceGitInfo": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "space-git-info" ] }, "space": { "type": "string" } }, "required": [ "channel", "space" ] }, "APIChannelSpacePublishingAuth": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "space-publishing-auth" ] }, "space": { "type": "string" } }, "required": [ "channel", "space" ] }, "APIChannelSpacePublishingCustomization": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "space-publishing-customization" ] }, "space": { "type": "string" } }, "required": [ "channel", "space" ] }, "APIChannelSpaceIntegrations": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "space-integrations" ] }, "space": { "type": "string" } }, "required": [ "channel", "space" ] }, "APIChannelUserAPITokens": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "user-api-tokens" ] }, "user": { "type": "string" } }, "required": [ "channel", "user" ] }, "APIChannelUserOrganizations": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "user-organizations" ] }, "user": { "type": "string" } }, "required": [ "channel", "user" ] }, "APIChannelUserPasskeys": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "user-passkeys" ] }, "user": { "type": "string" } }, "required": [ "channel", "user" ] }, "APIChannelUserProfile": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "user-profile" ] }, "user": { "type": "string" } }, "required": [ "channel", "user" ] }, "APIChannelChangeRequest": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "space-change-request" ] }, "space": { "type": "string" }, "changeRequest": { "type": "string" } }, "required": [ "channel", "space", "changeRequest" ] }, "APIChannelChangeRequests": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "space-change-requests" ] }, "space": { "type": "string" } }, "required": [ "channel", "space" ] }, "APIChannelChangeRequestReviews": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "space-change-request-reviews" ] }, "space": { "type": "string" }, "changeRequest": { "type": "string" } }, "required": [ "channel", "space", "changeRequest" ] }, "APIChannelCollection": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "collection" ] }, "collection": { "type": "string" } }, "required": [ "channel", "collection" ] }, "APIChannelCollectionPublishingCustomization": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "collection-publishing-customization" ] }, "collection": { "type": "string" } }, "required": [ "channel", "collection" ] }, "APIChannelOrganizationInfo": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "organization" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationAgentData": { "type": "object", "description": "Subscription channel for changes in Docs Agent data in an organization.", "properties": { "channel": { "type": "string", "enum": [ "organization-agent-data" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationInviteLinks": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "organization-link-invites" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationMembers": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "organization-members" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationMember": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "organization-member" ] }, "organization": { "type": "string" }, "user": { "type": "string" } }, "required": [ "channel", "organization", "user" ] }, "APIChannelOrganizationSAML": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "organization-saml" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationTeams": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "organization-teams" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationTeam": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "organization-team" ] }, "organization": { "type": "string" }, "team": { "type": "string" } }, "required": [ "channel", "organization", "team" ] }, "APIChannelOrganizationTeamMembers": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "organization-team-members" ] }, "organization": { "type": "string" }, "team": { "type": "string" } }, "required": [ "channel", "organization", "team" ] }, "APIChannelOrganizationTeamMember": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "organization-team-member" ] }, "organization": { "type": "string" }, "team": { "type": "string" }, "member": { "type": "string" } }, "required": [ "channel", "organization", "member" ] }, "APIChannelOrganizationSpaces": { "type": "object", "description": "Subscription channel for changes in spaces in an organization.", "properties": { "channel": { "type": "string", "enum": [ "organization-spaces" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationCollections": { "type": "object", "description": "Subscription channel for changes in collections in an organization.", "properties": { "channel": { "type": "string", "enum": [ "organization-collections" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationIntegrations": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "organization-integrations" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationInstallations": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "organization-installations" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationSites": { "type": "object", "description": "Subscription channel for changes in sites in an organization.", "properties": { "channel": { "type": "string", "enum": [ "organization-sites" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationOpenAPISpecs": { "type": "object", "description": "Subscription channel for changes in OpenAPI specifications in an organization.", "properties": { "channel": { "type": "string", "enum": [ "organization-openapi-specs" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationTranslations": { "type": "object", "description": "Subscription channel for changes in translations in an organization.", "properties": { "channel": { "type": "string", "enum": [ "organization-translations" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationTranslationsGlossary": { "type": "object", "description": "Subscription channel for changes in the glossary in an organization.", "properties": { "channel": { "type": "string", "enum": [ "organization-translations-glossary" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationSCIMConnections": { "type": "object", "description": "Subscription channel for changes in the SCIM connections of an organization.", "properties": { "channel": { "type": "string", "enum": [ "organization-scim-connections" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationDomains": { "type": "object", "description": "Subscription channel for changes in the email domains of an organization.", "properties": { "channel": { "type": "string", "enum": [ "organization-domains" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationIdPConnections": { "type": "object", "description": "Subscription channel for changes in the identity provider connections of an organization.", "properties": { "channel": { "type": "string", "enum": [ "organization-idp-connections" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationCustomFonts": { "type": "object", "description": "Subscription channel for changes in custom fonts in an organization.", "properties": { "channel": { "type": "string", "enum": [ "organization-fonts" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationAgentInstructions": { "type": "object", "description": "Subscription channel for Docs agent instructions changes in an organization.", "properties": { "channel": { "type": "string", "enum": [ "organization-agent-instructions" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelOrganizationChangeRequests": { "type": "object", "description": "Subscription channel for all change requests in an organization.", "properties": { "channel": { "type": "string", "enum": [ "organization-change-requests" ] }, "organization": { "type": "string" } }, "required": [ "channel", "organization" ] }, "APIChannelSpaceComments": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "space-comments" ] }, "space": { "type": "string" } }, "required": [ "channel", "space" ] }, "APIChannelChangeRequestComments": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "space-change-request-comments" ] }, "space": { "type": "string" }, "changeRequest": { "type": "string" } }, "required": [ "channel", "space", "changeRequest" ] }, "APIChannelCommentInfo": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "space-comment" ] }, "space": { "type": "string" }, "comment": { "type": "string" } }, "required": [ "channel", "space", "comment" ] }, "APIChannelCommentReplies": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "space-comment-replies" ] }, "space": { "type": "string" }, "comment": { "type": "string" } }, "required": [ "channel", "space", "comment" ] }, "APIChannelIntegration": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "integration" ] }, "integration": { "type": "string" } }, "required": [ "channel", "integration" ] }, "APIChannelIntegrationInstallation": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "integration-installation" ] }, "integration": { "type": "string" }, "installation": { "type": "string" } }, "required": [ "channel", "integration", "installation" ] }, "APIChannelIntegrationSpaceInstallation": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "integration-space-installation" ] }, "integration": { "type": "string" }, "installation": { "type": "string" }, "space": { "type": "string" } }, "required": [ "channel", "integration", "installation", "space" ] }, "APIChannelIntegrationSpaceInstallations": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "integration-space-installations" ] }, "integration": { "type": "string" }, "installation": { "type": "string" } }, "required": [ "channel", "integration", "installation" ] }, "APIChannelIntegrationSiteInstallation": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "integration-site-installation" ] }, "integration": { "type": "string" }, "installation": { "type": "string" }, "site": { "type": "string" } }, "required": [ "channel", "integration", "installation", "site" ] }, "APIChannelIntegrationSiteInstallations": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "integration-site-installations" ] }, "integration": { "type": "string" }, "installation": { "type": "string" } }, "required": [ "channel", "integration", "installation" ] }, "APIChannelPublishedContentSite": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "published-content-site" ] }, "site": { "type": "string" } }, "required": [ "channel", "site" ] }, "APIChannelSiteRedirects": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "site-redirects" ] }, "site": { "type": "string" } }, "required": [ "channel", "site" ] }, "APIChannelSite": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "site" ] }, "site": { "type": "string" } }, "required": [ "channel", "site" ] }, "APIChannelSiteChannels": { "type": "object", "description": "Subscription channel for changes in site channels.", "properties": { "channel": { "type": "string", "enum": [ "site-channels" ] }, "site": { "type": "string" } }, "required": [ "channel", "site" ] }, "APIChannelSiteContext": { "type": "object", "description": "Subscription channel for changes in site context.", "properties": { "channel": { "type": "string", "enum": [ "site-context" ] }, "site": { "type": "string" } }, "required": [ "channel", "site" ] }, "APIChannelSiteCustomization": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "site-customization" ] }, "site": { "type": "string" } }, "required": [ "channel", "site" ] }, "APIChannelSiteAgentSettings": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "site-agent-settings" ] }, "site": { "type": "string" } }, "required": [ "channel", "site" ] }, "APIChannelSiteIntegrations": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "site-integrations" ] }, "site": { "type": "string" } }, "required": [ "channel", "site" ] }, "APIChannelSiteSpace": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "site-space" ] }, "site": { "type": "string" }, "siteSpace": { "type": "string" } }, "required": [ "channel", "site", "siteSpace" ] }, "APIChannelSiteSpaceCustomization": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "site-space-customization" ] }, "site": { "type": "string" }, "siteSpace": { "type": "string" } }, "required": [ "channel", "site", "siteSpace" ] }, "APIChannelSiteStructure": { "type": "object", "description": "Subscription channel for changes in site structure in an organization.", "properties": { "channel": { "type": "string", "enum": [ "site-structure" ] }, "site": { "type": "string" } }, "required": [ "channel", "site" ] }, "APIChannelSiteAdaptiveSchema": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "site-adaptive-schema" ] }, "site": { "type": "string" } }, "required": [ "channel", "site" ] }, "APIChannelSitePublishingAuth": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "site-publishing-auth" ] }, "site": { "type": "string" } }, "required": [ "channel", "site" ] }, "APIChannelSiteShareLinks": { "type": "object", "description": "Subscription channel for changes in share links in a site", "properties": { "channel": { "type": "string", "enum": [ "site-share-links" ] }, "site": { "type": "string" } }, "required": [ "channel", "site" ] }, "APIChannelSiteShareLink": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "site-share-link" ] }, "site": { "type": "string" }, "siteShareLink": { "type": "string" } }, "required": [ "channel", "site", "siteShareLink" ] }, "APIChannelSiteMcpServers": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "site-mcp-servers" ] }, "site": { "type": "string" } }, "required": [ "channel", "site" ] }, "APIChannelSiteMcpServer": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "site-mcp-server" ] }, "site": { "type": "string" }, "siteMcpServer": { "type": "string" } }, "required": [ "channel", "site", "siteMcpServer" ] }, "APIChannelSiteSection": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "site-section" ] }, "site": { "type": "string" }, "siteSection": { "type": "string" } }, "required": [ "channel", "site", "siteSection" ] }, "APIChannelCustomHostname": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "custom-hostname" ] }, "customHostname": { "type": "string" } }, "required": [ "channel", "customHostname" ] }, "APIChannelGitSyncInstallation": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "git-sync-installation" ] }, "installation": { "type": "string" } }, "required": [ "channel", "installation" ] }, "APIChannelGitSyncOperation": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "space-gitsync-operation" ] }, "space": { "type": "string" } }, "required": [ "channel", "space" ] }, "APIChannelGitSyncSiteOperation": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "site-gitsync-operation" ] }, "site": { "type": "string" } }, "required": [ "channel", "site" ] }, "APIChannelOpenAPISpec": { "type": "object", "description": "Subscription channel for changes in OpenAPI specification.", "properties": { "channel": { "type": "string", "enum": [ "openapi-spec" ] }, "openAPISpec": { "type": "string" } }, "required": [ "channel", "openAPISpec" ] }, "APIChannelSubdomain": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "subdomain" ] }, "subdomain": { "type": "string" } }, "required": [ "channel", "subdomain" ] }, "APIChannelTranslation": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "translation" ] }, "translation": { "type": "string" } }, "required": [ "channel", "translation" ] }, "APIChannelTranslationRun": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "translation-run" ] }, "translation": { "type": "string" } }, "required": [ "channel", "translation" ] }, "APIChannelImportRun": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "import-run" ] }, "runId": { "type": "string" } }, "required": [ "channel", "runId" ] }, "APIChannel": { "description": "Channel to subscribe to for realtime updates.", "oneOf": [ { "$ref": "#/components/schemas/APIChannelSpaceInfo" }, { "$ref": "#/components/schemas/APIChannelSpaceContent" }, { "$ref": "#/components/schemas/APIChannelSpaceGitInfo" }, { "$ref": "#/components/schemas/APIChannelSpacePublishingAuth" }, { "$ref": "#/components/schemas/APIChannelSpacePublishingCustomization" }, { "$ref": "#/components/schemas/APIChannelSpaceIntegrations" }, { "$ref": "#/components/schemas/APIChannelUserAPITokens" }, { "$ref": "#/components/schemas/APIChannelUserOrganizations" }, { "$ref": "#/components/schemas/APIChannelUserPasskeys" }, { "$ref": "#/components/schemas/APIChannelUserProfile" }, { "$ref": "#/components/schemas/APIChannelChangeRequest" }, { "$ref": "#/components/schemas/APIChannelChangeRequests" }, { "$ref": "#/components/schemas/APIChannelChangeRequestReviews" }, { "$ref": "#/components/schemas/APIChannelCollection" }, { "$ref": "#/components/schemas/APIChannelCollectionPublishingCustomization" }, { "$ref": "#/components/schemas/APIChannelOrganizationInfo" }, { "$ref": "#/components/schemas/APIChannelOrganizationAgentData" }, { "$ref": "#/components/schemas/APIChannelOrganizationInviteLinks" }, { "$ref": "#/components/schemas/APIChannelOrganizationMembers" }, { "$ref": "#/components/schemas/APIChannelOrganizationMember" }, { "$ref": "#/components/schemas/APIChannelOrganizationSAML" }, { "$ref": "#/components/schemas/APIChannelOrganizationTeams" }, { "$ref": "#/components/schemas/APIChannelOrganizationTeam" }, { "$ref": "#/components/schemas/APIChannelOrganizationTeamMembers" }, { "$ref": "#/components/schemas/APIChannelOrganizationTeamMember" }, { "$ref": "#/components/schemas/APIChannelOrganizationSpaces" }, { "$ref": "#/components/schemas/APIChannelOrganizationCollections" }, { "$ref": "#/components/schemas/APIChannelOrganizationIntegrations" }, { "$ref": "#/components/schemas/APIChannelOrganizationInstallations" }, { "$ref": "#/components/schemas/APIChannelOrganizationSites" }, { "$ref": "#/components/schemas/APIChannelOrganizationOpenAPISpecs" }, { "$ref": "#/components/schemas/APIChannelOrganizationTranslations" }, { "$ref": "#/components/schemas/APIChannelOrganizationTranslationsGlossary" }, { "$ref": "#/components/schemas/APIChannelOrganizationSCIMConnections" }, { "$ref": "#/components/schemas/APIChannelOrganizationDomains" }, { "$ref": "#/components/schemas/APIChannelOrganizationIdPConnections" }, { "$ref": "#/components/schemas/APIChannelOrganizationCustomFonts" }, { "$ref": "#/components/schemas/APIChannelOrganizationAgentInstructions" }, { "$ref": "#/components/schemas/APIChannelOrganizationChangeRequests" }, { "$ref": "#/components/schemas/APIChannelSpaceComments" }, { "$ref": "#/components/schemas/APIChannelChangeRequestComments" }, { "$ref": "#/components/schemas/APIChannelCommentInfo" }, { "$ref": "#/components/schemas/APIChannelCommentReplies" }, { "$ref": "#/components/schemas/APIChannelIntegration" }, { "$ref": "#/components/schemas/APIChannelIntegrationInstallation" }, { "$ref": "#/components/schemas/APIChannelIntegrationSpaceInstallation" }, { "$ref": "#/components/schemas/APIChannelIntegrationSpaceInstallations" }, { "$ref": "#/components/schemas/APIChannelIntegrationSiteInstallation" }, { "$ref": "#/components/schemas/APIChannelIntegrationSiteInstallations" }, { "$ref": "#/components/schemas/APIChannelPublishedContentSite" }, { "$ref": "#/components/schemas/APIChannelSiteRedirects" }, { "$ref": "#/components/schemas/APIChannelSite" }, { "$ref": "#/components/schemas/APIChannelSiteChannels" }, { "$ref": "#/components/schemas/APIChannelSiteContext" }, { "$ref": "#/components/schemas/APIChannelSiteCustomization" }, { "$ref": "#/components/schemas/APIChannelSiteAgentSettings" }, { "$ref": "#/components/schemas/APIChannelSiteIntegrations" }, { "$ref": "#/components/schemas/APIChannelSiteSpace" }, { "$ref": "#/components/schemas/APIChannelSiteSpaceCustomization" }, { "$ref": "#/components/schemas/APIChannelSiteStructure" }, { "$ref": "#/components/schemas/APIChannelSiteAdaptiveSchema" }, { "$ref": "#/components/schemas/APIChannelSitePublishingAuth" }, { "$ref": "#/components/schemas/APIChannelSiteShareLinks" }, { "$ref": "#/components/schemas/APIChannelSiteShareLink" }, { "$ref": "#/components/schemas/APIChannelSiteMcpServers" }, { "$ref": "#/components/schemas/APIChannelSiteMcpServer" }, { "$ref": "#/components/schemas/APIChannelSiteSection" }, { "$ref": "#/components/schemas/APIChannelCustomHostname" }, { "$ref": "#/components/schemas/APIChannelGitSyncInstallation" }, { "$ref": "#/components/schemas/APIChannelGitSyncOperation" }, { "$ref": "#/components/schemas/APIChannelGitSyncSiteOperation" }, { "$ref": "#/components/schemas/APIChannelOpenAPISpec" }, { "$ref": "#/components/schemas/APIChannelSubdomain" }, { "$ref": "#/components/schemas/APIChannelTranslation" }, { "$ref": "#/components/schemas/APIChannelTranslationRun" }, { "$ref": "#/components/schemas/APIChannelImportRun" } ], "discriminator": { "propertyName": "channel" } }, "APIChannelTranslationRunData": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "translation-run" ] }, "data": { "type": "object", "properties": { "progress": { "type": "number", "description": "The progress of the translation run, between 0 and 100." }, "startedAt": { "$ref": "#/components/schemas/Timestamp" }, "updatedAt": { "$ref": "#/components/schemas/Timestamp" } }, "required": [ "progress", "startedAt", "updatedAt" ] } }, "required": [ "channel", "data" ] }, "APIChannelImportRunData": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "import-run" ] }, "data": { "$ref": "#/components/schemas/ContentImportRun" } }, "required": [ "channel", "data" ] }, "APIChannelGitSyncOperationData": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "space-gitsync-operation" ] }, "data": { "$ref": "#/components/schemas/GitSyncSpaceOperation" } }, "required": [ "channel", "data" ] }, "APIChannelGitSyncSiteOperationData": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "site-gitsync-operation" ] }, "data": { "$ref": "#/components/schemas/GitSyncSiteOperation" } }, "required": [ "channel", "data" ] }, "APIChannelMutationData": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "*" ] }, "data": { "type": "object", "description": "Data passed on the channels associated to API endpoints.", "properties": { "executionId": { "type": "string", "description": "ID of the API execution that triggered the mutation." } }, "required": [ "executionId" ] } }, "required": [ "channel", "data" ] }, "APIChannelData": { "description": "Data passed through a realtime channel", "oneOf": [ { "$ref": "#/components/schemas/APIChannelGitSyncOperationData" }, { "$ref": "#/components/schemas/APIChannelGitSyncSiteOperationData" }, { "$ref": "#/components/schemas/APIChannelTranslationRunData" }, { "$ref": "#/components/schemas/APIChannelImportRunData" }, { "$ref": "#/components/schemas/APIChannelMutationData" } ], "discriminator": { "propertyName": "channel" } }, "CustomizationThemeMode": { "type": "string", "enum": [ "light", "dark" ] }, "SiteAdaptiveDeterministicJSONSchemaClaimsProperties": { "oneOf": [ { "$ref": "#/components/schemas/SiteAdaptiveDeterministicJSONSchemaPrimitives" }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "object" ] }, "description": { "type": "string" }, "properties": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/SiteAdaptiveDeterministicJSONSchemaClaimsProperties" } }, "additionalProperties": { "type": "boolean", "enum": [ false ] } }, "required": [ "type", "description", "properties", "additionalProperties" ], "additionalProperties": false } ] }, "SiteAdsStatus": { "type": "string", "description": "The status of ads on the site", "enum": [ "pending", "in-review", "live", "rejected", "disabled" ] }, "SiteQuestionAnswerSourceType": { "type": "string", "description": "Source type used to answer a site question.", "enum": [ "page", "record" ] }, "Seat": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "seat" ] }, "organization": { "description": "The unique ID of the organization", "type": "string" }, "member": { "description": "The unique ID of the organization member", "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "organization", "member", "createdAt", "updatedAt" ] }, "AgentStreamMessages": { "type": "object", "description": "Payload emitted by the agent to reset the messages.\n", "properties": { "type": { "type": "string", "enum": [ "messages" ] }, "operation": { "type": "string", "enum": [ "append", "replace" ] }, "messages": { "type": "array", "items": { "$ref": "#/components/schemas/AIMessage" } } }, "required": [ "type", "operation", "messages" ] }, "AgentStreamMessageResponse": { "type": "object", "description": "Payload emitted by the agent with a partial message.\n", "properties": { "type": { "type": "string", "enum": [ "message_response" ] }, "response": { "$ref": "#/components/schemas/AIStreamResponse" } }, "required": [ "type", "response" ] }, "AgentStatus": { "type": "string", "enum": [ "idle", "processing", "errored" ] }, "AgentQueuedMessage": { "type": "object", "description": "A message waiting for the agent's current response to finish, held in the order it will be processed. The identifier addresses the entry to remove it from the queue or run it immediately.\n", "properties": { "id": { "type": "string", "description": "Identifier of the queue entry, unique within the conversation." }, "message": { "$ref": "#/components/schemas/AIMessageInput" }, "queuedAt": { "type": "string", "format": "date-time", "description": "When the message entered the queue." } }, "required": [ "id", "message", "queuedAt" ] }, "AgentActivity": { "type": "object", "description": "Describes what the agent is currently doing while processing, used to display a live activity indicator in the conversation.\n", "properties": { "type": { "type": "string", "description": "The kind of activity the agent is currently performing. `thinking` while it reasons or decides on a next action, `tool` while it runs a tool, and `responding` while it writes its answer.\n", "enum": [ "thinking", "tool", "responding" ] }, "tool": { "type": "string", "description": "When `type` is `tool`, the name of the tool being called (matches `AIToolCall.tool`).\n" }, "label": { "type": "string", "description": "What to show the user instead of a label derived from `tool`, for a tool whose name means nothing to them — an MCP server's, say, where it reads \"Searching documentation\".\n" } }, "required": [ "type" ] }, "AgentQuestionOption": { "type": "object", "description": "An option the user can pick when answering a question asked by the agent.", "properties": { "label": { "type": "string", "description": "Short label for the option, displayed as a button and used as the answer." }, "description": { "type": "string", "description": "Optional longer description to clarify what the option means." } }, "required": [ "label" ] }, "AgentPendingQuestion": { "type": "object", "description": "A question the agent is waiting for the user to answer. While set, the client replaces the prompt with a choice control. The user can pick one of the options or answer with a custom free-text message; either way the answer resolves the pending tool call.\n", "properties": { "toolCallId": { "type": "string", "description": "ID of the tool call this question resolves, used to continue the conversation." }, "question": { "type": "string", "description": "The question to display to the user." }, "options": { "type": "array", "description": "The options the user can choose from.", "items": { "$ref": "#/components/schemas/AgentQuestionOption" } } }, "required": [ "toolCallId", "question", "options" ] }, "AgentEditTarget": { "type": "object", "description": "Where the agent's content edits land. Usually a change request, which is how published content is changed; a space whose live edits are unlocked is the exception, and is edited in place. Carries identifiers only: the client resolves the change request's number and subject, or the space's title, through the API.\n", "properties": { "spaceId": { "type": "string", "description": "The ID of the space the edits are made in." }, "changeRequestId": { "type": "string", "description": "The ID of the change request the edits are made in. Absent when the space itself is the target, through its unlocked live edits.\n" } }, "required": [ "spaceId" ] }, "AgentEditScope": { "type": "string", "description": "Steering on how far an agent should reach when it changes content.\nOnly `read-only` is a hard boundary: the editing tools are not given to the agent, so it cannot change content whatever it is asked. The other values are guidance the agent follows — they steer where the work belongs. Agents can still make small edits elsewhere when the change it was asked for would otherwise leave the documentation broken (e.g. an inbound link to a page it renamed).\n`all` sets no specific focus, which is the default. `read-only` reads, searches and comments without editing. `current-page` focuses on the page the user is on and its subpages. `modified-pages` focuses on the pages a change request has already touched.\n", "enum": [ "all", "read-only", "current-page", "modified-pages" ] }, "AgentBackgroundAgentStatus": { "type": "string", "description": "What became of a background agent.\n`running` while it works, `completed` when it reported its result, `failed` when it crashed without recovering or its request was refused, and `stopped` when someone stopped it.\n", "enum": [ "running", "completed", "failed", "stopped" ] }, "AgentBackgroundAgent": { "type": "object", "description": "A background agent of the conversation: a child running one task on its own. Carries what a client shows about it and nothing of what it produced — the report it writes goes to the agent that started it, and its transcript is read by opening its conversation.\n", "properties": { "id": { "type": "string", "description": "Identifier of the background agent within the conversation that started it." }, "conversationId": { "type": "string", "description": "The child conversation holding its transcript, which can only be read." }, "title": { "type": "string", "description": "A few words naming what it is doing, for a tab and a line of a transcript." }, "task": { "type": "string", "description": "The task it was given." }, "status": { "$ref": "#/components/schemas/AgentBackgroundAgentStatus" }, "startedAt": { "type": "string", "format": "date-time", "description": "When it was started." }, "finishedAt": { "type": "string", "format": "date-time", "description": "When it stopped running. Absent while it still runs." }, "error": { "type": "string", "description": "Why it failed, when it did." } }, "required": [ "id", "conversationId", "title", "task", "status", "startedAt" ] }, "AgentState": { "type": "object", "properties": { "status": { "$ref": "#/components/schemas/AgentStatus" }, "suggestions": { "type": "array", "description": "List of response suggestions for the user to select from.", "items": { "type": "string" } }, "queuedMessages": { "type": "array", "description": "List of messages sent by the users queued to processed. Superseded by `queue`, which carries the same messages with the identifiers needed to act on them; kept for compatibility with clients that predate it.\n", "items": { "$ref": "#/components/schemas/AIMessageInput" } }, "queue": { "type": "array", "description": "Messages waiting for the current response to finish, in the order they will be processed.\n", "items": { "$ref": "#/components/schemas/AgentQueuedMessage" } }, "activity": { "$ref": "#/components/schemas/AgentActivity", "description": "What the agent is currently doing. Only set while the agent is processing.\n" }, "pendingQuestion": { "$ref": "#/components/schemas/AgentPendingQuestion", "description": "A question the agent is waiting for the user to answer. While set, the client replaces the prompt with a choice control.\n" }, "editTarget": { "$ref": "#/components/schemas/AgentEditTarget", "description": "Where the agent currently edits content. Absent until something is attached: the organization agent starts read-only, while a change request agent always edits the change request it belongs to.\n" }, "editScope": { "$ref": "#/components/schemas/AgentEditScope", "description": "How far this conversation should reach when it changes content.\n" }, "backgroundAgents": { "type": "array", "description": "The background agents this conversation has started, oldest first. Present on every state event so a client can render each one's live status against the tool call that started it.\n", "items": { "$ref": "#/components/schemas/AgentBackgroundAgent" } }, "consultOnly": { "type": "boolean", "description": "Whether this conversation can only be read. Set on a transcript the agent produced on its own — an agent review — which is published for its requester to consult rather than to be continued: the client shows no composer and the agent refuses a message sent to it anyway.\n" } }, "required": [ "status", "suggestions", "queuedMessages" ] }, "AgentStreamState": { "type": "object", "description": "Payload emitted by the agent with its current state.\n", "properties": { "type": { "type": "string", "enum": [ "state" ] }, "state": { "$ref": "#/components/schemas/AgentState" } }, "required": [ "type", "state" ] }, "AgentStreamRPC": { "type": "object", "description": "Payload emitted by the agent is responding to a RPC call.\n", "properties": { "type": { "type": "string", "enum": [ "rpc" ] }, "message": { "oneOf": [ { "type": "string" }, { "type": "object" } ] } }, "required": [ "type", "message" ] }, "AgentStream": { "oneOf": [ { "$ref": "#/components/schemas/AgentStreamMessages" }, { "$ref": "#/components/schemas/AgentStreamMessageResponse" }, { "$ref": "#/components/schemas/AgentStreamState" }, { "$ref": "#/components/schemas/AgentStreamRPC" } ] }, "MergeRulesEvaluationContext": { "type": "object", "description": "Context available when evaluating merge rules expressions.", "properties": { "space": { "$ref": "#/components/schemas/Space" }, "changeRequest": { "$ref": "#/components/schemas/ChangeRequest" }, "reviews": { "description": "The reviews posted on the change request.", "type": "array", "items": { "$ref": "#/components/schemas/ChangeRequestReview" } }, "actor": { "description": "The user who is attempting to merge the change request.", "$ref": "#/components/schemas/User" } }, "required": [ "space", "changeRequest", "reviews", "actor" ] }, "LocalizedContentRef": { "description": "Localized content reference, keyed by locale. Contains overrides for non-default languages only.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/ContentRef" }, "propertyNames": { "$ref": "#/components/schemas/TranslationLanguage" } }, "RequestSpaceTrackPageView": { "$ref": "#/components/schemas/SpaceTrackPageView" }, "RequestSiteTrackPageView": { "$ref": "#/components/schemas/SiteTrackPageView" }, "RequestPublishIntegration": { "$ref": "#/components/schemas/PublishIntegration" }, "RequestUpdateIntegrationInstallation": { "$ref": "#/components/schemas/UpdateIntegrationInstallation" }, "RequestUpdateIntegrationSpaceInstallation": { "$ref": "#/components/schemas/UpdateIntegrationSpaceInstallation" }, "RequestUpdateIntegrationSiteInstallation": { "$ref": "#/components/schemas/UpdateIntegrationSiteInstallation" }, "RequestCreateIntegrationOAuthTransaction": { "$ref": "#/components/schemas/CreateIntegrationOAuthTransaction" }, "RequestConsumeIntegrationOAuthTransaction": { "$ref": "#/components/schemas/ConsumeIntegrationOAuthTransaction" }, "RequestConfirmIntegrationOAuthTransaction": { "$ref": "#/components/schemas/ConfirmIntegrationOAuthTransaction" }, "RequestUpgradeOrganizationBilling": { "$ref": "#/components/schemas/UpgradeOrganizationBilling" }, "RequestInviteUsersToOrganization": { "$ref": "#/components/schemas/InviteUsersToOrganization" }, "RequestImportGitRepository": { "$ref": "#/components/schemas/ImportGitRepository" }, "RequestExportToGitRepository": { "$ref": "#/components/schemas/ExportToGitRepository" }, "RequestCreateSpace": { "$ref": "#/components/schemas/CreateSpace" }, "RequestRenderIntegrationUI": { "$ref": "#/components/schemas/RenderIntegrationUI" }, "RequestUpdateContentPublishingAuth": { "$ref": "#/components/schemas/UpdateContentPublishingAuth" }, "RequestCreateOrganization": { "$ref": "#/components/schemas/CreateOrganization" }, "RequestUpdateSpaceGitInfo": { "$ref": "#/components/schemas/UpdateSpaceGitInfo" }, "RequestPurgeCDNCacheContext": { "$ref": "#/components/schemas/PurgeCDNCacheContext" }, "DocumentTextBackgroundColor": { "$ref": "#/components/schemas/DocumentTextColor" }, "SpaceVisitorAuth": { "$ref": "#/components/schemas/VisitorAuth" }, "SpaceVisitorAuthCustomBackend": { "$ref": "#/components/schemas/VisitorAuthCustomBackend" }, "SpaceVisitorAuthIntegrationBackend": { "$ref": "#/components/schemas/VisitorAuthIntegrationBackend" }, "IngegrationPropertyTitle": { "$ref": "#/components/schemas/IntegrationPropertyTitle" }, "UserPermissions": { "$ref": "#/components/schemas/_index" }, "SiteRedirectDestinationSpace": { "$ref": "#/components/schemas/SiteRedirectDestinationSiteSpace" }, "OpenAPISpecSourceURL": { "$ref": "#/components/schemas/URL" } }, "responses": { "NotFoundError": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "enum": [ 404 ] }, "message": { "type": "string" } }, "required": [ "code", "message" ] } } } } } }, "BadRequestError": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "enum": [ 400 ] }, "message": { "type": "string" } }, "required": [ "code", "message" ] } } } } } }, "ConflictError": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "enum": [ 409 ] }, "message": { "type": "string" } }, "required": [ "code", "message" ] } } } } } }, "PreconditionFailedError": { "description": "PreconditionFailed", "content": { "application/json": { "schema": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "enum": [ 412 ] }, "message": { "type": "string" } }, "required": [ "code", "message" ] } } } } } }, "ForbiddenError": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "enum": [ 403 ] }, "message": { "type": "string" } }, "required": [ "code", "message" ] } } } } } }, "UnauthorizedError": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "enum": [ 401 ] }, "message": { "type": "string" } }, "required": [ "code", "message" ] } } } } } }, "UnexpectedError": { "description": "Unexpected Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "FeatureNotAvailableError": { "description": "The requested feature is not available on the organization's or site's current plan.\nThe operation was not performed. The `error.type` value `feature-not-available`\nidentifies this response; `error.upgrade` provides the requirements for upgrading.\n", "content": { "application/json": { "schema": { "description": "`error.upgrade` identifies the unavailable feature, the minimum required\nplan, and the URL of the relevant plan settings.\n\n`error.upgrade.requiredPlanName` is the human-readable plan name, such as\n\"Pro\", \"Essential\", or \"Ultimate\", suitable for display to users.\n`error.upgrade.requiredPlan` is the internal plan identifier for\nprogrammatic use, such as \"pro_2024\" or \"premium\".\n\nThe required plan describes feature availability, not a price quote.\n\n`getOrganizationSubscription` (`GET /orgs/{organizationId}/subscription`)\nprovides the current plan and `canManageBilling`, which indicates whether\nthe caller can manage billing. Otherwise, an organization administrator\nmust perform the upgrade. Upgrades require billing permissions and approval\nof any price or billing changes.\n\nThe original operation can be retried after the upgrade is complete.\n", "type": "object", "required": [ "error" ], "properties": { "error": { "type": "object", "properties": { "type": { "description": "Identifies the FeatureNotAvailableError response in the OpenAPI spec.", "type": "string", "enum": [ "feature-not-available" ] }, "code": { "type": "integer", "format": "int32", "enum": [ 403 ] }, "message": { "type": "string" }, "upgrade": { "$ref": "#/components/schemas/FeatureUpgradeRequirement" } }, "required": [ "type", "code", "message", "upgrade" ] } } } } } } }, "headers": { "returnPreferenceApplied": { "description": "Confirms that the requested minimal response preference was applied.", "schema": { "type": "string", "enum": [ "return=minimal" ] } } } } }</b> <p><a href='https://api.gitbook.com/openapi.json'>direct link</a> <p>Domain: <a href='https://domain.db.renenyffenegger.ch/search?q=api.gitbook.com'>api.gitbook.com</a> <p>IPv4 address: <a href='https://ip.db.renenyffenegger.ch/ip4?ip=104.18.41.89'>104.18.41.89</a> <p><b>Links</b>: <hr><b>Response headers</b>: <table> <tr><td>Server</td><td>cloudflare</td></tr> <tr><td>Content-Type</td><td>application/json; charset=UTF-8</td></tr> <tr><td>X-Powered-By</td><td>GitBook</td></tr> <tr><td>Cache-Control</td><td>private, max-age=3600</td></tr> <tr><td>Last-Modified</td><td>Tue, 24 Nov 2026 18:19:04 GMT</td></tr> </table> <hr> URLs of <a href='/known-crawlers'>crawlers that visited me</a>.