Ask or search…
K
Comment on page

Content

Content in GitBook is the entity for content on a page.

GET the primary content in a space

get
https://api.gitbook.com/v1
/spaces/{spaceId}/content
Get the current primary content revision for a space
Parameters
Path
spaceId*
string
The unique id of the space
Responses
200: OK
OK
default
Unexpected Error

GET files for the primary content in a space

get
https://api.gitbook.com/v1
/spaces/{spaceId}/content/files
List all files for the main revision content of a space
Parameters
Path
spaceId*
string
The unique id of the space
Query
page
string
Identifier of the page results to fetch.
limit
number
The number of results per page
Responses
200: OK
OK
default
Unexpected Error

GET a page from the primary content in a space by ID

get
https://api.gitbook.com/v1
/spaces/{spaceId}/content/page/{pageId}
Get a page by its ID in the primary content.
Parameters
Path
spaceId*
string
The unique id of the space
pageId*
string
The unique id of the page
Query
format
string
Output format for the content.
Responses
200: OK
OK
default
Unexpected Error

GET a page from the primary content in a space by path

get
https://api.gitbook.com/v1
/spaces/{spaceId}/content/path/{pagePath}
Get a page by its path in the primary content.
Parameters
Path
spaceId*
string
The unique id of the space
pagePath*
string
The path of the page in the revision.
Query
format
string
Output format for the content.
Responses
200: OK
OK
default
Unexpected Error

POST content to a space

post
https://api.gitbook.com/v1
/spaces/{spaceId}/content/import
Import content in a space.
Parameters
Path
spaceId*
string
The unique id of the space
Body
Example
Schema
{
"url": "string",
"source": "website"
}
Responses
201: Created
Content imported in a new revision
default
Unexpected Error

POSTcontent to a page by ID

post
https://api.gitbook.com/v1
/spaces/{spaceId}/content/page/{pageId}/import
Import external content into a page by its ID.
Parameters
Path
spaceId*
string
The unique id of the space
pageId*
string
The unique id of the page
Body
Example
Schema
{
"url": "string",
"source": "website"
}
Responses
201: Created
Content imported in a new revision
default
Unexpected Error
Last modified 7mo ago