New: AI Insights are here.
See what your users are asking.
Ctrlk
Pricing Log in Sign up
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Spaces

Create, maintain, and remove content spaces.

Spaces are containers for your documentation or knowledge base content. Use this API to create new spaces, manage existing ones, and delete or archive spaces you no longer need.

The Space object

Attributes
objectstring · enumRequired

Type of Object, always equals to "space"

Possible values:
idstringRequired

Unique identifier for the space

titlestring · max: 50Required

Title of the space

emojistring · emoji · max: 50Required

An emoji for this space. It'll match the emoji shown in the GitBook app.

Example: 🎉
visibilitystring · enumRequired
  • public: Anyone can access the content, and the content is indexed by search engines.
  • unlisted: Anyone can access the content, and the content is not indexed by search engines
  • share-link: Anyone with a secret token in the url can access the content.
  • visitor-auth: Anyone authenticated through a JWT token can access the content.
  • in-collection: Anyone who can access the parent collection can access the content. Only available for spaces in a collection.
  • private: Authorized members can access the content.
Possible values:
createdAtstring · date-timeRequired
updatedAtstring · date-timeRequired
deletedAtstring · date-timeOptional
editModestring · enumOptional

Determines how a Space can be edited.

  • live: Users can directly edit the space
  • locked: All edits are locked for this space.
Possible values:
typestring · enumOptional

Kind of space. Only set to styleguide for spaces holding a team's writing styleguide; omitted for regular spaces.

Possible values:
mergeRulesone ofRequired
or
or
organizationstringRequired

ID of the organization owning this space

parentstringOptional

ID of the parent collection.

languagestring · enumOptionalPossible values:
visitorAuthone ofOptional
or
revisionstringRequired

ID of the active revision in the space.

defaultLevelone ofRequired

Default level for a piece of content

string · enumOptional

"The role of a member in an organization. "admin": Can administrate the content: create, delete spaces, ... "create": Can create content. "review": Can review content. "edit": Can edit the content (live or change requests). "comment": Can access the content and its discussions. "read": Can access the content, but cannot update it in any way.

Possible values:
or
nullOptional
or
string · enumOptionalPossible values:
commentsnumberRequired

Count of opened comments on the space.

changeRequestsnumberRequired

Total count of change requests on the space.

changeRequestsOpennumberRequired

Count of open change requests on the space.

changeRequestsDraftnumberRequired

Count of draft change requests on the space.

internal_poweredByV2booleanOptional

Whether the space is powered by V2 of the content system.

internal_singleWebsocketbooleanOptional

Whether the space uses a single websocket connection for all real-time communication.

The Space object

Get full details of a space by its ID

get

Returns the full metadata for a space. Use this to resolve a spaceId into a complete Space object. If you only need content, use the content endpoint instead.

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

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Query parameters
shareKeystringOptional

For sites published via share-links, the share key is useful to resolve published URLs.

Responses
200

OK

application/json
objectstring · enumRequired

Type of Object, always equals to "space"

Possible values:
idstringRequired

Unique identifier for the space

titlestring · max: 50Required

Title of the space

emojistring · emoji · max: 50Required

An emoji for this space. It'll match the emoji shown in the GitBook app.

Example: 🎉
visibilitystring · enumRequired
  • public: Anyone can access the content, and the content is indexed by search engines.
  • unlisted: Anyone can access the content, and the content is not indexed by search engines
  • share-link: Anyone with a secret token in the url can access the content.
  • visitor-auth: Anyone authenticated through a JWT token can access the content.
  • in-collection: Anyone who can access the parent collection can access the content. Only available for spaces in a collection.
  • private: Authorized members can access the content.
Possible values:
createdAtstring · date-timeRequired
updatedAtstring · date-timeRequired
deletedAtstring · date-timeOptional
editModestring · enumOptional

Determines how a Space can be edited.

  • live: Users can directly edit the space
  • locked: All edits are locked for this space.
Possible values:
typestring · enumOptional

Kind of space. Only set to styleguide for spaces holding a team's writing styleguide; omitted for regular spaces.

Possible values:
mergeRulesone ofRequired
or
or
organizationstringRequired

ID of the organization owning this space

parentstringOptional

ID of the parent collection.

languagestring · enumOptionalPossible values:
visitorAuthone ofOptional
or
revisionstringRequired

ID of the active revision in the space.

defaultLevelone ofRequired

Default level for a piece of content

string · enumOptional

"The role of a member in an organization. "admin": Can administrate the content: create, delete spaces, ... "create": Can create content. "review": Can review content. "edit": Can edit the content (live or change requests). "comment": Can access the content and its discussions. "read": Can access the content, but cannot update it in any way.

Possible values:
or
nullOptional
or
string · enumOptionalPossible values:
commentsnumberRequired

Count of opened comments on the space.

changeRequestsnumberRequired

Total count of change requests on the space.

