Content
Content in GitBook is the entity for content on a page.
GET
the primary content in a space
GET
the primary content in a spaceGet the current primary content revision for a space
GEThttps://api.gitbook.com/v1/spaces/{spaceId}/content
Authorization
Path parameters
spaceId*string
The unique id of the space
Query parameters
Response
OK
Body
Revision (one of)
Request
Response
GET
files for the primary content in a space
GET
files for the primary content in a spaceList all files for the main revision content of a space
GEThttps://api.gitbook.com/v1/spaces/{spaceId}/content/files
Authorization
Path parameters
spaceId*string
The unique id of the space
Query parameters
Response
OK
Body
nextobject
countnumber
Total count of objects in the list
items*array of RevisionFile (object)
Request
Response
GET
a page from the primary content in a space by ID
GET
a page from the primary content in a space by IDGet a page by its ID in the primary content.
GEThttps://api.gitbook.com/v1/spaces/{spaceId}/content/page/{pageId}
Authorization
Path parameters
spaceId*string
The unique id of the space
pageId*string
The unique id of the page
Query parameters
Response
OK
Body
RevisionPage (one of)
Request
Response
GET
a page from the primary content in a space by path
GET
a page from the primary content in a space by pathGet a page by its path in the primary content.
GEThttps://api.gitbook.com/v1/spaces/{spaceId}/content/path/{pagePath}
Authorization
Path parameters
spaceId*string
The unique id of the space
pagePath*string
The path of the page in the revision.
Query parameters
Response
OK
Body
one of
Request
Response
POST
content to a space
POST
content to a spaceImport content in a space.
POSThttps://api.gitbook.com/v1/spaces/{spaceId}/content/import
Authorization
Path parameters
spaceId*string
The unique id of the space
Body
url*string
URL of the content to import.
source*ImportContentSource (enum)
websitedocxmarkdownhtmlzipconfluencegithub-wikidropbox-papernotionquipgoogle-docsopen-api
Response
Content imported in a new revision
Headers
Body
revision*string
ID of the newly created revision.
importedResources*number
How many resources were imported
totalResources*number
How many resources were processed
Request
Response
POST
content to a page by ID
POST
content to a page by IDImport external content into a page by its ID.
POSThttps://api.gitbook.com/v1/spaces/{spaceId}/content/page/{pageId}/import
Authorization
Path parameters
spaceId*string
The unique id of the space
pageId*string
The unique id of the page
Body
url*string
URL of the content to import.
source*ImportContentSource (enum)
websitedocxmarkdownhtmlzipconfluencegithub-wikidropbox-papernotionquipgoogle-docsopen-api
Response
Content imported in a new revision
Headers
Body
revision*string
ID of the newly created revision.
importedResources*number
How many resources were imported
totalResources*number
How many resources were processed
Request
Response
Last updated