Space content
Import, export, and search content in a space.
Last updated
Was this helpful?
Import, export, and search content in a space.
Last updated
Was this helpful?
Was this helpful?
Handle your space content programmatically by creating, updating, or listing pages and files. Ideal for bulk operations or synchronizing with external systems.
The unique id of the space
Identifier of the page results to fetch.
The number of results per page
OK
OK
The unique id of the space
If false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.
trueIf false is passed, content will not be computed
trueOK
OK
The unique id of the space
If false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.
trueIf false is passed, content will not be computed
trueOK
OK
The unique id of the space
Identifier of the page results to fetch.
The number of results per page
If false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.
trueIf false is passed, content will not be computed
trueOK
OK
The unique id of the space
The unique id of the file
If false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.
trueIf false is passed, content will not be computed
trueOK
OK
The unique id of the space
The unique id of the file
Identifier of the page results to fetch.
The number of results per page
OK
OK
The unique id of the space
The unique id of the page
Output format for the content.
Controls whether the document should be evaluated.
true, the entire document will be evaluated.deterministic-only, only expressions that depend
exclusively on deterministic inputs will be evaluated.falseIf false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.
trueIf false is passed, content will not be computed
trueOK
The unique id of the space
The unique id of the page
Identifier of the page results to fetch.
The number of results per page
Text to display to represent the reference. Possible values include:
ok - No problems detected for this content reference.broken - The target does not exist in the revision.in-app - The target is a URL link pointing to an internal location in the app.OK
OK
The unique id of the space
The unique id of the page
Identifier of the page results to fetch.
The number of results per page
OK
OK
The unique id of the space
The path of the page in the revision.
Output format for the content.
Controls whether the document should be evaluated.
true, the entire document will be evaluated.deterministic-only, only expressions that depend
exclusively on deterministic inputs will be evaluated.falseIf false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.
trueIf false is passed, content will not be computed
trueOK
The unique id of the space
The unique id of the reusable content
If false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.
trueIf false is passed, content will not be computed
trueOK
OK
The unique id of the space
Version of the schema used for the document.
Seed to use for the generation of IDs.
Document computed
The unique id of the space
ID of the document in the space
Version of the schema used for the document.
Document
Document
The unique id of the space
The unique id of the revision
If false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.
trueIf false is passed, content will not be computed
trueOK
OK
Return the semantic changes between a revision and its parent.
The unique id of the space
The unique id of the revision
If false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.
trueIf false is passed, content will not be computed
trueLimit the number of changes returned
10OK
The unique id of the space
The unique id of the revision
If false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.
trueIf false is passed, content will not be computed
trueOK
OK
The unique id of the space
The unique id of the revision
Identifier of the page results to fetch.
The number of results per page
If false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.
trueIf false is passed, content will not be computed
trueOK
OK
The unique id of the space
The unique id of the revision
The unique id of the file
If false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.
trueIf false is passed, content will not be computed
trueOK
OK
The unique id of the space
The unique id of the revision
The unique id of the page
Output format for the content.
Controls whether the document should be evaluated.
true, the entire document will be evaluated.deterministic-only, only expressions that depend
exclusively on deterministic inputs will be evaluated.falseIf false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.
trueIf false is passed, content will not be computed
trueOK
The unique id of the space
The unique id of the revision
The unique id of the page
Controls whether the document should be evaluated.
true, the entire document will be evaluated.deterministic-only, only expressions that depend
exclusively on deterministic inputs will be evaluated.falseOK
OK
The unique id of the space
The unique id of the revision
The path of the page in the revision.
Output format for the content.
Controls whether the document should be evaluated.
true, the entire document will be evaluated.deterministic-only, only expressions that depend
exclusively on deterministic inputs will be evaluated.falseIf false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.
trueIf false is passed, content will not be computed
trueOK
The unique id of the space
The unique id of the revision
The unique id of the reusable content
If false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.
trueIf false is passed, content will not be computed
trueOK
OK
The unique id of the space
The unique id of the revision
The unique id of the reusable content
Controls whether the document should be evaluated.
true, the entire document will be evaluated.deterministic-only, only expressions that depend
exclusively on deterministic inputs will be evaluated.falseOK
The unique id of the space
Generate a PDF only for the provided page.
ID of a specific page to generate a PDF for.
URL of the PDF
URL of the PDF
Template applied to space.
No content
OK
{
"id": "text",
"title": "text",
"emoji": "🎉",
"icon": "gear",
"createdAt": "2025-11-16T19:04:30.239Z",
"updatedAt": "2025-11-16T19:04:30.239Z",
"markdown": "text",
"type": "document",
"urls": {
"app": "https://example.com"
},
"slug": "text",
"path": "text",
"description": "text",
"pages": [
"[Circular Reference]"
],
"git": {
"oid": "text",
"path": "text"
},
"layout": {
"width": "default",
"cover": true,
"coverSize": "hero",
"title": true,
"description": true,
"tableOfContents": true,
"outline": true,
"pagination": true,
"metadata": true
},
"cover": {
"ref": {
"kind": "file",
"file": "text"
},
"refDark": {
"kind": "file",
"file": "text"
},
"yPos": 0,
"height": 240
},
"variables": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"hidden": false,
"noIndex": false,
"noRobotsIndex": false,
"metaLinks": {
"canonical": {
"kind": "page",
"page": "text",
"space": "text"
},
"alternates": [
{
"kind": "page",
"page": "text",
"space": "text"
}
]
},
"computed": {
"type": "builtin:openapi",
"dependencies": {
"spec": {
"ref": {
"kind": "openapi",
"spec": "text"
}
}
},
"props": {
"doc": "models"
}
},
"computedSeed": "text"
}{
"next": {
"page": "text"
},
"count": 1,
"stats": {
"total": 1,
"broken": {
"total": 1,
"changeRequest": 1
}
},
"items": [
{
"status": "ok",
"relation": "reference",
"targetReference": {
"kind": "file",
"organization": {
"object": "organization",
"id": "text",
"title": "text",
"createdAt": "2025-11-16T19:04:30.239Z",
"emailDomains": [
"text"
],
"hostname": "text",
"type": "business",
"useCase": "internalDocs",
"communityType": "nonProfit",
"defaultRole": "admin",
"defaultContent": {
"type": "site",
"site": "text"
},
"sso": true,
"ai": true,
"inviteLinks": true,
"plan": "free_2024",
"billing": {
"interval": "monthly",
"endDate": "2025-11-16T19:04:30.239Z",
"hasPaymentFailed": true,
"isScheduledToCancel": true,
"pricing": {
"members": {
"plus_2024": {
"monthly": 1,
"yearly": 1
},
"pro_2024": {
"monthly": 1,
"yearly": 1
}
},
"sites": {
"premium": {
"monthly": 1,
"yearly": 1
},
"ultimate": {
"monthly": 1,
"yearly": 1
}
}
},
"usageAddons": {
"ANY_ADDITIONAL_PROPERTY": {
"enabled": true
}
}
},
"mergeRules": {
"type": "rules",
"rules": [
{
"rule": "require_specific_reviewers",
"users": [
"text"
]
}
]
},
"urls": {
"location": "https://example.com",
"app": "https://example.com",
"logo": "https://example.com"
},
"trial": {
"status": "notapplicable",
"count": 1,
"endDate": "2025-11-16T19:04:30.239Z",
"decision": "downgrade"
},
"customHostname": "text",
"blocked": {
"source": "backoffice",
"reason": "text"
},
"internal_billingMigration": {
"deadline": "2025-11-16T19:04:30.239Z",
"discountPercent": 1,
"discountEndDate": "2025-11-16T19:04:30.239Z"
},
"permissions": {
"view": true,
"admin": true,
"ownTeam": true,
"createContent": true,
"createOpenAPISpec": true,
"ingestConversations": true,
"viewBilling": true,
"listMembers": true,
"listTeams": true,
"listIntegrations": true,
"listInstallations": true,
"installIntegration": true
}
},
"space": {
"object": "space",
"id": "text",
"title": "text",
"emoji": "🎉",
"visibility": "public",
"createdAt": "2025-11-16T19:04:30.239Z",
"updatedAt": "2025-11-16T19:04:30.239Z",
"deletedAt": "2025-11-16T19:04:30.239Z",
"editMode": "live",
"mergeRules": {
"type": "inherit"
},
"urls": {
"location": "https://example.com",
"app": "https://example.com",
"published": "https://example.com",
"public": "https://example.com",
"icon": "https://example.com"
},
"organization": "text",
"parent": "text",
"language": "en",
"gitSync": {
"repoName": "text",
"installationProvider": "github",
"integration": "text",
"url": "text",
"updatedAt": "2025-11-16T19:04:30.239Z"
},
"visitorAuth": {
"backend": "custom"
},
"revision": "text",
"defaultLevel": "admin",
"comments": 1,
"changeRequests": 1,
"changeRequestsOpen": 1,
"changeRequestsDraft": 1,
"permissions": {
"view": true,
"access": true,
"admin": true,
"viewInviteLinks": true,
"edit": true,
"triggerGitSync": true,
"comment": true,
"merge": true,
"review": true,
"installIntegration": true
}
},
"versionContext": "[Circular Reference]",
"file": {
"id": "text",
"name": "text",
"contentType": "text",
"downloadURL": "text",
"size": 1,
"dimensions": {
"width": 1,
"height": 1
},
"git": {
"oid": "text",
"path": "text"
}
}
},
"locationReferences": [
{
"kind": "file",
"organization": {
"object": "organization",
"id": "text",
"title": "text",
"createdAt": "2025-11-16T19:04:30.239Z",
"emailDomains": [
"text"
],
"hostname": "text",
"type": "business",
"useCase": "internalDocs",
"communityType": "nonProfit",
"defaultRole": "admin",
"defaultContent": {
"type": "site",
"site": "text"
},
"sso": true,
"ai": true,
"inviteLinks": true,
"plan": "free_2024",
"billing": {
"interval": "monthly",
"endDate": "2025-11-16T19:04:30.239Z",
"hasPaymentFailed": true,
"isScheduledToCancel": true,
"pricing": {
"members": {
"plus_2024": {
"monthly": 1,
"yearly": 1
},
"pro_2024": {
"monthly": 1,
"yearly": 1
}
},
"sites": {
"premium": {
"monthly": 1,
"yearly": 1
},
"ultimate": {
"monthly": 1,
"yearly": 1
}
}
},
"usageAddons": {
"ANY_ADDITIONAL_PROPERTY": {
"enabled": true
}
}
},
"mergeRules": {
"type": "rules",
"rules": [
{
"rule": "require_specific_reviewers",
"users": [
"text"
]
}
]
},
"urls": {
"location": "https://example.com",
"app": "https://example.com",
"logo": "https://example.com"
},
"trial": {
"status": "notapplicable",
"count": 1,
"endDate": "2025-11-16T19:04:30.239Z",
"decision": "downgrade"
},
"customHostname": "text",
"blocked": {
"source": "backoffice",
"reason": "text"
},
"internal_billingMigration": {
"deadline": "2025-11-16T19:04:30.239Z",
"discountPercent": 1,
"discountEndDate": "2025-11-16T19:04:30.239Z"
},
"permissions": {
"view": true,
"admin": true,
"ownTeam": true,
"createContent": true,
"createOpenAPISpec": true,
"ingestConversations": true,
"viewBilling": true,
"listMembers": true,
"listTeams": true,
"listIntegrations": true,
"listInstallations": true,
"installIntegration": true
}
},
"space": {
"object": "space",
"id": "text",
"title": "text",
"emoji": "🎉",
"visibility": "public",
"createdAt": "2025-11-16T19:04:30.239Z",
"updatedAt": "2025-11-16T19:04:30.239Z",
"deletedAt": "2025-11-16T19:04:30.239Z",
"editMode": "live",
"mergeRules": {
"type": "inherit"
},
"urls": {
"location": "https://example.com",
"app": "https://example.com",
"published": "https://example.com",
"public": "https://example.com",
"icon": "https://example.com"
},
"organization": "text",
"parent": "text",
"language": "en",
"gitSync": {
"repoName": "text",
"installationProvider": "github",
"integration": "text",
"url": "text",
"updatedAt": "2025-11-16T19:04:30.239Z"
},
"visitorAuth": {
"backend": "custom"
},
"revision": "text",
"defaultLevel": "admin",
"comments": 1,
"changeRequests": 1,
"changeRequestsOpen": 1,
"changeRequestsDraft": 1,
"permissions": {
"view": true,
"access": true,
"admin": true,
"viewInviteLinks": true,
"edit": true,
"triggerGitSync": true,
"comment": true,
"merge": true,
"review": true,
"installIntegration": true
}
},
"versionContext": "[Circular Reference]",
"file": {
"id": "text",
"name": "text",
"contentType": "text",
"downloadURL": "text",
"size": 1,
"dimensions": {
"width": 1,
"height": 1
},
"git": {
"oid": "text",
"path": "text"
}
}
}
]
}
]
}OK
{
"id": "text",
"title": "text",
"emoji": "🎉",
"icon": "gear",
"createdAt": "2025-11-16T19:04:30.239Z",
"updatedAt": "2025-11-16T19:04:30.239Z",
"markdown": "text",
"type": "document",
"urls": {
"app": "https://example.com"
},
"slug": "text",
"path": "text",
"description": "text",
"pages": [
"[Circular Reference]"
],
"git": {
"oid": "text",
"path": "text"
},
"layout": {
"width": "default",
"cover": true,
"coverSize": "hero",
"title": true,
"description": true,
"tableOfContents": true,
"outline": true,
"pagination": true,
"metadata": true
},
"cover": {
"ref": {
"kind": "file",
"file": "text"
},
"refDark": {
"kind": "file",
"file": "text"
},
"yPos": 0,
"height": 240
},
"variables": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"hidden": false,
"noIndex": false,
"noRobotsIndex": false,
"metaLinks": {
"canonical": {
"kind": "page",
"page": "text",
"space": "text"
},
"alternates": [
{
"kind": "page",
"page": "text",
"space": "text"
}
]
},
"computed": {
"type": "builtin:openapi",
"dependencies": {
"spec": {
"ref": {
"kind": "openapi",
"spec": "text"
}
}
},
"props": {
"doc": "models"
}
},
"computedSeed": "text"
}Document computed
{
"object": "document",
"data": {
"schemaVersion": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"nodes": [
{
"object": "block",
"type": "paragraph",
"key": "text",
"nodes": [
{
"object": "inline",
"type": "link",
"key": "text",
"nodes": [
{
"object": "text",
"key": "text",
"leaves": [
{
"object": "leaf",
"text": "text",
"marks": [
{
"object": "mark",
"type": "bold"
}
]
}
]
}
],
"data": {
"ref": {
"kind": "file",
"file": "text"
}
},
"isVoid": false
}
],
"isVoid": false,
"data": {
"align": "start"
}
}
]
}Computed pages and files
{
"pages": [
{
"id": "text",
"title": "text",
"emoji": "🎉",
"icon": "gear",
"createdAt": "2025-11-16T19:04:30.239Z",
"updatedAt": "2025-11-16T19:04:30.239Z",
"markdown": "text",
"type": "document",
"urls": {
"app": "https://example.com"
},
"slug": "text",
"path": "text",
"description": "text",
"pages": [
"[Circular Reference]"
],
"git": {
"oid": "text",
"path": "text"
},
"layout": {
"width": "default",
"cover": true,
"coverSize": "hero",
"title": true,
"description": true,
"tableOfContents": true,
"outline": true,
"pagination": true,
"metadata": true
},
"cover": {
"ref": {
"kind": "file",
"file": "text"
},
"refDark": {
"kind": "file",
"file": "text"
},
"yPos": 0,
"height": 240
},
"variables": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"hidden": false,
"noIndex": false,
"noRobotsIndex": false,
"metaLinks": {
"canonical": {
"kind": "page",
"page": "text",
"space": "text"
},
"alternates": [
{
"kind": "page",
"page": "text",
"space": "text"
}
]
},
"computed": {
"type": "builtin:openapi",
"dependencies": {
"spec": {
"ref": {
"kind": "openapi",
"spec": "text"
}
}
},
"props": {
"doc": "models"
}
},
"computedSeed": "text"
}
],
"files": [
{
"id": "text",
"name": "text",
"contentType": "text",
"downloadURL": "text",
"size": 1,
"dimensions": {
"width": 1,
"height": 1
},
"git": {
"oid": "text",
"path": "text"
}
}
],
"reusableContents": [
{
"id": "text",
"title": "text",
"git": {
"oid": "text",
"path": "text"
},
"computed": {
"type": "builtin:openapi",
"dependencies": {
"spec": {
"ref": {
"kind": "openapi",
"spec": "text"
}
}
},
"props": {
"doc": "models"
}
},
"computedSeed": "text"
}
]
}OK
{
"mergedFrom": {
"object": "change-request",
"id": "text",
"number": 1,
"status": "draft",
"subject": "text",
"description": {
"object": "document",
"data": {
"schemaVersion": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"nodes": [
{
"object": "block",
"type": "paragraph",
"key": "text",
"nodes": "[Circular Reference]",
"isVoid": false,
"data": {
"align": "start"
}
}
]
},
"createdBy": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
},
"createdAt": "2025-11-16T19:04:30.239Z",
"updatedAt": "2025-11-16T19:04:30.239Z",
"space": "text",
"revision": "text",
"revisionInitial": "text",
"revisionMergedAncestor": "text",
"revisionMerged": "text",
"comments": 1,
"outdated": true,
"conversationsIssuesCluster": "text",
"urls": {
"app": "https://example.com",
"location": "https://example.com"
}
},
"changes": [
{
"type": "page_created",
"page": {
"id": "text",
"type": "document",
"title": "text",
"path": "text"
}
}
],
"more": 1
}OK
{
"id": "text",
"title": "text",
"emoji": "🎉",
"icon": "gear",
"createdAt": "2025-11-16T19:04:30.239Z",
"updatedAt": "2025-11-16T19:04:30.239Z",
"markdown": "text",
"type": "document",
"urls": {
"app": "https://example.com"
},
"slug": "text",
"path": "text",
"description": "text",
"pages": [
"[Circular Reference]"
],
"git": {
"oid": "text",
"path": "text"
},
"layout": {
"width": "default",
"cover": true,
"coverSize": "hero",
"title": true,
"description": true,
"tableOfContents": true,
"outline": true,
"pagination": true,
"metadata": true
},
"cover": {
"ref": {
"kind": "file",
"file": "text"
},
"refDark": {
"kind": "file",
"file": "text"
},
"yPos": 0,
"height": 240
},
"variables": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"hidden": false,
"noIndex": false,
"noRobotsIndex": false,
"metaLinks": {
"canonical": {
"kind": "page",
"page": "text",
"space": "text"
},
"alternates": [
{
"kind": "page",
"page": "text",
"space": "text"
}
]
},
"computed": {
"type": "builtin:openapi",
"dependencies": {
"spec": {
"ref": {
"kind": "openapi",
"spec": "text"
}
}
},
"props": {
"doc": "models"
}
},
"computedSeed": "text"
}OK
{
"id": "text",
"title": "text",
"emoji": "🎉",
"icon": "gear",
"createdAt": "2025-11-16T19:04:30.239Z",
"updatedAt": "2025-11-16T19:04:30.239Z",
"markdown": "text",
"type": "document",
"urls": {
"app": "https://example.com"
},
"slug": "text",
"path": "text",
"description": "text",
"pages": [
"[Circular Reference]"
],
"git": {
"oid": "text",
"path": "text"
},
"layout": {
"width": "default",
"cover": true,
"coverSize": "hero",
"title": true,
"description": true,
"tableOfContents": true,
"outline": true,
"pagination": true,
"metadata": true
},
"cover": {
"ref": {
"kind": "file",
"file": "text"
},
"refDark": {
"kind": "file",
"file": "text"
},
"yPos": 0,
"height": 240
},
"variables": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"hidden": false,
"noIndex": false,
"noRobotsIndex": false,
"metaLinks": {
"canonical": {
"kind": "page",
"page": "text",
"space": "text"
},
"alternates": [
{
"kind": "page",
"page": "text",
"space": "text"
}
]
},
"computed": {
"type": "builtin:openapi",
"dependencies": {
"spec": {
"ref": {
"kind": "openapi",
"spec": "text"
}
}
},
"props": {
"doc": "models"
}
},
"computedSeed": "text"
}{
"id": "text",
"title": "text",
"git": {
"oid": "text",
"path": "text"
},
"computed": {
"type": "builtin:openapi",
"dependencies": {
"spec": {
"ref": {
"kind": "openapi",
"spec": "text"
}
}
},
"props": {
"doc": "models"
}
},
"computedSeed": "text"
}OK
{
"object": "document",
"data": {
"schemaVersion": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"nodes": [
{
"object": "block",
"type": "paragraph",
"key": "text",
"nodes": [
{
"object": "inline",
"type": "link",
"key": "text",
"nodes": [
{
"object": "text",
"key": "text",
"leaves": [
{
"object": "leaf",
"text": "text",
"marks": [
{
"object": "mark",
"type": "bold"
}
]
}
]
}
],
"data": {
"ref": {
"kind": "file",
"file": "text"
}
},
"isVoid": false
}
],
"isVoid": false,
"data": {
"align": "start"
}
}
]
}GET /v1/spaces/{spaceId}/search HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"next": {
"page": "text"
},
"count": 1,
"items": [
{
"id": "text",
"title": "text",
"path": "text",
"sections": [
{
"id": "text",
"title": "text",
"path": "text",
"body": "text",
"urls": {
"app": "https://example.com"
}
}
],
"ancestors": [
{
"title": "text"
}
],
"urls": {
"app": "https://example.com"
}
}
]
}GET /v1/spaces/{spaceId}/content HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "revision",
"id": "text",
"parents": [
"text"
],
"pages": [
"[Circular Reference]"
],
"files": [
{
"id": "text",
"name": "text",
"contentType": "text",
"downloadURL": "text",
"size": 1,
"dimensions": {
"width": 1,
"height": 1
},
"git": {
"oid": "text",
"path": "text"
}
}
],
"reusableContents": [
{
"0": "[",
"1": "C",
"2": "i",
"3": "r",
"4": "c",
"5": "u",
"6": "l",
"7": "a",
"8": "r",
"9": " ",
"10": "R",
"11": "e",
"12": "f",
"13": "e",
"14": "r",
"15": "e",
"16": "n",
"17": "c",
"18": "e",
"19": "]",
"id": "text",
"title": "text",
"git": {
"oid": "text",
"path": "text"
}
}
],
"variables": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"createdAt": "2025-11-16T19:04:30.239Z",
"git": {
"oid": "text",
"message": "text",
"createdByGitBook": true,
"url": "text",
"ref": "text"
},
"urls": {
"app": "https://example.com",
"published": "https://example.com",
"public": "https://example.com"
},
"type": "edits"
}POST /v1/spaces/{spaceId}/content/template HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 121
{
"id": "text",
"params": {
"contentRefs": {
"ANY_ADDITIONAL_PROPERTY": {
"kind": "file",
"file": "text"
}
}
},
"changeRequestId": "text"
}GET /v1/spaces/{spaceId}/content/pages HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"pages": [
{
"id": "text",
"title": "text",
"emoji": "🎉",
"icon": "gear",
"createdAt": "2025-11-16T19:04:30.239Z",
"updatedAt": "2025-11-16T19:04:30.239Z",
"markdown": "text",
"type": "document",
"urls": {
"app": "https://example.com"
},
"slug": "text",
"path": "text",
"description": "text",
"pages": [
"[Circular Reference]"
],
"git": {
"oid": "text",
"path": "text"
},
"layout": {
"width": "default",
"cover": true,
"coverSize": "hero",
"title": true,
"description": true,
"tableOfContents": true,
"outline": true,
"pagination": true,
"metadata": true
},
"cover": {
"ref": {
"kind": "file",
"file": "text"
},
"refDark": {
"kind": "file",
"file": "text"
},
"yPos": 0,
"height": 240
},
"variables": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"hidden": false,
"noIndex": false,
"noRobotsIndex": false,
"metaLinks": {
"canonical": {
"kind": "page",
"page": "text",
"space": "text"
},
"alternates": [
{
"kind": "page",
"page": "text",
"space": "text"
}
]
},
"computed": {
"type": "builtin:openapi",
"dependencies": {
"spec": {
"ref": {
"kind": "openapi",
"spec": "text"
}
}
},
"props": {
"doc": "models"
}
},
"computedSeed": "text"
}
]
}GET /v1/spaces/{spaceId}/content/files HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"next": {
"page": "text"
},
"count": 1,
"items": [
{
"id": "text",
"name": "text",
"contentType": "text",
"downloadURL": "text",
"size": 1,
"dimensions": {
"width": 1,
"height": 1
},
"git": {
"oid": "text",
"path": "text"
}
}
]
}GET /v1/spaces/{spaceId}/content/files/{fileId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"name": "text",
"contentType": "text",
"downloadURL": "text",
"size": 1,
"dimensions": {
"width": 1,
"height": 1
},
"git": {
"oid": "text",
"path": "text"
}
}GET /v1/spaces/{spaceId}/content/files/{fileId}/backlinks HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"next": {
"page": "text"
},
"count": 1,
"items": [
{
"kind": "file",
"organization": {
"object": "organization",
"id": "text",
"title": "text",
"createdAt": "2025-11-16T19:04:30.239Z",
"emailDomains": [
"text"
],
"hostname": "text",
"type": "business",
"useCase": "internalDocs",
"communityType": "nonProfit",
"defaultRole": "admin",
"defaultContent": {
"type": "site",
"site": "text"
},
"sso": true,
"ai": true,
"inviteLinks": true,
"plan": "free_2024",
"billing": {
"interval": "monthly",
"endDate": "2025-11-16T19:04:30.239Z",
"hasPaymentFailed": true,
"isScheduledToCancel": true,
"pricing": {
"members": {
"plus_2024": {
"monthly": 1,
"yearly": 1
},
"pro_2024": {
"monthly": 1,
"yearly": 1
}
},
"sites": {
"premium": {
"monthly": 1,
"yearly": 1
},
"ultimate": {
"monthly": 1,
"yearly": 1
}
}
},
"usageAddons": {
"ANY_ADDITIONAL_PROPERTY": {
"enabled": true
}
}
},
"mergeRules": {
"type": "rules",
"rules": [
{
"rule": "require_specific_reviewers",
"users": [
"text"
]
}
]
},
"urls": {
"location": "https://example.com",
"app": "https://example.com",
"logo": "https://example.com"
},
"trial": {
"status": "notapplicable",
"count": 1,
"endDate": "2025-11-16T19:04:30.239Z",
"decision": "downgrade"
},
"customHostname": "text",
"blocked": {
"source": "backoffice",
"reason": "text"
},
"internal_billingMigration": {
"deadline": "2025-11-16T19:04:30.239Z",
"discountPercent": 1,
"discountEndDate": "2025-11-16T19:04:30.239Z"
},
"permissions": {
"view": true,
"admin": true,
"ownTeam": true,
"createContent": true,
"createOpenAPISpec": true,
"ingestConversations": true,
"viewBilling": true,
"listMembers": true,
"listTeams": true,
"listIntegrations": true,
"listInstallations": true,
"installIntegration": true
}
},
"space": {
"object": "space",
"id": "text",
"title": "text",
"emoji": "🎉",
"visibility": "public",
"createdAt": "2025-11-16T19:04:30.239Z",
"updatedAt": "2025-11-16T19:04:30.239Z",
"deletedAt": "2025-11-16T19:04:30.239Z",
"editMode": "live",
"mergeRules": {
"type": "inherit"
},
"urls": {
"location": "https://example.com",
"app": "https://example.com",
"published": "https://example.com",
"public": "https://example.com",
"icon": "https://example.com"
},
"organization": "text",
"parent": "text",
"language": "en",
"gitSync": {
"repoName": "text",
"installationProvider": "github",
"integration": "text",
"url": "text",
"updatedAt": "2025-11-16T19:04:30.239Z"
},
"visitorAuth": {
"backend": "custom"
},
"revision": "text",
"defaultLevel": "admin",
"comments": 1,
"changeRequests": 1,
"changeRequestsOpen": 1,
"changeRequestsDraft": 1,
"permissions": {
"view": true,
"access": true,
"admin": true,
"viewInviteLinks": true,
"edit": true,
"triggerGitSync": true,
"comment": true,
"merge": true,
"review": true,
"installIntegration": true
}
},
"versionContext": {
"type": "revision",
"revision": "[Circular Reference]"
},
"file": {
"id": "text",
"name": "text",
"contentType": "text",
"downloadURL": "text",
"size": 1,
"dimensions": {
"width": 1,
"height": 1
},
"git": {
"oid": "text",
"path": "text"
}
}
}
]
}GET /v1/spaces/{spaceId}/content/page/{pageId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
GET /v1/spaces/{spaceId}/content/page/{pageId}/links HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
GET /v1/spaces/{spaceId}/content/page/{pageId}/backlinks HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"next": {
"page": "text"
},
"count": 1,
"items": [
{
"kind": "file",
"organization": {
"object": "organization",
"id": "text",
"title": "text",
"createdAt": "2025-11-16T19:04:30.239Z",
"emailDomains": [
"text"
],
"hostname": "text",
"type": "business",
"useCase": "internalDocs",
"communityType": "nonProfit",
"defaultRole": "admin",
"defaultContent": {
"type": "site",
"site": "text"
},
"sso": true,
"ai": true,
"inviteLinks": true,
"plan": "free_2024",
"billing": {
"interval": "monthly",
"endDate": "2025-11-16T19:04:30.239Z",
"hasPaymentFailed": true,
"isScheduledToCancel": true,
"pricing": {
"members": {
"plus_2024": {
"monthly": 1,
"yearly": 1
},
"pro_2024": {
"monthly": 1,
"yearly": 1
}
},
"sites": {
"premium": {
"monthly": 1,
"yearly": 1
},
"ultimate": {
"monthly": 1,
"yearly": 1
}
}
},
"usageAddons": {
"ANY_ADDITIONAL_PROPERTY": {
"enabled": true
}
}
},
"mergeRules": {
"type": "rules",
"rules": [
{
"rule": "require_specific_reviewers",
"users": [
"text"
]
}
]
},
"urls": {
"location": "https://example.com",
"app": "https://example.com",
"logo": "https://example.com"
},
"trial": {
"status": "notapplicable",
"count": 1,
"endDate": "2025-11-16T19:04:30.239Z",
"decision": "downgrade"
},
"customHostname": "text",
"blocked": {
"source": "backoffice",
"reason": "text"
},
"internal_billingMigration": {
"deadline": "2025-11-16T19:04:30.239Z",
"discountPercent": 1,
"discountEndDate": "2025-11-16T19:04:30.239Z"
},
"permissions": {
"view": true,
"admin": true,
"ownTeam": true,
"createContent": true,
"createOpenAPISpec": true,
"ingestConversations": true,
"viewBilling": true,
"listMembers": true,
"listTeams": true,
"listIntegrations": true,
"listInstallations": true,
"installIntegration": true
}
},
"space": {
"object": "space",
"id": "text",
"title": "text",
"emoji": "🎉",
"visibility": "public",
"createdAt": "2025-11-16T19:04:30.239Z",
"updatedAt": "2025-11-16T19:04:30.239Z",
"deletedAt": "2025-11-16T19:04:30.239Z",
"editMode": "live",
"mergeRules": {
"type": "inherit"
},
"urls": {
"location": "https://example.com",
"app": "https://example.com",
"published": "https://example.com",
"public": "https://example.com",
"icon": "https://example.com"
},
"organization": "text",
"parent": "text",
"language": "en",
"gitSync": {
"repoName": "text",
"installationProvider": "github",
"integration": "text",
"url": "text",
"updatedAt": "2025-11-16T19:04:30.239Z"
},
"visitorAuth": {
"backend": "custom"
},
"revision": "text",
"defaultLevel": "admin",
"comments": 1,
"changeRequests": 1,
"changeRequestsOpen": 1,
"changeRequestsDraft": 1,
"permissions": {
"view": true,
"access": true,
"admin": true,
"viewInviteLinks": true,
"edit": true,
"triggerGitSync": true,
"comment": true,
"merge": true,
"review": true,
"installIntegration": true
}
},
"versionContext": {
"type": "revision",
"revision": "[Circular Reference]"
},
"file": {
"id": "text",
"name": "text",
"contentType": "text",
"downloadURL": "text",
"size": 1,
"dimensions": {
"width": 1,
"height": 1
},
"git": {
"oid": "text",
"path": "text"
}
}
}
]
}GET /v1/spaces/{spaceId}/content/page/{pageId}/meta-links HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"canonical": {
"kind": "page",
"page": "text",
"space": "text"
},
"alternates": [
{
"kind": "page",
"page": "text",
"space": "text"
}
]
}GET /v1/spaces/{spaceId}/content/path/{pagePath} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
GET /v1/spaces/{spaceId}/content/reusable-contents/{reusableContentId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"title": "text",
"git": {
"oid": "text",
"path": "text"
},
"computed": {
"type": "builtin:openapi",
"dependencies": {
"spec": {
"ref": {
"kind": "openapi",
"spec": "text"
}
}
},
"props": {
"doc": "models"
}
},
"computedSeed": "text"
}POST /v1/spaces/{spaceId}/content/computed/document HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 141
{
"source": {
"type": "builtin:openapi",
"dependencies": {
"spec": {
"ref": {
"kind": "openapi",
"spec": "text"
}
}
},
"props": {
"doc": "models"
}
},
"seed": "text"
}POST /v1/spaces/{spaceId}/content/computed/revision HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 160
{
"source": {
"type": "builtin:openapi",
"dependencies": {
"spec": {
"ref": {
"kind": "openapi",
"spec": "text"
}
}
},
"props": {
"models": true,
"downloadLink": true
}
},
"seed": "text"
}GET /v1/spaces/{spaceId}/documents/{documentId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "document",
"data": {
"schemaVersion": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"nodes": [
{
"object": "block",
"type": "paragraph",
"key": "text",
"nodes": [
{
"object": "inline",
"type": "link",
"key": "text",
"nodes": [
{
"object": "text",
"key": "text",
"leaves": [
{
"object": "leaf",
"text": "text",
"marks": [
{
"object": "mark",
"type": "bold"
}
]
}
]
}
],
"data": {
"ref": {
"kind": "file",
"file": "text"
}
},
"isVoid": false
}
],
"isVoid": false,
"data": {
"align": "start"
}
}
]
}GET /v1/spaces/{spaceId}/revisions/{revisionId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "revision",
"id": "text",
"parents": [
"text"
],
"pages": [
"[Circular Reference]"
],
"files": [
{
"id": "text",
"name": "text",
"contentType": "text",
"downloadURL": "text",
"size": 1,
"dimensions": {
"width": 1,
"height": 1
},
"git": {
"oid": "text",
"path": "text"
}
}
],
"reusableContents": [
{
"0": "[",
"1": "C",
"2": "i",
"3": "r",
"4": "c",
"5": "u",
"6": "l",
"7": "a",
"8": "r",
"9": " ",
"10": "R",
"11": "e",
"12": "f",
"13": "e",
"14": "r",
"15": "e",
"16": "n",
"17": "c",
"18": "e",
"19": "]",
"id": "text",
"title": "text",
"git": {
"oid": "text",
"path": "text"
}
}
],
"variables": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"createdAt": "2025-11-16T19:04:30.239Z",
"git": {
"oid": "text",
"message": "text",
"createdByGitBook": true,
"url": "text",
"ref": "text"
},
"urls": {
"app": "https://example.com",
"published": "https://example.com",
"public": "https://example.com"
},
"type": "edits"
}GET /v1/spaces/{spaceId}/revisions/{revisionId}/changes HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
GET /v1/spaces/{spaceId}/revisions/{revisionId}/pages HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"pages": [
{
"id": "text",
"title": "text",
"emoji": "🎉",
"icon": "gear",
"createdAt": "2025-11-16T19:04:30.239Z",
"updatedAt": "2025-11-16T19:04:30.239Z",
"markdown": "text",
"type": "document",
"urls": {
"app": "https://example.com"
},
"slug": "text",
"path": "text",
"description": "text",
"pages": [
"[Circular Reference]"
],
"git": {
"oid": "text",
"path": "text"
},
"layout": {
"width": "default",
"cover": true,
"coverSize": "hero",
"title": true,
"description": true,
"tableOfContents": true,
"outline": true,
"pagination": true,
"metadata": true
},
"cover": {
"ref": {
"kind": "file",
"file": "text"
},
"refDark": {
"kind": "file",
"file": "text"
},
"yPos": 0,
"height": 240
},
"variables": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"hidden": false,
"noIndex": false,
"noRobotsIndex": false,
"metaLinks": {
"canonical": {
"kind": "page",
"page": "text",
"space": "text"
},
"alternates": [
{
"kind": "page",
"page": "text",
"space": "text"
}
]
},
"computed": {
"type": "builtin:openapi",
"dependencies": {
"spec": {
"ref": {
"kind": "openapi",
"spec": "text"
}
}
},
"props": {
"doc": "models"
}
},
"computedSeed": "text"
}
]
}GET /v1/spaces/{spaceId}/revisions/{revisionId}/files HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
GET /v1/spaces/{spaceId}/revisions/{revisionId}/files/{fileId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"name": "text",
"contentType": "text",
"downloadURL": "text",
"size": 1,
"dimensions": {
"width": 1,
"height": 1
},
"git": {
"oid": "text",
"path": "text"
}
}GET /v1/spaces/{spaceId}/revisions/{revisionId}/page/{pageId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
GET /v1/spaces/{spaceId}/revisions/{revisionId}/page/{pageId}/document HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
GET /v1/spaces/{spaceId}/revisions/{revisionId}/path/{pagePath} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
GET /v1/spaces/{spaceId}/revisions/{revisionId}/page/{pageId}/meta-links HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"canonical": {
"kind": "page",
"page": "text",
"space": "text"
},
"alternates": [
{
"kind": "page",
"page": "text",
"space": "text"
}
]
}GET /v1/spaces/{spaceId}/revisions/{revisionId}/reusable-contents/{reusableContentId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
GET /v1/spaces/{spaceId}/revisions/{revisionId}/reusable-contents/{reusableContentId}/document HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
GET /v1/spaces/{spaceId}/pdf HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"url": "https://example.com"
}{
"next": {
"page": "text"
},
"count": 1,
"items": [
{
"id": "text",
"name": "text",
"contentType": "text",
"downloadURL": "text",
"size": 1,
"dimensions": {
"width": 1,
"height": 1
},
"git": {
"oid": "text",
"path": "text"
}
}
]
}{
"object": "document",
"data": {
"schemaVersion": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"nodes": [
{
"object": "block",
"type": "paragraph",
"key": "text",
"nodes": [
{
"object": "inline",
"type": "link",
"key": "text",
"nodes": [
{
"object": "text",
"key": "text",
"leaves": [
{
"object": "leaf",
"text": "text",
"marks": [
{
"object": "mark",
"type": "bold"
}
]
}
]
}
],
"data": {
"ref": {
"kind": "file",
"file": "text"
}
},
"isVoid": false
}
],
"isVoid": false,
"data": {
"align": "start"
}
}
]
}