5 August: Docs sites rollout introduces new publishing flow in the GitBook API
With the introduction of docs sites, several older API endpoints for publishing, share-links, and authenticated access have been deprecated
💥 Breaking changes
With the release of docs sites, certain API endpoints for publishing, share-links, and authenticated access have been deprecated and may no longer function as expected. If you’re affected by this, we recommend the following approach to make the necessary updates:
To modify or retrieve publishing states, share links, or authenticated access settings for a space, locate the associated site and copy its ID. Click the globe icon at the top of the space’s screen to open the site, then copy the Site ID from the URL.
Publishing
PATCH /spaces/{spaceId} to change the visibility or published state of the space now requires the following changes:
PATCH /orgs/{organizationId}/sites/{siteId}to change the visibility of the site.POST /orgs/{organizationId}/sites/{siteId}/publishin order to publish the site andPOST /orgs/{organizationId}/sites/{siteId}/unpublishto unpublish the site.
Share links
/spaces/{spaceId}/share-links and /spaces/{spaceId}/share-links/{shareLinkId} now requires you to use /orgs/{organizationId}/sites/{siteId}/share-links and /orgs/{organizationId}/sites/{siteId}/share-links/{shareLinkId}respectively.
Authenticated access (publishing auth)
/spaces/{spaceId}/publishing/auth methods should now be used through /orgs/{organizationId}/sites/{siteId}/publishing/auth
Last updated
Was this helpful?