Space content
Import, export, and search content in a space.
Was this helpful?
Import, export, and search content in a space.
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.
true
If false
is passed, content will not be computed
true
OK
OK
The unique id of the space
URL of the content to import.
Content imported in a new revision
Content imported in a new revision
The unique id of the space
If false
is passed, "git" mutable metadata will not returned. Passing false
can optimize performances of the lookup.
true
If false
is passed, content will not be computed
true
OK
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.
true
If false
is passed, content will not be computed
true
OK
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.
true
If false
is passed, content will not be computed
true
OK
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.
If true
is passed, the document will be evaluated
false
If false
is passed, "git" mutable metadata will not returned. Passing false
can optimize performances of the lookup.
true
If false
is passed, content will not be computed
true
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
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 unique id of the page
URL of the content to import.
Content imported in a new revision
The unique id of the space
The path of the page in the revision.
Output format for the content.
If true
is passed, the document will be evaluated
false
If false
is passed, "git" mutable metadata will not returned. Passing false
can optimize performances of the lookup.
true
If false
is passed, content will not be computed
true
OK
OK
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.
true
If false
is passed, content will not be computed
true
OK
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.
true
If false
is passed, content will not be computed
true
OK
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.
true
If false
is passed, content will not be computed
true
Limit the number of changes returned
10
OK
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.
true
If false
is passed, content will not be computed
true
OK
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.
true
If false
is passed, content will not be computed
true
OK
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.
true
If false
is passed, content will not be computed
true
OK
OK
The unique id of the space
The unique id of the revision
The unique id of the page
Output format for the content.
If true
is passed, the document will be evaluated
false
If false
is passed, "git" mutable metadata will not returned. Passing false
can optimize performances of the lookup.
true
If false
is passed, content will not be computed
true
OK
The unique id of the space
The unique id of the revision
The unique id of the page
If true
is passed, the document will be evaluated
false
OK
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.
If true
is passed, the document will be evaluated
false
If false
is passed, "git" mutable metadata will not returned. Passing false
can optimize performances of the lookup.
true
If false
is passed, content will not be computed
true
OK
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.
true
If false
is passed, content will not be computed
true
OK
OK
The unique id of the space
The unique id of the revision
The unique id of the reusable content
If true
is passed, the document will be evaluated
false
OK
OK
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
No content
{
"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-08-27T18:04:20.218Z",
"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-08-27T18:04:20.218Z",
"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
}
}
},
"urls": {
"location": "https://example.com",
"app": "https://example.com",
"logo": "https://example.com"
},
"trial": {
"status": "notapplicable",
"endDate": "2025-08-27T18:04:20.218Z",
"decision": "downgrade"
},
"customHostname": "text",
"blocked": {
"reason": "security"
},
"internal_billingMigration": {
"deadline": "2025-08-27T18:04:20.218Z",
"discountPercent": 1,
"discountEndDate": "2025-08-27T18:04:20.218Z"
},
"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-08-27T18:04:20.218Z",
"updatedAt": "2025-08-27T18:04:20.218Z",
"deletedAt": "2025-08-27T18:04:20.218Z",
"editMode": "live",
"urls": {
"location": "https://example.com",
"app": "https://example.com",
"published": "https://example.com",
"public": "https://example.com",
"icon": "https://example.com"
},
"organization": "text",
"parent": "text",
"language": "en",
"gitSync": {
"repoName": "text",
"installationProvider": "github",
"integration": "text",
"url": "text",
"updatedAt": "2025-08-27T18:04:20.218Z"
},
"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-08-27T18:04:20.218Z",
"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-08-27T18:04:20.218Z",
"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
}
}
},
"urls": {
"location": "https://example.com",
"app": "https://example.com",
"logo": "https://example.com"
},
"trial": {
"status": "notapplicable",
"endDate": "2025-08-27T18:04:20.218Z",
"decision": "downgrade"
},
"customHostname": "text",
"blocked": {
"reason": "security"
},
"internal_billingMigration": {
"deadline": "2025-08-27T18:04:20.218Z",
"discountPercent": 1,
"discountEndDate": "2025-08-27T18:04:20.218Z"
},
"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-08-27T18:04:20.218Z",
"updatedAt": "2025-08-27T18:04:20.218Z",
"deletedAt": "2025-08-27T18:04:20.218Z",
"editMode": "live",
"urls": {
"location": "https://example.com",
"app": "https://example.com",
"published": "https://example.com",
"public": "https://example.com",
"icon": "https://example.com"
},
"organization": "text",
"parent": "text",
"language": "en",
"gitSync": {
"repoName": "text",
"installationProvider": "github",
"integration": "text",
"url": "text",
"updatedAt": "2025-08-27T18:04:20.218Z"
},
"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"
}
}
}
]
}
]
}
Content imported in a new revision
{
"revision": "text",
"importedResources": 1,
"totalResources": 1
}
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-08-27T18:04:20.218Z",
"updatedAt": "2025-08-27T18:04:20.218Z",
"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
},
"variables": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"hidden": false,
"noIndex": false,
"noRobotsIndex": false,
"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",
"createdBy": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
},
"createdAt": "2025-08-27T18:04:20.218Z",
"updatedAt": "2025-08-27T18:04:20.218Z",
"revision": "text",
"revisionInitial": "text",
"revisionMergedAncestor": "text",
"revisionMerged": "text",
"comments": 1,
"outdated": true,
"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-08-27T18:04:20.218Z",
"updatedAt": "2025-08-27T18:04:20.218Z",
"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
},
"variables": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"hidden": false,
"noIndex": false,
"noRobotsIndex": false,
"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-08-27T18:04:20.218Z",
"updatedAt": "2025-08-27T18:04:20.218Z",
"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
},
"variables": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"hidden": false,
"noIndex": false,
"noRobotsIndex": false,
"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"
}
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"
}
}
],
"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-08-27T18:04:20.218Z",
"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/import HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 48
{
"url": "https://example.com",
"source": "website"
}
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: 96
{
"id": "text",
"params": {
"contentRefs": {
"ANY_ADDITIONAL_PROPERTY": {
"kind": "file",
"file": "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-08-27T18:04:20.218Z",
"updatedAt": "2025-08-27T18:04:20.218Z",
"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
},
"variables": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"hidden": false,
"noIndex": false,
"noRobotsIndex": false,
"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-08-27T18:04:20.218Z",
"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-08-27T18:04:20.218Z",
"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
}
}
},
"urls": {
"location": "https://example.com",
"app": "https://example.com",
"logo": "https://example.com"
},
"trial": {
"status": "notapplicable",
"endDate": "2025-08-27T18:04:20.218Z",
"decision": "downgrade"
},
"customHostname": "text",
"blocked": {
"reason": "security"
},
"internal_billingMigration": {
"deadline": "2025-08-27T18:04:20.218Z",
"discountPercent": 1,
"discountEndDate": "2025-08-27T18:04:20.218Z"
},
"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-08-27T18:04:20.218Z",
"updatedAt": "2025-08-27T18:04:20.218Z",
"deletedAt": "2025-08-27T18:04:20.218Z",
"editMode": "live",
"urls": {
"location": "https://example.com",
"app": "https://example.com",
"published": "https://example.com",
"public": "https://example.com",
"icon": "https://example.com"
},
"organization": "text",
"parent": "text",
"language": "en",
"gitSync": {
"repoName": "text",
"installationProvider": "github",
"integration": "text",
"url": "text",
"updatedAt": "2025-08-27T18:04:20.218Z"
},
"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-08-27T18:04:20.218Z",
"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-08-27T18:04:20.218Z",
"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
}
}
},
"urls": {
"location": "https://example.com",
"app": "https://example.com",
"logo": "https://example.com"
},
"trial": {
"status": "notapplicable",
"endDate": "2025-08-27T18:04:20.218Z",
"decision": "downgrade"
},
"customHostname": "text",
"blocked": {
"reason": "security"
},
"internal_billingMigration": {
"deadline": "2025-08-27T18:04:20.218Z",
"discountPercent": 1,
"discountEndDate": "2025-08-27T18:04:20.218Z"
},
"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-08-27T18:04:20.218Z",
"updatedAt": "2025-08-27T18:04:20.218Z",
"deletedAt": "2025-08-27T18:04:20.218Z",
"editMode": "live",
"urls": {
"location": "https://example.com",
"app": "https://example.com",
"published": "https://example.com",
"public": "https://example.com",
"icon": "https://example.com"
},
"organization": "text",
"parent": "text",
"language": "en",
"gitSync": {
"repoName": "text",
"installationProvider": "github",
"integration": "text",
"url": "text",
"updatedAt": "2025-08-27T18:04:20.218Z"
},
"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"
}
}
}
]
}
POST /v1/spaces/{spaceId}/content/page/{pageId}/import HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 48
{
"url": "https://example.com",
"source": "website"
}
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: 140
{
"source": {
"type": "builtin:openapi",
"dependencies": {
"spec": {
"ref": {
"kind": "openapi",
"spec": "text"
}
}
},
"props": {
"models": 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-08-27T18:04:20.218Z",
"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-08-27T18:04:20.218Z",
"updatedAt": "2025-08-27T18:04:20.218Z",
"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
},
"variables": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"hidden": false,
"noIndex": false,
"noRobotsIndex": false,
"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: */*
{
"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}/path/{pagePath} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
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"
}
{
"revision": "text",
"importedResources": 1,
"totalResources": 1
}
{
"id": "text",
"title": "text",
"emoji": "🎉",
"icon": "gear",
"createdAt": "2025-08-27T18:04:20.218Z",
"updatedAt": "2025-08-27T18:04:20.218Z",
"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
},
"variables": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"hidden": false,
"noIndex": false,
"noRobotsIndex": false,
"computed": {
"type": "builtin:openapi",
"dependencies": {
"spec": {
"ref": {
"kind": "openapi",
"spec": "text"
}
}
},
"props": {
"doc": "models"
}
},
"computedSeed": "text"
}
{
"id": "text",
"title": "text",
"emoji": "🎉",
"icon": "gear",
"createdAt": "2025-08-27T18:04:20.218Z",
"updatedAt": "2025-08-27T18:04:20.218Z",
"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
},
"variables": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"hidden": false,
"noIndex": false,
"noRobotsIndex": false,
"computed": {
"type": "builtin:openapi",
"dependencies": {
"spec": {
"ref": {
"kind": "openapi",
"spec": "text"
}
}
},
"props": {
"doc": "models"
}
},
"computedSeed": "text"
}
{
"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"
}
}
]
}