Edit Content

The GitBook API is currently in beta phase. If you wish to be one of our testers, please contact our team at [email protected].


The examples in the pages linked below only include routes for the primary revision of a space (/v1/spaces/:spaceID/content).


Update primary content of the space


Update content of draft



Create a page in a space:

curl -X PUT https://$HOSTNAME/v1/spaces/-LvtJeIxDqSArlpsdopT/content/v/master/url/ \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
--data '{"title":"xyz"}'

Append markdown content to a page:

curl -X POST https://$HOSTNAME/v1/spaces/-LvtJeIxDqSArlpsdopT/content/v/master/url/ \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
--data-binary @- << EOF
"document": {
"transforms": [
"transform": "append",
"fragment": {
"markdown": "Hello **world**"


If you want to update or delete versions:

If you want to create or update pages:

If you want to add assets: