How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

GitBook Space Content API

Manage pages and content within a space.

GitBook Space Content API is one of 65 APIs that GitBook publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

This API exposes 7 JSON Schema definitions.

Tagged areas include Space Content. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an AsyncAPI specification, a JSON-LD context, and 7 JSON Schemas.

This API exposes 25 operations across 25 paths, and defines 215 schemas. It is described by OpenAPI 3.2.0, at version 0.0.1-beta.

Requests are made against a single base URL, {host}/v1.

25 operations 25 paths 215 schemas 22 GET3 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.2.0
API Version
0.0.1-beta
Server
{host}/v1
Authentication
HTTP Bearer, HTTP Bearer, HTTP Bearer, HTTP Bearer, HTTP Bearer, OAuth 2.0
Terms of Service
Resource Areas
1

Authentication & Security 6

GitBook Space Content API declares 6 security schemes for authenticating requests. It accepts HTTP bearer tokens (user). It accepts HTTP bearer tokens (user-internal). It accepts HTTP bearer tokens (user-staff). It accepts HTTP bearer tokens (integration). It accepts HTTP bearer tokens (integration-installation). It supports OAuth 2.0 (oauth) using the authorizationCode flow, exposing 29 scopes. By default, every request must be authenticated.

Paths & Operations 25

Across 25 paths, the API surfaces 25 operations — 22 GET, 3 POST. Each is listed below with its method, path, parameters, and response codes.

space-content 25

Handle your space content programmatically by creating, updating, or listing pages and files. Ideal for bulk operations or synchronizing with external systems.

GET
/spaces/{spaceId}/search
Full-text search across all pages in a space
searchSpaceContent 4 params → 200
GET
/spaces/{spaceId}/content
Get the current published content revision of a space
getCurrentRevision 3 params → 200
POST
/spaces/{spaceId}/content/template
Apply a content template to populate a space with initial pages
applyTemplateToSpace 1 param body → 201
GET
/spaces/{spaceId}/content/pages
List all pages in a space with their hierarchy and metadata
listPages 3 params → 200
GET
/spaces/{spaceId}/content/files
List all uploaded files and assets in a space
listFiles 5 params → 200
GET
/spaces/{spaceId}/content/files/{fileId}
Get a specific uploaded file from a space by its ID
getFileById 4 params → 200
GET
/spaces/{spaceId}/content/page/{pageId}
Get a single page from a space by its ID
getPageById 8 params → 200
GET
/spaces/{spaceId}/content/page/{pageId}/meta-links
Get navigation metadata links for a page (previous, next, parent)
listSpacePageMetaLinks 2 params → 200
GET
/spaces/{spaceId}/content/path/{pagePath}
Get a page from a space by its URL path
getPageByPath 9 params → 200
GET
/spaces/{spaceId}/content/reusable-contents/{reusableContentId}
Get a reusable content block from a space by its ID
getReusableContentById 4 params → 200
POST
/spaces/{spaceId}/content/computed/document
Compute and render a document from a structured content source
getComputedDocument 2 params body → 200
POST
/spaces/{spaceId}/content/computed/revision
Compute and render a full revision from a structured content source
getComputedRevision 1 param body → 200
GET
/spaces/{spaceId}/documents/{documentId}
Get a raw document from a space by its document ID
getDocumentById 3 params → 200
GET
/spaces/{spaceId}/revisions/{revisionId}
Get a specific historical revision of a space
getRevisionById 4 params → 200
GET
/spaces/{spaceId}/revisions/{revisionId}/changes
Get semantic content changes introduced by a revision
getRevisionSemanticChanges 5 params → 200
GET
/spaces/{spaceId}/revisions/{revisionId}/pages
List all pages in a specific historical revision of a space
listPagesInRevisionById 4 params → 200
GET
/spaces/{spaceId}/revisions/{revisionId}/files
List all files (images, assets) in a specific space revision
listFilesInRevisionById 6 params → 200
GET
/spaces/{spaceId}/revisions/{revisionId}/files/{fileId}
Get a specific file from a space revision by its file ID
getFileInRevisionById 5 params → 200
GET
/spaces/{spaceId}/revisions/{revisionId}/page/{pageId}
Get a page from a specific historical revision by its page ID
getPageInRevisionById 9 params → 200
GET
/spaces/{spaceId}/revisions/{revisionId}/page/{pageId}/document
Get the raw document body of a page in a historical revision
getPageDocumentInRevisionById 5 params → 200
GET
/spaces/{spaceId}/revisions/{revisionId}/path/{pagePath}
Get a page from a specific historical revision by its URL path
getPageInRevisionByPath 10 params → 200
GET
/spaces/{spaceId}/revisions/{revisionId}/page/{pageId}/meta-links
List all meta links (prev/next navigation) for a page in a revision
listRevisionPageMetaLinks 3 params → 200
GET
/spaces/{spaceId}/revisions/{revisionId}/reusable-contents/{reusableContentId}
Get a reusable content block from a historical revision by its ID
getReusableContentInRevisionById 5 params → 200
GET
/spaces/{spaceId}/revisions/{revisionId}/reusable-contents/{reusableContentId}/document
Get the document body of a reusable content block in a historical revision
getReusableContentDocumentInRevisionById 5 params → 200
GET
/spaces/{spaceId}/pdf
Get a temporary URL to download a space or page as PDF
getSpacePDF 3 params → 200

