Change Requests
A change request in GitBook is the entity of a revision to a space in progress.

post
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests
Create a new change request for a space.
Parameters
Path
spaceId*
string
The unique id of the space
Body
Example
Schema
{
"subject": "string"
}
Responses
201: Created
Change Request Created
default
Unexpected Error
post
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests/{changeRequestId}/merge
Merge a change request in the primary content of a space.
Parameters
Path
spaceId*
string
The unique id of the space
changeRequestId*
string
The unique ID of the change request or its number identifier in the space
Responses
200: OK
OK
default
Unexpected Error
post
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests/{changeRequestId}/update
Update a change-request with changes from primary content.
Parameters
Path
spaceId*
string
The unique id of the space
changeRequestId*
string
The unique ID of the change request or its number identifier in the space
Responses
200: OK
OK
default
Unexpected Error
get
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests/{changeRequestId}/content
Get the latest content revision for a change request.
Parameters
Path
spaceId*
string
The unique id of the space
changeRequestId*
string
The unique ID of the change request or its number identifier in the space
Responses
200: OK
OK
default
Unexpected Error
get
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests/{changeRequestId}/content/files
List all files in the latest content of the change-request
Parameters
Path
spaceId*
string
The unique id of the space
changeRequestId*
string
The unique ID of the change request or its number identifier in 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
post
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests/{changeRequestId}/content/import
Import content in a change request.
Parameters
Path
spaceId*
string
The unique id of the space
changeRequestId*
string
The unique ID of the change request or its number identifier in the space
Body
Example
Schema
{
"url": "string",
"source": "website"
}
Responses
201: Created
Content imported in a new revision
default
Unexpected Error
get
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests/{changeRequestId}/content/path/{pagePath}
Get a page by its path in a change request.
Parameters
Path
spaceId*
string
The unique id of the space
changeRequestId*
string
The unique ID of the change request or its number identifier in 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
get
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}
Get a page by its ID in a change request.
Parameters
Path
spaceId*
string
The unique id of the space
changeRequestId*
string
The unique ID of the change request or its number identifier in 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
post
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}/import
Import external content into a page of a change-request by its ID.
Parameters
Path
spaceId*
string
The unique id of the space
changeRequestId*
string
The unique ID of the change request or its number identifier in 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 1mo ago