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.

The SitePublishingAuth object

Attributes
all ofOptional
one ofOptional
or
and

The SitePublishingAuth object

{
  "backend": "custom",
  "object": "publishing-auth",
  "privateKey": "text",
  "fallbackURL": "https://example.com",
  "integration": "text"
}

Get a site auth config

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

The unique id of the organization

siteIdstringRequired

The unique id of the site

Responses
get
/orgs/{organizationId}/sites/{siteId}/publishing/auth
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"
}

Update a site auth config

patch
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

The unique id of the organization

siteIdstringRequired

The unique id of the site

Body
all ofOptional
one ofOptional
or
and
Responses
patch
/orgs/{organizationId}/sites/{siteId}/publishing/auth
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 a site auth

post

Regenerate the publishing authentication settings for a site. This will re-generate the private key.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

The unique id of the organization

siteIdstringRequired

The unique id of the site

Responses
post
/orgs/{organizationId}/sites/{siteId}/publishing/auth/regenerate
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"
}

Last updated

Was this helpful?