Site auth
Manage the authentication needed for publishing your site.
Configure the credentials or tokens required to publish documentation externally. This helps ensure your site is consistently kept up to date.
Get a site auth config
get
organizationIdstringrequired
The unique id of the organization
siteIdstringrequired
The unique id of the site
curl -L \
--url 'https://api.gitbook.com/v1/orgs/{organizationId}/sites/{siteId}/publishing/auth' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"backend": "custom",
"object": "publishing-auth",
"privateKey": "text",
"fallbackURL": "https://example.com",
"integration": "text"
}
Update a site auth config
patch
organizationIdstringrequired
The unique id of the organization
siteIdstringrequired
The unique id of the site
curl -L \
--request PATCH \
--url 'https://api.gitbook.com/v1/orgs/{organizationId}/sites/{siteId}/publishing/auth' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"backend": "custom",
"fallbackURL": "https://example.com"
}'
{
"backend": "custom",
"object": "publishing-auth",
"privateKey": "text",
"fallbackURL": "https://example.com",
"integration": "text"
}
Regenerate a site auth
post
Regenerate the publishing authentication settings for a site. This will re-generate the private key.
organizationIdstringrequired
The unique id of the organization
siteIdstringrequired
The unique id of the site
curl -L \
--request POST \
--url 'https://api.gitbook.com/v1/orgs/{organizationId}/sites/{siteId}/publishing/auth/regenerate' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"backend": "custom",
"object": "publishing-auth",
"privateKey": "text",
"fallbackURL": "https://example.com",
"integration": "text"
}