Schemas 215

The contract defines 215 schemas that model the data the API accepts and returns. The most detailed are ChangeRequest (26 properties), ContentImportRun (14 properties), RevisionPageLayoutOptions (13 properties), RevisionBase (11 properties). Each schema is shown below with its type and property counts.

RevisionPageLayoutOptionsCoverMask
string
Mask applied to the cover image.
ChangeRequestChangeCounts
object
Exact semantic entity and page-document block counts for a change request at its current head and base revisions.
4 properties 2 required
SearchPageResult
object
Search result representing a page in a space.
10 properties 8 required
RevisionSemanticChanges
object
3 properties 1 required
RevisionSemanticChangeVariablesEdited
object
2 properties 2 required
DocumentBlockDivider
object
5 properties 4 required
RevisionSemanticChangeReusableContentCreated
object
2 properties 2 required
RevisionPageLayoutPreset
string
The core layout presets for a page.
RevisionPageDocumentChangeAttributes
object
8 properties
ComputedContentSourceRevision
DocumentBlockIf
object
6 properties 4 required
MarkdownDocument
object
1 property 1 required
ContentRefPage
object
3 properties 2 required
DocumentBlockDrawing
object
6 properties 4 required
CardsImageObjectFit
string
Object fit for image display in card views
DocumentBlocksEssentials
DocumentTableDefinitionCheckbox
DocumentFragment
object
5 properties 2 required
DocumentInlineExpression
object
5 properties 4 required
DocumentTableDefinitionUsers
DocumentBlockStepper
object
6 properties 3 required
ContentRef
A relative reference to content in GitBook.
RevisionReusableContentChangeAttributes
object
2 properties
DocumentText
object
3 properties 2 required
DocumentMarkBold
object
2 properties 2 required
ComputedContentDependencySpace
object
2 properties 2 required
ContentRefURL
object
2 properties 2 required
DocumentBlockHint
object
6 properties 4 required
DocumentInlineIcon
object
5 properties 4 required
DocumentTableDefinitionSelect
RevisionPage
DocumentBlockFile
object
6 properties 4 required
DocumentBlockIntegration
object
6 properties 4 required
RevisionTag
URL
string
RevisionSemanticChangeReusableContentEdited
object
3 properties 3 required
DocumentBlock
RevisionSemanticChangeFileCreated
object
2 properties 2 required
DocumentInlineAnnotation
object
7 properties 5 required
ComputedContentSourceRevisionOpenAPI
DocumentBlocksTopLevels
GitSyncCommit
object
5 properties 3 required
DocumentBlockEmbed
object
6 properties 4 required
DocumentBlockReusableContent
object
6 properties 4 required
RevisionSemanticChangeTagCreated
object
2 properties 2 required
DocumentTableDefinitionFiles
DocumentMarkSubscript
object
2 properties 2 required
ContentRefTag
object
3 properties 2 required
RevisionPageComputed
OpenAPIWebhookPointer
object
Pointer to a webhook in the OpenAPI spec.
2 properties 2 required
DocumentBlockOpenAPI
object
6 properties 4 required
ContentRefCollection
object
2 properties 2 required
RevisionSemanticChangeTagEdited
object
3 properties 3 required
RevisionPageBase
object
8 properties 2 required
RevisionPageLayoutOptionsCoverSize
string
Size of the cover image.
ComputedContentDependency
object
Dependency for a computation, before its resolution.
1 property 1 required
RevisionPageLinkChangeAttributes
object
3 properties
DocumentTableDefinitionContentRef
ComputedContentDependencyTranslation
object
2 properties 2 required
DocumentBlockQuote
object
6 properties 3 required
RevisionSemanticChangePageMoved
object
3 properties 3 required
RevisionPageMetaLinkTarget
ChangeRequestChangeCountsByType
object
Counts of entities grouped by how they changed relative to the change request base.
3 properties 3 required
TranslationResult
object
Result of a translation.
3 properties 3 required
ChangedRevisionFile
object
4 properties 4 required
ApplySpaceTemplate
object
2 properties 1 required
ChangeRequestLinks
array
External links associated with the change request.
RevisionFileImageDimensions
object
2 properties 2 required
DocumentBlockTable
object
6 properties 5 required
RevisionSemanticChange
RevisionPageTag
object
A reference to a tag with optional primary flag for page-level tags.
2 properties 1 required
GitSyncBlob
object
2 properties 2 required
DocumentAction
object
Action to perform when an inline button is clicked.
DocumentBlockTabs
object
6 properties 3 required
DocumentBlockParagraph
object
6 properties 3 required
DocumentInlineEmoji
object
5 properties 4 required
ContentImportSource
DocumentMarkKeyboard
object
2 properties 2 required
RevisionPageType
string
RevisionPageDocumentCoverTextColor
string
DocumentTableSelectOption
object
3 properties 3 required
DocumentTableCellSpan
integer
Number of rows or columns covered by a table cell merge
RevisionPageMetaLinks
object
2 properties
RevisionPageLayoutOptions
object
13 properties 13 required
DocumentTableCellMerge
object
Positional table cell merge range. The anchor and spans are resolved against the current sorted record order and visible column order. The current document mod…
3 properties 3 required
ContentImportTarget
object
3 properties 1 required
ChangeRequestLinkInput
object
External link associated with a change request.
3 properties 1 required
DocumentBlockListUnordered
object
6 properties 3 required
ComputedContentSourceDocumentOpenAPI
DocumentBlockHeading
object
7 properties 4 required
ComputedContentSourceDocument
OpenAPIOperationPointer
object
Pointer to an operation in the OpenAPI spec.
2 properties 2 required
RevisionTagChangeAttributes
object
1 property
RevisionFileChangeAttributes
object
5 properties
DocumentInlineMath
object
5 properties 4 required
OpenAPISpecVisibility
string
The visibility setting of the OpenAPI spec. private: The spec is not publicly available. public: The spec is available to anyone with a public link.
DocumentBlockOpenAPISchemas
object
6 properties 4 required
PlainObject
DocumentTableDefinitionRating
DocumentTextLeaf
object
3 properties 3 required
DocumentMarkStrikethrough
object
2 properties 2 required
Revision
ChangeAttributeVariables
object
2 properties
ChangeRequestLinkExpanded
External ticket data resolved for this link by a configured connector.
DocumentBlockPrompt
object
6 properties 4 required
DocumentBlockExpandable
object
7 properties 5 required
Icon
string
Name of the icon
DocumentTableDefinition
ContentRefUser
object
2 properties 2 required
DocumentBlockOpenAPIWebhook
object
6 properties 4 required
ChangeAttributeNumber
object
2 properties
DocumentInlineMention
object
5 properties 4 required
RevisionSemanticChangeFileEdited
object
3 properties 3 required
RevisionPageDocumentCover
object
6 properties 1 required
ChangedRevisionTag
object
2 properties 2 required
DocumentMarkSuperscript
object
2 properties 2 required
RevisionPageLink
DocumentBlockUpdates
object
6 properties 4 required
ContentKitDefaultAction
DocumentBlockCode
object
6 properties 4 required
DocumentInlineImage
object
5 properties 4 required
DocumentTableDefinitionNumber
ContentRefAnchor
object
4 properties 2 required
Timestamp
string
ComputedContentSourceDocumentTranslation
object
Parameters for a document translation computed content source
3 properties 3 required
DocumentTableDefinitionText
SearchResultScore
number
Relevance score for a search result. Higher is better and the score is unbounded.
DocumentBlockCodeLine
object
6 properties 4 required
Variables
object
ChangeRequestStatus
string
RevisionTypeUpdate
ContentKitAction
RevisionPageDocument
JSONDocument
object
4 properties 3 required
DocumentBlockUpdate
object
6 properties 4 required
DocumentBlockImages
object
6 properties 5 required
TextAlignment
string
ContentRefFile
object
3 properties 2 required
DocumentBlockListTasks
object
6 properties 3 required
OpenAPISchemasPointer
object
Pointer to schemas in the OpenAPI spec.
3 properties 1 required
List
object
2 properties
DocumentBlockColumns
object
6 properties 5 required
RevisionPageSlug
string
Page's slug in its direct parent
DocumentMarkCode
object
2 properties 2 required
TranslationLanguage
string
DocumentTableImageRecord
A table record value for image columns, supporting both direct ContentRefs and the additional format with record-level settings.
VerticalAlignment
string
ChangeAttributeRevisionPageDocumentCover
object
2 properties
RevisionPageGroup
DocumentBlockStepperStep
object
6 properties 4 required
DocumentBlockImage
object
6 properties 5 required
ChangeAttributeRevisionPageLayout
object
2 properties
VariableValue
RevisionSemanticChangePageDeleted
object
2 properties 2 required
RevisionTypeComputed
DocumentTableViewCards
object
8 properties 3 required
ChangeRequestSubject
string
Subject of the change request
ChangedRevisionReusableContent
object
3 properties 2 required
RevisionPageGroupChangeAttributes
object
3 properties
ContentRefOpenAPI
object
2 properties 2 required
RevisionSemanticChangeReusableContentDeleted
object
2 properties 2 required
SearchSectionResult
object
Search result representing a section in a page.
7 properties 6 required
ComputedContentSourceIntegration
object
Parameters for a computed content managed by an integration
3 properties 2 required
ChangedRevisionPage
object
4 properties 3 required
ContentRefSpace
object
2 properties 2 required
ContentRefReusableContent
object
3 properties 2 required
ComputedContentDependencyResolved
Dependency for a computation, with its resolved value.
DocumentTableDefinitionBase
object
2 properties 2 required
RevisionBase
object
11 properties 9 required
ChangeRequestLinkTitle
string
Optional title to display for the link.
RevisionTypeMerge
DocumentBlockTabsItem
object
7 properties 4 required
DocumentBlockColumn
object
6 properties 4 required
ContentImportRun
object
14 properties 2 required
ChangeAttributeContentReference
object
2 properties
DocumentTextMark
RevisionSemanticChangePageCreated
object
2 properties 2 required
ComputedContentDependencyOpenAPI
object
2 properties 2 required
DocumentTableViewGrid
object
7 properties 3 required
RevisionSemanticChangeFileDeleted
object
2 properties 2 required
Document
DocumentMarkColor
object
3 properties 3 required
ChangeAttributeRevisionFileImageDimensions
object
2 properties
RevisionFile
object
7 properties 5 required
DocumentTableRecord
object
2 properties 2 required
DocumentBlockOpenAPIOperation
object
6 properties 4 required
EntityId
string
A unique entity identifier
ComputedContentSourceRevisionTranslation
object
Parameters for a translation computed content source
3 properties 3 required
ComputedContentSourceOpenAPIBase
object
Generic parameters from an OpenAPI computed content source
2 properties 2 required
RevisionReusableContent
Emoji
string
Unicode codepoint or character of the emoji
RevisionTypeEdits
DocumentInline
DocumentBlockMath
object
5 properties 4 required
RevisionSemanticChangeTagDeleted
object
2 properties 2 required
RevisionTypeRollback
ChangeRequest
object
26 properties 14 required
ChangeAttributeVariable
object
2 properties
DocumentMarkItalic
object
2 properties 2 required
RevisionSemanticChangePageEdited
object
3 properties 3 required
DocumentBlockContentRef
object
5 properties 4 required
DocumentBlockListItem
object
6 properties 3 required
DocumentTableDefinitionImage
Length
User
object
6 properties 4 required
DocumentTextColor
string
Allowed color tokens for color marks (text and background; background reuses this enum). Named colors are fixed palette keys. $ tokens are semantic: resolved f…
ChangeRequestLink
ChangeAttributeString
object
2 properties
DocumentBlockListOrdered
object
6 properties 4 required
RevisionPageLayout
RevisionPageLayoutOptionsWidth
string
Width of the page.
DocumentInlineLink
object
6 properties 4 required
TranslationRef
object
2 properties 2 required
DocumentInlineButton
object
5 properties 4 required
SpaceTemplateParams
object
Parameters for a space template
1 property

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

gitbook-space-content-api-openapi.yml Raw ↑

Other APIs GitBook publishes across the network.

GitBook Change Request Content API
GitBook Change Request Reviewers API
GitBook Change Requests API
GitBook Collections API
GitBook Custom Hostnames API
GitBook Imports API
GitBook Integrations API
GitBook Organization Members API
GitBook Organizations API
GitBook Site Spaces API
GitBook Spaces API
GitBook URLs API
Where this information came from

This is an independent, third-party profile of GitBook Space Content API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.