changeRequestsOpennumberRequired

Count of open change requests on the space.

changeRequestsDraftnumberRequired

Count of draft change requests on the space.

internal_poweredByV2booleanOptional

Whether the space is powered by V2 of the content system.

internal_singleWebsocketbooleanOptional

Whether the space uses a single websocket connection for all real-time communication.

get/spaces/{spaceId}
200

OK

Delete a space

delete

Deleted spaces will be permanently removed after 7 days.

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

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Responses
delete/spaces/{spaceId}

No content

Update a space's title, icon, or settings

patch

Updates a space's metadata and settings. To update page content, use the change-request workflow instead.

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

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Body
and
anyOptional
or
or
Responses
200

The space has been updated

application/json
objectstring · enumRequired

Type of Object, always equals to "space"

Possible values:
idstringRequired

Unique identifier for the space

titlestring · max: 50Required

Title of the space

emojistring · emoji · max: 50Required

An emoji for this space. It'll match the emoji shown in the GitBook app.

Example: 🎉
visibilitystring · enumRequired
  • public: Anyone can access the content, and the content is indexed by search engines.
  • unlisted: Anyone can access the content, and the content is not indexed by search engines
  • share-link: Anyone with a secret token in the url can access the content.
  • visitor-auth: Anyone authenticated through a JWT token can access the content.
  • in-collection: Anyone who can access the parent collection can access the content. Only available for spaces in a collection.
  • private: Authorized members can access the content.
Possible values:
createdAtstring · date-timeRequired
updatedAtstring · date-timeRequired
deletedAtstring · date-timeOptional
editModestring · enumOptional

Determines how a Space can be edited.

  • live: Users can directly edit the space
  • locked: All edits are locked for this space.
Possible values:
typestring · enumOptional

Kind of space. Only set to styleguide for spaces holding a team's writing styleguide; omitted for regular spaces.

Possible values:
mergeRulesone ofRequired
or
or
organizationstringRequired

ID of the organization owning this space

parentstringOptional

ID of the parent collection.

languagestring · enumOptionalPossible values:
visitorAuthone ofOptional
or
revisionstringRequired

ID of the active revision in the space.

defaultLevelone ofRequired

Default level for a piece of content

string · enumOptional

"The role of a member in an organization. "admin": Can administrate the content: create, delete spaces, ... "create": Can create content. "review": Can review content. "edit": Can edit the content (live or change requests). "comment": Can access the content and its discussions. "read": Can access the content, but cannot update it in any way.

Possible values:
or
nullOptional
or
string · enumOptionalPossible values:
commentsnumberRequired

Count of opened comments on the space.

changeRequestsnumberRequired

Total count of change requests on the space.

changeRequestsOpennumberRequired

Count of open change requests on the space.

changeRequestsDraftnumberRequired

Count of draft change requests on the space.

internal_poweredByV2booleanOptional

Whether the space is powered by V2 of the content system.

internal_singleWebsocketbooleanOptional

Whether the space uses a single websocket connection for all real-time communication.

patch/spaces/{spaceId}
200

The space has been updated

Create a full copy of a space

post

Creates a new space that is a complete copy of the specified space, including all pages and their content. The duplicate is created in the same organization. Returns the newly created space. Use this to create a template-based copy or to snapshot a space before making large changes.

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

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Responses
post/spaces/{spaceId}/duplicate
201

Space duplicated

Restore a recently deleted space from the trash

post

Restores a previously deleted space, making it active again. Only spaces deleted within the last 7 days can be restored; after that they are permanently removed. Returns the restored space object. To delete a space, use the space delete endpoint.

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

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Responses
200

Space restored

application/json
objectstring · enumRequired

Type of Object, always equals to "space"

Possible values:
idstringRequired

Unique identifier for the space

titlestring · max: 50Required

Title of the space

emojistring · emoji · max: 50Required

An emoji for this space. It'll match the emoji shown in the GitBook app.

Example: 🎉
visibilitystring · enumRequired
  • public: Anyone can access the content, and the content is indexed by search engines.
  • unlisted: Anyone can access the content, and the content is not indexed by search engines
  • share-link: Anyone with a secret token in the url can access the content.
  • visitor-auth: Anyone authenticated through a JWT token can access the content.
  • in-collection: Anyone who can access the parent collection can access the content. Only available for spaces in a collection.
  • private: Authorized members can access the content.
Possible values:
createdAtstring · date-timeRequired
updatedAtstring · date-timeRequired
deletedAtstring · date-timeOptional
editModestring · enumOptional

Determines how a Space can be edited.

  • live: Users can directly edit the space
  • locked: All edits are locked for this space.
Possible values:
typestring · enumOptional

Kind of space. Only set to styleguide for spaces holding a team's writing styleguide; omitted for regular spaces.

Possible values:
mergeRulesone ofRequired
or
or
organizationstringRequired

ID of the organization owning this space

parentstringOptional

