Create a new documentation site in an organization
post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequiredPattern:
A unique entity identifier
^[a-zA-Z0-9_-]+$Body
typestring · enumOptionalPossible values:
The type of the site. Defaults to:
- Sponsored for community organizations
- Ultimate for all other organizations
titlestring · min: 2 · max: 128Optional
Title of the site
visibilitystring · enumOptionalPossible values:
The visibility setting of the site determines the audience of the site.
public: Anyone can access the site, and the site is indexed by search engines.unlisted: Anyone can access the site, and the site is not indexed by search enginesshare-link: Anyone with a secret token in the url can access the site.visitor-auth: Anyone authenticated through a JWT token can access the site.
spacesstring[]Optional
ID of spaces to be added to the site
Responses
201
Site created
application/json
post/orgs/{organizationId}/sites
POST /v1/orgs/{organizationId}/sites HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 71
{
"type": "basic",
"title": "text",
"visibility": "public",
"spaces": [
"text"
]
}201
Site created
{
"object": "site",
"id": "text",
"type": "basic",
"appliedType": "basic",
"title": "text",
"icon": {
"icon": {
"light": "https://example.com",
"dark": "https://example.com"
}
},
"hostname": "text",
"basename": "text",
"proxy": {
"origin": "text",
"target": "text"
},
"visibility": "public",
"defaultLevel": "admin",
"permissions": {
"view": true,
"access": true,
"edit": true,
"create": true,
"admin": true,
"installIntegration": true,
"viewAdaptiveSchema": true,
"editAdaptiveSchema": true
},
"published": true,
"siteSpaces": 1,
"gitSync": {
"repoName": "text",
"installationStatus": "unauthenticated",
"installationProvider": "github",
"installationId": "text",
"parentInstallationId": "text",
"url": "text",
"operation": {
"state": "running",
"direction": "export",
"startedAt": "2026-01-01T00:00:00.000Z",
"endedAt": "2026-01-01T00:00:00.000Z",
"error": "text",
"errorAction": {
"label": "text",
"url": "https://example.com"
}
},
"operationTimeout": 1,
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"createdAt": "2026-01-01T00:00:00.000Z",
"lastScanAt": "2026-01-01T00:00:00.000Z",
"adaptiveContent": {
"enabled": true
},
"ads": {
"status": "pending",
"submittable": true
},
"styleguide": {
"kind": "space",
"space": "text"
},
"features": [
{
"id": "sites-adaptive-content",
"plan": "basic",
"frozen": true,
"customizations": [
"header-logo"
]
}
],
"urls": {
"location": "https://example.com",
"app": "https://example.com",
"published": "https://example.com",
"preview": "https://example.com",
"login": "https://example.com",
"logout": "https://example.com"
}
}Last updated
Was this helpful?