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.
Authorizations
Path parameters
organizationIdstringRequired
The unique id of the organization
siteIdstringRequired
The unique id of the site
Responses
200
OK
application/json
Responseall of
one ofOptional
or
400
Bad Request
application/json
get
GET /v1/orgs/{organizationId}/sites/{siteId}/publishing/auth HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"backend": "custom",
"object": "publishing-auth",
"privateKey": "text",
"fallbackURL": "https://example.com",
"integration": "text"
}
Authorizations
Path parameters
organizationIdstringRequired
The unique id of the organization
siteIdstringRequired
The unique id of the site
Body
all ofOptional
one ofOptional
or
Responses
200
OK
application/json
Responseall of
one ofOptional
or
400
Bad Request
application/json
patch
PATCH /v1/orgs/{organizationId}/sites/{siteId}/publishing/auth HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 56
{
"backend": "custom",
"fallbackURL": "https://example.com"
}
{
"backend": "custom",
"object": "publishing-auth",
"privateKey": "text",
"fallbackURL": "https://example.com",
"integration": "text"
}
Regenerate the publishing authentication settings for a site. This will re-generate the private key.
Authorizations
Path parameters
organizationIdstringRequired
The unique id of the organization
siteIdstringRequired
The unique id of the site
Responses
200
OK
application/json
Responseall of
one ofOptional
or
400
Bad Request
application/json
post
POST /v1/orgs/{organizationId}/sites/{siteId}/publishing/auth/regenerate HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"backend": "custom",
"object": "publishing-auth",
"privateKey": "text",
"fallbackURL": "https://example.com",
"integration": "text"
}
Was this helpful?