ID of the parent collection.

languagestring · enumOptionalPossible values:
visitorAuthone ofOptional
or
revisionstringRequired

ID of the active revision in the space.

defaultLevelone ofRequired

Default level for a piece of content

string · enumOptional

"The role of a member in an organization. "admin": Can administrate the content: create, delete spaces, ... "create": Can create content. "review": Can review content. "edit": Can edit the content (live or change requests). "comment": Can access the content and its discussions. "read": Can access the content, but cannot update it in any way.

Possible values:
or
nullOptional
or
string · enumOptionalPossible values:
commentsnumberRequired

Count of opened comments on the space.

changeRequestsnumberRequired

Total count of change requests on the space.

changeRequestsOpennumberRequired

Count of open change requests on the space.

changeRequestsDraftnumberRequired

Count of draft change requests on the space.

internal_poweredByV2booleanOptional

Whether the space is powered by V2 of the content system.

internal_singleWebsocketbooleanOptional

Whether the space uses a single websocket connection for all real-time communication.

post/spaces/{spaceId}/restore
200

Space restored

Move a space to a different collection or position

post

Moves a space to a new parent collection and/or a new position within the hierarchy.

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

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Body
parentstring · nullableOptional

The unique id of the parent collection

Responses
200

Space moved

application/json
objectstring · enumRequired

Type of Object, always equals to "space"

Possible values:
idstringRequired

Unique identifier for the space

titlestring · max: 50Required

Title of the space

emojistring · emoji · max: 50Required

An emoji for this space. It'll match the emoji shown in the GitBook app.

Example: 🎉
visibilitystring · enumRequired
  • public: Anyone can access the content, and the content is indexed by search engines.
  • unlisted: Anyone can access the content, and the content is not indexed by search engines
  • share-link: Anyone with a secret token in the url can access the content.
  • visitor-auth: Anyone authenticated through a JWT token can access the content.
  • in-collection: Anyone who can access the parent collection can access the content. Only available for spaces in a collection.
  • private: Authorized members can access the content.
Possible values:
createdAtstring · date-timeRequired
updatedAtstring · date-timeRequired
deletedAtstring · date-timeOptional
editModestring · enumOptional

Determines how a Space can be edited.

  • live: Users can directly edit the space
  • locked: All edits are locked for this space.
Possible values:
typestring · enumOptional

Kind of space. Only set to styleguide for spaces holding a team's writing styleguide; omitted for regular spaces.

Possible values:
mergeRulesone ofRequired
or
or
organizationstringRequired

ID of the organization owning this space

parentstringOptional

ID of the parent collection.

languagestring · enumOptionalPossible values:
visitorAuthone ofOptional
or
revisionstringRequired

ID of the active revision in the space.

defaultLevelone ofRequired

Default level for a piece of content

string · enumOptional

"The role of a member in an organization. "admin": Can administrate the content: create, delete spaces, ... "create": Can create content. "review": Can review content. "edit": Can edit the content (live or change requests). "comment": Can access the content and its discussions. "read": Can access the content, but cannot update it in any way.

Possible values:
or
nullOptional
or
string · enumOptionalPossible values:
commentsnumberRequired

Count of opened comments on the space.

changeRequestsnumberRequired

Total count of change requests on the space.

changeRequestsOpennumberRequired

Count of open change requests on the space.

changeRequestsDraftnumberRequired

Count of draft change requests on the space.

internal_poweredByV2booleanOptional

Whether the space is powered by V2 of the content system.

internal_singleWebsocketbooleanOptional

Whether the space uses a single websocket connection for all real-time communication.

post/spaces/{spaceId}/move
get

Returns a paginated list of all internal and external links found in the space's content. Use this to audit link health across an entire space.

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

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

statusstring · enumOptional

Text to display to represent the reference. Possible values include:

  • ok - No problems detected for this content reference.
  • broken - The target does not exist in the revision.
  • in-app - The target is a URL link pointing to an internal location in the app.
Possible values:
Responses
200

OK

application/json
countnumberOptional

Total count of objects in the list

get/spaces/{spaceId}/links

List all spaces in an organization

get

Returns a paginated list of all spaces belonging to the organization. A space is a collection of documentation pages with its own content tree and revision history. Use this to discover spaces before reading their content, adding them to a site, or performing operations on specific spaces.

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

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

Responses
200

OK

application/json
countnumberOptional

Total count of objects in the list

get/orgs/{organizationId}/spaces
200

OK

Create a new documentation space in an organization

post

Creates a new space within the organization. A space is the primary container for documentation content, holding pages, files, and revisions. After creation, add the space to a site to make it publicly accessible, or start adding content directly via the space content endpoints.

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

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Body
and
anyOptional
or
anyOptional
or
or
Responses
post/orgs/{organizationId}/spaces
201

Space created

Last updated

Was this helpful?

AltStyle によって変換されたページ (->オリジナル) /