# 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

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"components":{"schemas":{"Space":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"space\"","enum":["space"]},"id":{"type":"string","description":"Unique identifier for the space"},"title":{"$ref":"#/components/schemas/SpaceTitle"},"emoji":{"description":"An emoji for this space. It'll match the emoji shown in the GitBook app.","$ref":"#/components/schemas/Emoji"},"visibility":{"$ref":"#/components/schemas/ContentVisibility"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"deletedAt":{"$ref":"#/components/schemas/Timestamp"},"editMode":{"$ref":"#/components/schemas/SpaceEditMode"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesSpaceConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the space in the API","format":"uri"},"app":{"type":"string","description":"URL of the space in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the space. Only defined when visibility is not \"private.\"","format":"uri"},"public":{"type":"string","description":"URL of the public version of the space. Only defined when visibility is \"public\".","format":"uri"},"icon":{"description":"URL of the icon of this space, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"organization":{"type":"string","description":"ID of the organization owning this space"},"parent":{"type":"string","description":"ID of the parent collection."},"language":{"$ref":"#/components/schemas/TranslationLanguage"},"gitSync":{"$ref":"#/components/schemas/GitSyncState"},"visitorAuth":{"$ref":"#/components/schemas/VisitorAuth"},"revision":{"type":"string","description":"ID of the active revision in the space."},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"comments":{"type":"number","description":"Count of opened comments on the space."},"changeRequests":{"type":"number","description":"Total count of change requests on the space."},"changeRequestsOpen":{"type":"number","description":"Count of open change requests on the space."},"changeRequestsDraft":{"type":"number","description":"Count of draft change requests on the space."},"internal_poweredByV2":{"type":"boolean","description":"Whether the space is powered by V2 of the content system."},"internal_singleWebsocket":{"type":"boolean","description":"Whether the space uses a single websocket connection for all real-time communication."},"permissions":{"type":"object","description":"The set of permissions for the space","properties":{"view":{"type":"boolean","description":"Can the user view the space content."},"access":{"type":"boolean","description":"Can the user access the space in the application."},"admin":{"type":"boolean","description":"Can the user edit the title, install integrations, and manage the space."},"viewInviteLinks":{"type":"boolean","description":"Can the user view the invite links of the space."},"edit":{"type":"boolean","description":"Can the user edit the content of the space by creating a change request."},"triggerGitSync":{"type":"boolean","description":"Can the user trigger a git sync."},"comment":{"type":"boolean","description":"Can the user comment on the content."},"merge":{"type":"boolean","description":"Can the user merge change requests."},"review":{"type":"boolean","description":"Can the user review change requests."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the space."}},"required":["view","access","admin","viewInviteLinks","edit","triggerGitSync","comment","merge","review","installIntegration"]}},"required":["object","id","title","emoji","organization","visibility","revision","createdAt","updatedAt","comments","changeRequests","changeRequestsOpen","changeRequestsDraft","mergeRules","urls","defaultLevel","permissions"]},"SpaceTitle":{"type":"string","description":"Title of the space","maxLength":50},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"ContentVisibility":{"type":"string","description":"* `public`: Anyone can access the content, and the content is indexed by search engines.\n* `unlisted`: Anyone can access the content, and the content is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the content.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the content.\n* `in-collection`: Anyone who can access the parent collection can access the content.\n  Only available for spaces in a collection.\n* `private`: Authorized members can access the content.\n","enum":["public","unlisted","share-link","visitor-auth","in-collection","private"]},"Timestamp":{"type":"string","format":"date-time"},"SpaceEditMode":{"type":"string","description":"Determines how a Space can be edited.\n* `live`: Users can directly edit the space\n* `locked`: All edits are locked for this space.\n","enum":["live","locked"]},"MergeRulesSpaceConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationInherit"},{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"}]},"MergeRulesConfigurationInherit":{"type":"object","description":"The merge rules inherits from the organization configuration.","properties":{"type":{"type":"string","enum":["inherit"]}},"required":["type"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"URL":{"type":"string","format":"uri","maxLength":2048},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","yue","ko","ar","hi","nl","pl","tr","sv","no","da","fi","el","cs","hu","ro","th","vi","id","ms","he","uk","sk","bg","hr","lt","lv","et","sl"]},"GitSyncState":{"type":"object","properties":{"repoName":{"type":"string","description":"Repository name."},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","description":"The integration name providing the Git Sync."},"url":{"type":"string","description":"The URL to the repository tree, used when rendering public content."},"updatedAt":{"description":"When the Git provider details were last updated","$ref":"#/components/schemas/Timestamp"}}},"GitSyncProvider":{"type":"string","description":"The provider of the Git Sync installation.","enum":["github","gitlab","github-legacy"]},"VisitorAuth":{"oneOf":[{"$ref":"#/components/schemas/VisitorAuthCustomBackend"},{"allOf":[{"$ref":"#/components/schemas/VisitorAuthIntegrationBackend"},{"type":"object","properties":{"integration":{"type":"string","description":"Name of integration being used as the backend for authenticated access"}},"required":["integration"]}]}]},"VisitorAuthCustomBackend":{"type":"object","title":"Custom backend for authenticated access","properties":{"backend":{"type":"string","description":"Custom backend for authenticated access","enum":["custom"]}},"required":["backend"]},"VisitorAuthIntegrationBackend":{"type":"object","title":"Integration backend for authenticated access","properties":{"backend":{"type":"string","description":"Integration as backend for authenticated access","enum":["integration"]}},"required":["backend"]},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]}}}}
```

## GET /spaces/{spaceId}

> Get a space by its ID

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"spaces","description":"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.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"Space\" grouped=\"false\" %}\n    The Space object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"spaceId":{"name":"spaceId","in":"path","required":true,"description":"The unique id of the space","schema":{"$ref":"#/components/schemas/EntityId"}},"siteShareKey":{"name":"shareKey","in":"query","description":"For sites published via share-links, the share key is useful to resolve published URLs.","schema":{"type":"string"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"Space":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"space\"","enum":["space"]},"id":{"type":"string","description":"Unique identifier for the space"},"title":{"$ref":"#/components/schemas/SpaceTitle"},"emoji":{"description":"An emoji for this space. It'll match the emoji shown in the GitBook app.","$ref":"#/components/schemas/Emoji"},"visibility":{"$ref":"#/components/schemas/ContentVisibility"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"deletedAt":{"$ref":"#/components/schemas/Timestamp"},"editMode":{"$ref":"#/components/schemas/SpaceEditMode"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesSpaceConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the space in the API","format":"uri"},"app":{"type":"string","description":"URL of the space in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the space. Only defined when visibility is not \"private.\"","format":"uri"},"public":{"type":"string","description":"URL of the public version of the space. Only defined when visibility is \"public\".","format":"uri"},"icon":{"description":"URL of the icon of this space, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"organization":{"type":"string","description":"ID of the organization owning this space"},"parent":{"type":"string","description":"ID of the parent collection."},"language":{"$ref":"#/components/schemas/TranslationLanguage"},"gitSync":{"$ref":"#/components/schemas/GitSyncState"},"visitorAuth":{"$ref":"#/components/schemas/VisitorAuth"},"revision":{"type":"string","description":"ID of the active revision in the space."},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"comments":{"type":"number","description":"Count of opened comments on the space."},"changeRequests":{"type":"number","description":"Total count of change requests on the space."},"changeRequestsOpen":{"type":"number","description":"Count of open change requests on the space."},"changeRequestsDraft":{"type":"number","description":"Count of draft change requests on the space."},"internal_poweredByV2":{"type":"boolean","description":"Whether the space is powered by V2 of the content system."},"internal_singleWebsocket":{"type":"boolean","description":"Whether the space uses a single websocket connection for all real-time communication."},"permissions":{"type":"object","description":"The set of permissions for the space","properties":{"view":{"type":"boolean","description":"Can the user view the space content."},"access":{"type":"boolean","description":"Can the user access the space in the application."},"admin":{"type":"boolean","description":"Can the user edit the title, install integrations, and manage the space."},"viewInviteLinks":{"type":"boolean","description":"Can the user view the invite links of the space."},"edit":{"type":"boolean","description":"Can the user edit the content of the space by creating a change request."},"triggerGitSync":{"type":"boolean","description":"Can the user trigger a git sync."},"comment":{"type":"boolean","description":"Can the user comment on the content."},"merge":{"type":"boolean","description":"Can the user merge change requests."},"review":{"type":"boolean","description":"Can the user review change requests."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the space."}},"required":["view","access","admin","viewInviteLinks","edit","triggerGitSync","comment","merge","review","installIntegration"]}},"required":["object","id","title","emoji","organization","visibility","revision","createdAt","updatedAt","comments","changeRequests","changeRequestsOpen","changeRequestsDraft","mergeRules","urls","defaultLevel","permissions"]},"SpaceTitle":{"type":"string","description":"Title of the space","maxLength":50},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"ContentVisibility":{"type":"string","description":"* `public`: Anyone can access the content, and the content is indexed by search engines.\n* `unlisted`: Anyone can access the content, and the content is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the content.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the content.\n* `in-collection`: Anyone who can access the parent collection can access the content.\n  Only available for spaces in a collection.\n* `private`: Authorized members can access the content.\n","enum":["public","unlisted","share-link","visitor-auth","in-collection","private"]},"Timestamp":{"type":"string","format":"date-time"},"SpaceEditMode":{"type":"string","description":"Determines how a Space can be edited.\n* `live`: Users can directly edit the space\n* `locked`: All edits are locked for this space.\n","enum":["live","locked"]},"MergeRulesSpaceConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationInherit"},{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"}]},"MergeRulesConfigurationInherit":{"type":"object","description":"The merge rules inherits from the organization configuration.","properties":{"type":{"type":"string","enum":["inherit"]}},"required":["type"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"URL":{"type":"string","format":"uri","maxLength":2048},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","yue","ko","ar","hi","nl","pl","tr","sv","no","da","fi","el","cs","hu","ro","th","vi","id","ms","he","uk","sk","bg","hr","lt","lv","et","sl"]},"GitSyncState":{"type":"object","properties":{"repoName":{"type":"string","description":"Repository name."},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","description":"The integration name providing the Git Sync."},"url":{"type":"string","description":"The URL to the repository tree, used when rendering public content."},"updatedAt":{"description":"When the Git provider details were last updated","$ref":"#/components/schemas/Timestamp"}}},"GitSyncProvider":{"type":"string","description":"The provider of the Git Sync installation.","enum":["github","gitlab","github-legacy"]},"VisitorAuth":{"oneOf":[{"$ref":"#/components/schemas/VisitorAuthCustomBackend"},{"allOf":[{"$ref":"#/components/schemas/VisitorAuthIntegrationBackend"},{"type":"object","properties":{"integration":{"type":"string","description":"Name of integration being used as the backend for authenticated access"}},"required":["integration"]}]}]},"VisitorAuthCustomBackend":{"type":"object","title":"Custom backend for authenticated access","properties":{"backend":{"type":"string","description":"Custom backend for authenticated access","enum":["custom"]}},"required":["backend"]},"VisitorAuthIntegrationBackend":{"type":"object","title":"Integration backend for authenticated access","properties":{"backend":{"type":"string","description":"Integration as backend for authenticated access","enum":["integration"]}},"required":["backend"]},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]}}},"paths":{"/spaces/{spaceId}":{"get":{"operationId":"getSpaceById","summary":"Get a space by its ID","tags":["spaces","critical"],"parameters":[{"$ref":"#/components/parameters/spaceId"},{"$ref":"#/components/parameters/siteShareKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}}}}}}}}
```

## Delete a space

> Deleted spaces will be permanently removed after 7 days.

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"spaces","description":"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.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"Space\" grouped=\"false\" %}\n    The Space object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"spaceId":{"name":"spaceId","in":"path","required":true,"description":"The unique id of the space","schema":{"$ref":"#/components/schemas/EntityId"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"}}},"paths":{"/spaces/{spaceId}":{"delete":{"operationId":"deleteSpaceById","summary":"Delete a space","description":"Deleted spaces will be permanently removed after 7 days.","tags":["spaces"],"parameters":[{"$ref":"#/components/parameters/spaceId"}],"responses":{"204":{"description":"Space did not exist"},"205":{"description":"Space has been deleted"}}}}}}
```

## PATCH /spaces/{spaceId}

> Update a space

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"spaces","description":"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.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"Space\" grouped=\"false\" %}\n    The Space object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"spaceId":{"name":"spaceId","in":"path","required":true,"description":"The unique id of the space","schema":{"$ref":"#/components/schemas/EntityId"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"SpaceEditMode":{"type":"string","description":"Determines how a Space can be edited.\n* `live`: Users can directly edit the space\n* `locked`: All edits are locked for this space.\n","enum":["live","locked"]},"SpaceTitle":{"type":"string","description":"Title of the space","maxLength":50},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","yue","ko","ar","hi","nl","pl","tr","sv","no","da","fi","el","cs","hu","ro","th","vi","id","ms","he","uk","sk","bg","hr","lt","lv","et","sl"]},"MergeRulesSpaceConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationInherit"},{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"}]},"MergeRulesConfigurationInherit":{"type":"object","description":"The merge rules inherits from the organization configuration.","properties":{"type":{"type":"string","enum":["inherit"]}},"required":["type"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"URL":{"type":"string","format":"uri","maxLength":2048},"Space":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"space\"","enum":["space"]},"id":{"type":"string","description":"Unique identifier for the space"},"title":{"$ref":"#/components/schemas/SpaceTitle"},"emoji":{"description":"An emoji for this space. It'll match the emoji shown in the GitBook app.","$ref":"#/components/schemas/Emoji"},"visibility":{"$ref":"#/components/schemas/ContentVisibility"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"deletedAt":{"$ref":"#/components/schemas/Timestamp"},"editMode":{"$ref":"#/components/schemas/SpaceEditMode"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesSpaceConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the space in the API","format":"uri"},"app":{"type":"string","description":"URL of the space in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the space. Only defined when visibility is not \"private.\"","format":"uri"},"public":{"type":"string","description":"URL of the public version of the space. Only defined when visibility is \"public\".","format":"uri"},"icon":{"description":"URL of the icon of this space, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"organization":{"type":"string","description":"ID of the organization owning this space"},"parent":{"type":"string","description":"ID of the parent collection."},"language":{"$ref":"#/components/schemas/TranslationLanguage"},"gitSync":{"$ref":"#/components/schemas/GitSyncState"},"visitorAuth":{"$ref":"#/components/schemas/VisitorAuth"},"revision":{"type":"string","description":"ID of the active revision in the space."},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"comments":{"type":"number","description":"Count of opened comments on the space."},"changeRequests":{"type":"number","description":"Total count of change requests on the space."},"changeRequestsOpen":{"type":"number","description":"Count of open change requests on the space."},"changeRequestsDraft":{"type":"number","description":"Count of draft change requests on the space."},"internal_poweredByV2":{"type":"boolean","description":"Whether the space is powered by V2 of the content system."},"internal_singleWebsocket":{"type":"boolean","description":"Whether the space uses a single websocket connection for all real-time communication."},"permissions":{"type":"object","description":"The set of permissions for the space","properties":{"view":{"type":"boolean","description":"Can the user view the space content."},"access":{"type":"boolean","description":"Can the user access the space in the application."},"admin":{"type":"boolean","description":"Can the user edit the title, install integrations, and manage the space."},"viewInviteLinks":{"type":"boolean","description":"Can the user view the invite links of the space."},"edit":{"type":"boolean","description":"Can the user edit the content of the space by creating a change request."},"triggerGitSync":{"type":"boolean","description":"Can the user trigger a git sync."},"comment":{"type":"boolean","description":"Can the user comment on the content."},"merge":{"type":"boolean","description":"Can the user merge change requests."},"review":{"type":"boolean","description":"Can the user review change requests."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the space."}},"required":["view","access","admin","viewInviteLinks","edit","triggerGitSync","comment","merge","review","installIntegration"]}},"required":["object","id","title","emoji","organization","visibility","revision","createdAt","updatedAt","comments","changeRequests","changeRequestsOpen","changeRequestsDraft","mergeRules","urls","defaultLevel","permissions"]},"ContentVisibility":{"type":"string","description":"* `public`: Anyone can access the content, and the content is indexed by search engines.\n* `unlisted`: Anyone can access the content, and the content is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the content.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the content.\n* `in-collection`: Anyone who can access the parent collection can access the content.\n  Only available for spaces in a collection.\n* `private`: Authorized members can access the content.\n","enum":["public","unlisted","share-link","visitor-auth","in-collection","private"]},"Timestamp":{"type":"string","format":"date-time"},"GitSyncState":{"type":"object","properties":{"repoName":{"type":"string","description":"Repository name."},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","description":"The integration name providing the Git Sync."},"url":{"type":"string","description":"The URL to the repository tree, used when rendering public content."},"updatedAt":{"description":"When the Git provider details were last updated","$ref":"#/components/schemas/Timestamp"}}},"GitSyncProvider":{"type":"string","description":"The provider of the Git Sync installation.","enum":["github","gitlab","github-legacy"]},"VisitorAuth":{"oneOf":[{"$ref":"#/components/schemas/VisitorAuthCustomBackend"},{"allOf":[{"$ref":"#/components/schemas/VisitorAuthIntegrationBackend"},{"type":"object","properties":{"integration":{"type":"string","description":"Name of integration being used as the backend for authenticated access"}},"required":["integration"]}]}]},"VisitorAuthCustomBackend":{"type":"object","title":"Custom backend for authenticated access","properties":{"backend":{"type":"string","description":"Custom backend for authenticated access","enum":["custom"]}},"required":["backend"]},"VisitorAuthIntegrationBackend":{"type":"object","title":"Integration backend for authenticated access","properties":{"backend":{"type":"string","description":"Integration as backend for authenticated access","enum":["integration"]}},"required":["backend"]}}},"paths":{"/spaces/{spaceId}":{"patch":{"operationId":"updateSpaceById","summary":"Update a space","tags":["spaces"],"parameters":[{"$ref":"#/components/parameters/spaceId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"editMode":{"$ref":"#/components/schemas/SpaceEditMode"},"title":{"$ref":"#/components/schemas/SpaceTitle"},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"language":{"$ref":"#/components/schemas/TranslationLanguage"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesSpaceConfiguration"}}},{"oneOf":[{"type":"object","title":"Emoji","properties":{"emoji":{"$ref":"#/components/schemas/Emoji"}},"required":["emoji"]},{"type":"object","title":"Icon","properties":{"icon":{"$ref":"#/components/schemas/URL"}},"required":["icon"]},{"type":"object","title":"Remove icon or emoji","properties":{"emoji":{"type":"null"},"icon":{"type":"null"}}}]}]}}}},"responses":{"200":{"description":"The space has been updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}}}}}}}}
```

## POST /spaces/{spaceId}/duplicate

> Duplicate a space

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"spaces","description":"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.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"Space\" grouped=\"false\" %}\n    The Space object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"spaceId":{"name":"spaceId","in":"path","required":true,"description":"The unique id of the space","schema":{"$ref":"#/components/schemas/EntityId"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"Space":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"space\"","enum":["space"]},"id":{"type":"string","description":"Unique identifier for the space"},"title":{"$ref":"#/components/schemas/SpaceTitle"},"emoji":{"description":"An emoji for this space. It'll match the emoji shown in the GitBook app.","$ref":"#/components/schemas/Emoji"},"visibility":{"$ref":"#/components/schemas/ContentVisibility"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"deletedAt":{"$ref":"#/components/schemas/Timestamp"},"editMode":{"$ref":"#/components/schemas/SpaceEditMode"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesSpaceConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the space in the API","format":"uri"},"app":{"type":"string","description":"URL of the space in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the space. Only defined when visibility is not \"private.\"","format":"uri"},"public":{"type":"string","description":"URL of the public version of the space. Only defined when visibility is \"public\".","format":"uri"},"icon":{"description":"URL of the icon of this space, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"organization":{"type":"string","description":"ID of the organization owning this space"},"parent":{"type":"string","description":"ID of the parent collection."},"language":{"$ref":"#/components/schemas/TranslationLanguage"},"gitSync":{"$ref":"#/components/schemas/GitSyncState"},"visitorAuth":{"$ref":"#/components/schemas/VisitorAuth"},"revision":{"type":"string","description":"ID of the active revision in the space."},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"comments":{"type":"number","description":"Count of opened comments on the space."},"changeRequests":{"type":"number","description":"Total count of change requests on the space."},"changeRequestsOpen":{"type":"number","description":"Count of open change requests on the space."},"changeRequestsDraft":{"type":"number","description":"Count of draft change requests on the space."},"internal_poweredByV2":{"type":"boolean","description":"Whether the space is powered by V2 of the content system."},"internal_singleWebsocket":{"type":"boolean","description":"Whether the space uses a single websocket connection for all real-time communication."},"permissions":{"type":"object","description":"The set of permissions for the space","properties":{"view":{"type":"boolean","description":"Can the user view the space content."},"access":{"type":"boolean","description":"Can the user access the space in the application."},"admin":{"type":"boolean","description":"Can the user edit the title, install integrations, and manage the space."},"viewInviteLinks":{"type":"boolean","description":"Can the user view the invite links of the space."},"edit":{"type":"boolean","description":"Can the user edit the content of the space by creating a change request."},"triggerGitSync":{"type":"boolean","description":"Can the user trigger a git sync."},"comment":{"type":"boolean","description":"Can the user comment on the content."},"merge":{"type":"boolean","description":"Can the user merge change requests."},"review":{"type":"boolean","description":"Can the user review change requests."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the space."}},"required":["view","access","admin","viewInviteLinks","edit","triggerGitSync","comment","merge","review","installIntegration"]}},"required":["object","id","title","emoji","organization","visibility","revision","createdAt","updatedAt","comments","changeRequests","changeRequestsOpen","changeRequestsDraft","mergeRules","urls","defaultLevel","permissions"]},"SpaceTitle":{"type":"string","description":"Title of the space","maxLength":50},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"ContentVisibility":{"type":"string","description":"* `public`: Anyone can access the content, and the content is indexed by search engines.\n* `unlisted`: Anyone can access the content, and the content is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the content.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the content.\n* `in-collection`: Anyone who can access the parent collection can access the content.\n  Only available for spaces in a collection.\n* `private`: Authorized members can access the content.\n","enum":["public","unlisted","share-link","visitor-auth","in-collection","private"]},"Timestamp":{"type":"string","format":"date-time"},"SpaceEditMode":{"type":"string","description":"Determines how a Space can be edited.\n* `live`: Users can directly edit the space\n* `locked`: All edits are locked for this space.\n","enum":["live","locked"]},"MergeRulesSpaceConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationInherit"},{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"}]},"MergeRulesConfigurationInherit":{"type":"object","description":"The merge rules inherits from the organization configuration.","properties":{"type":{"type":"string","enum":["inherit"]}},"required":["type"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"URL":{"type":"string","format":"uri","maxLength":2048},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","yue","ko","ar","hi","nl","pl","tr","sv","no","da","fi","el","cs","hu","ro","th","vi","id","ms","he","uk","sk","bg","hr","lt","lv","et","sl"]},"GitSyncState":{"type":"object","properties":{"repoName":{"type":"string","description":"Repository name."},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","description":"The integration name providing the Git Sync."},"url":{"type":"string","description":"The URL to the repository tree, used when rendering public content."},"updatedAt":{"description":"When the Git provider details were last updated","$ref":"#/components/schemas/Timestamp"}}},"GitSyncProvider":{"type":"string","description":"The provider of the Git Sync installation.","enum":["github","gitlab","github-legacy"]},"VisitorAuth":{"oneOf":[{"$ref":"#/components/schemas/VisitorAuthCustomBackend"},{"allOf":[{"$ref":"#/components/schemas/VisitorAuthIntegrationBackend"},{"type":"object","properties":{"integration":{"type":"string","description":"Name of integration being used as the backend for authenticated access"}},"required":["integration"]}]}]},"VisitorAuthCustomBackend":{"type":"object","title":"Custom backend for authenticated access","properties":{"backend":{"type":"string","description":"Custom backend for authenticated access","enum":["custom"]}},"required":["backend"]},"VisitorAuthIntegrationBackend":{"type":"object","title":"Integration backend for authenticated access","properties":{"backend":{"type":"string","description":"Integration as backend for authenticated access","enum":["integration"]}},"required":["backend"]},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]}}},"paths":{"/spaces/{spaceId}/duplicate":{"post":{"operationId":"duplicateSpace","summary":"Duplicate a space","tags":["spaces"],"parameters":[{"$ref":"#/components/parameters/spaceId"}],"responses":{"201":{"description":"Space duplicated","headers":{"Location":{"description":"API URL for the newly created space","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}}}}}}}}
```

## Restore a deleted space

> Only spaces deleted in the last 7 days can be restored.

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"spaces","description":"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.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"Space\" grouped=\"false\" %}\n    The Space object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"spaceId":{"name":"spaceId","in":"path","required":true,"description":"The unique id of the space","schema":{"$ref":"#/components/schemas/EntityId"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"Space":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"space\"","enum":["space"]},"id":{"type":"string","description":"Unique identifier for the space"},"title":{"$ref":"#/components/schemas/SpaceTitle"},"emoji":{"description":"An emoji for this space. It'll match the emoji shown in the GitBook app.","$ref":"#/components/schemas/Emoji"},"visibility":{"$ref":"#/components/schemas/ContentVisibility"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"deletedAt":{"$ref":"#/components/schemas/Timestamp"},"editMode":{"$ref":"#/components/schemas/SpaceEditMode"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesSpaceConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the space in the API","format":"uri"},"app":{"type":"string","description":"URL of the space in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the space. Only defined when visibility is not \"private.\"","format":"uri"},"public":{"type":"string","description":"URL of the public version of the space. Only defined when visibility is \"public\".","format":"uri"},"icon":{"description":"URL of the icon of this space, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"organization":{"type":"string","description":"ID of the organization owning this space"},"parent":{"type":"string","description":"ID of the parent collection."},"language":{"$ref":"#/components/schemas/TranslationLanguage"},"gitSync":{"$ref":"#/components/schemas/GitSyncState"},"visitorAuth":{"$ref":"#/components/schemas/VisitorAuth"},"revision":{"type":"string","description":"ID of the active revision in the space."},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"comments":{"type":"number","description":"Count of opened comments on the space."},"changeRequests":{"type":"number","description":"Total count of change requests on the space."},"changeRequestsOpen":{"type":"number","description":"Count of open change requests on the space."},"changeRequestsDraft":{"type":"number","description":"Count of draft change requests on the space."},"internal_poweredByV2":{"type":"boolean","description":"Whether the space is powered by V2 of the content system."},"internal_singleWebsocket":{"type":"boolean","description":"Whether the space uses a single websocket connection for all real-time communication."},"permissions":{"type":"object","description":"The set of permissions for the space","properties":{"view":{"type":"boolean","description":"Can the user view the space content."},"access":{"type":"boolean","description":"Can the user access the space in the application."},"admin":{"type":"boolean","description":"Can the user edit the title, install integrations, and manage the space."},"viewInviteLinks":{"type":"boolean","description":"Can the user view the invite links of the space."},"edit":{"type":"boolean","description":"Can the user edit the content of the space by creating a change request."},"triggerGitSync":{"type":"boolean","description":"Can the user trigger a git sync."},"comment":{"type":"boolean","description":"Can the user comment on the content."},"merge":{"type":"boolean","description":"Can the user merge change requests."},"review":{"type":"boolean","description":"Can the user review change requests."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the space."}},"required":["view","access","admin","viewInviteLinks","edit","triggerGitSync","comment","merge","review","installIntegration"]}},"required":["object","id","title","emoji","organization","visibility","revision","createdAt","updatedAt","comments","changeRequests","changeRequestsOpen","changeRequestsDraft","mergeRules","urls","defaultLevel","permissions"]},"SpaceTitle":{"type":"string","description":"Title of the space","maxLength":50},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"ContentVisibility":{"type":"string","description":"* `public`: Anyone can access the content, and the content is indexed by search engines.\n* `unlisted`: Anyone can access the content, and the content is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the content.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the content.\n* `in-collection`: Anyone who can access the parent collection can access the content.\n  Only available for spaces in a collection.\n* `private`: Authorized members can access the content.\n","enum":["public","unlisted","share-link","visitor-auth","in-collection","private"]},"Timestamp":{"type":"string","format":"date-time"},"SpaceEditMode":{"type":"string","description":"Determines how a Space can be edited.\n* `live`: Users can directly edit the space\n* `locked`: All edits are locked for this space.\n","enum":["live","locked"]},"MergeRulesSpaceConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationInherit"},{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"}]},"MergeRulesConfigurationInherit":{"type":"object","description":"The merge rules inherits from the organization configuration.","properties":{"type":{"type":"string","enum":["inherit"]}},"required":["type"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"URL":{"type":"string","format":"uri","maxLength":2048},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","yue","ko","ar","hi","nl","pl","tr","sv","no","da","fi","el","cs","hu","ro","th","vi","id","ms","he","uk","sk","bg","hr","lt","lv","et","sl"]},"GitSyncState":{"type":"object","properties":{"repoName":{"type":"string","description":"Repository name."},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","description":"The integration name providing the Git Sync."},"url":{"type":"string","description":"The URL to the repository tree, used when rendering public content."},"updatedAt":{"description":"When the Git provider details were last updated","$ref":"#/components/schemas/Timestamp"}}},"GitSyncProvider":{"type":"string","description":"The provider of the Git Sync installation.","enum":["github","gitlab","github-legacy"]},"VisitorAuth":{"oneOf":[{"$ref":"#/components/schemas/VisitorAuthCustomBackend"},{"allOf":[{"$ref":"#/components/schemas/VisitorAuthIntegrationBackend"},{"type":"object","properties":{"integration":{"type":"string","description":"Name of integration being used as the backend for authenticated access"}},"required":["integration"]}]}]},"VisitorAuthCustomBackend":{"type":"object","title":"Custom backend for authenticated access","properties":{"backend":{"type":"string","description":"Custom backend for authenticated access","enum":["custom"]}},"required":["backend"]},"VisitorAuthIntegrationBackend":{"type":"object","title":"Integration backend for authenticated access","properties":{"backend":{"type":"string","description":"Integration as backend for authenticated access","enum":["integration"]}},"required":["backend"]},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]}}},"paths":{"/spaces/{spaceId}/restore":{"post":{"operationId":"restoreSpace","summary":"Restore a deleted space","description":"Only spaces deleted in the last 7 days can be restored.","tags":["spaces"],"parameters":[{"$ref":"#/components/parameters/spaceId"}],"responses":{"200":{"description":"Space restored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}}}}}}}}
```

## POST /spaces/{spaceId}/move

> Move a space to a new position

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"spaces","description":"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.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"Space\" grouped=\"false\" %}\n    The Space object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"spaceId":{"name":"spaceId","in":"path","required":true,"description":"The unique id of the space","schema":{"$ref":"#/components/schemas/EntityId"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"ContentPosition":{"type":"object","description":"Position at which to insert an item","properties":{"before":{"oneOf":[{"$ref":"#/components/schemas/SpacePointer"},{"$ref":"#/components/schemas/CollectionPointer"}]},"after":{"oneOf":[{"$ref":"#/components/schemas/SpacePointer"},{"$ref":"#/components/schemas/CollectionPointer"}]}}},"SpacePointer":{"type":"object","properties":{"type":{"type":"string","enum":["space"]},"space":{"type":"string","description":"Unique identifier for the space"}},"required":["type","space"]},"CollectionPointer":{"type":"object","properties":{"type":{"type":"string","enum":["collection"]},"collection":{"type":"string","description":"Unique identifier for the collection"}},"required":["type","collection"]},"Space":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"space\"","enum":["space"]},"id":{"type":"string","description":"Unique identifier for the space"},"title":{"$ref":"#/components/schemas/SpaceTitle"},"emoji":{"description":"An emoji for this space. It'll match the emoji shown in the GitBook app.","$ref":"#/components/schemas/Emoji"},"visibility":{"$ref":"#/components/schemas/ContentVisibility"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"deletedAt":{"$ref":"#/components/schemas/Timestamp"},"editMode":{"$ref":"#/components/schemas/SpaceEditMode"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesSpaceConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the space in the API","format":"uri"},"app":{"type":"string","description":"URL of the space in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the space. Only defined when visibility is not \"private.\"","format":"uri"},"public":{"type":"string","description":"URL of the public version of the space. Only defined when visibility is \"public\".","format":"uri"},"icon":{"description":"URL of the icon of this space, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"organization":{"type":"string","description":"ID of the organization owning this space"},"parent":{"type":"string","description":"ID of the parent collection."},"language":{"$ref":"#/components/schemas/TranslationLanguage"},"gitSync":{"$ref":"#/components/schemas/GitSyncState"},"visitorAuth":{"$ref":"#/components/schemas/VisitorAuth"},"revision":{"type":"string","description":"ID of the active revision in the space."},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"comments":{"type":"number","description":"Count of opened comments on the space."},"changeRequests":{"type":"number","description":"Total count of change requests on the space."},"changeRequestsOpen":{"type":"number","description":"Count of open change requests on the space."},"changeRequestsDraft":{"type":"number","description":"Count of draft change requests on the space."},"internal_poweredByV2":{"type":"boolean","description":"Whether the space is powered by V2 of the content system."},"internal_singleWebsocket":{"type":"boolean","description":"Whether the space uses a single websocket connection for all real-time communication."},"permissions":{"type":"object","description":"The set of permissions for the space","properties":{"view":{"type":"boolean","description":"Can the user view the space content."},"access":{"type":"boolean","description":"Can the user access the space in the application."},"admin":{"type":"boolean","description":"Can the user edit the title, install integrations, and manage the space."},"viewInviteLinks":{"type":"boolean","description":"Can the user view the invite links of the space."},"edit":{"type":"boolean","description":"Can the user edit the content of the space by creating a change request."},"triggerGitSync":{"type":"boolean","description":"Can the user trigger a git sync."},"comment":{"type":"boolean","description":"Can the user comment on the content."},"merge":{"type":"boolean","description":"Can the user merge change requests."},"review":{"type":"boolean","description":"Can the user review change requests."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the space."}},"required":["view","access","admin","viewInviteLinks","edit","triggerGitSync","comment","merge","review","installIntegration"]}},"required":["object","id","title","emoji","organization","visibility","revision","createdAt","updatedAt","comments","changeRequests","changeRequestsOpen","changeRequestsDraft","mergeRules","urls","defaultLevel","permissions"]},"SpaceTitle":{"type":"string","description":"Title of the space","maxLength":50},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"ContentVisibility":{"type":"string","description":"* `public`: Anyone can access the content, and the content is indexed by search engines.\n* `unlisted`: Anyone can access the content, and the content is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the content.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the content.\n* `in-collection`: Anyone who can access the parent collection can access the content.\n  Only available for spaces in a collection.\n* `private`: Authorized members can access the content.\n","enum":["public","unlisted","share-link","visitor-auth","in-collection","private"]},"Timestamp":{"type":"string","format":"date-time"},"SpaceEditMode":{"type":"string","description":"Determines how a Space can be edited.\n* `live`: Users can directly edit the space\n* `locked`: All edits are locked for this space.\n","enum":["live","locked"]},"MergeRulesSpaceConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationInherit"},{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"}]},"MergeRulesConfigurationInherit":{"type":"object","description":"The merge rules inherits from the organization configuration.","properties":{"type":{"type":"string","enum":["inherit"]}},"required":["type"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"URL":{"type":"string","format":"uri","maxLength":2048},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","yue","ko","ar","hi","nl","pl","tr","sv","no","da","fi","el","cs","hu","ro","th","vi","id","ms","he","uk","sk","bg","hr","lt","lv","et","sl"]},"GitSyncState":{"type":"object","properties":{"repoName":{"type":"string","description":"Repository name."},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","description":"The integration name providing the Git Sync."},"url":{"type":"string","description":"The URL to the repository tree, used when rendering public content."},"updatedAt":{"description":"When the Git provider details were last updated","$ref":"#/components/schemas/Timestamp"}}},"GitSyncProvider":{"type":"string","description":"The provider of the Git Sync installation.","enum":["github","gitlab","github-legacy"]},"VisitorAuth":{"oneOf":[{"$ref":"#/components/schemas/VisitorAuthCustomBackend"},{"allOf":[{"$ref":"#/components/schemas/VisitorAuthIntegrationBackend"},{"type":"object","properties":{"integration":{"type":"string","description":"Name of integration being used as the backend for authenticated access"}},"required":["integration"]}]}]},"VisitorAuthCustomBackend":{"type":"object","title":"Custom backend for authenticated access","properties":{"backend":{"type":"string","description":"Custom backend for authenticated access","enum":["custom"]}},"required":["backend"]},"VisitorAuthIntegrationBackend":{"type":"object","title":"Integration backend for authenticated access","properties":{"backend":{"type":"string","description":"Integration as backend for authenticated access","enum":["integration"]}},"required":["backend"]},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]}},"responses":{"BadRequestError":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[400]},"message":{"type":"string"}},"required":["code","message"]}}}}}},"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[404]},"message":{"type":"string"}},"required":["code","message"]}}}}}},"ConflictError":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[409]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/spaces/{spaceId}/move":{"post":{"operationId":"moveSpace","summary":"Move a space to a new position","tags":["spaces"],"parameters":[{"$ref":"#/components/parameters/spaceId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","minProperties":1,"properties":{"parent":{"description":"The unique id of the parent collection","type":["string","null"]},"position":{"description":"Where to move the space. By default, it will be moved at the end.","$ref":"#/components/schemas/ContentPosition"}}}}}},"responses":{"200":{"description":"Space moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}}},"400":{"description":"Invalid position space or collection provided","$ref":"#/components/responses/BadRequestError"},"404":{"description":"No matching Space found for given ID","$ref":"#/components/responses/NotFoundError"},"409":{"description":"Operation would not result in any update","$ref":"#/components/responses/ConflictError"}}}}}}
```

## GET /spaces/{spaceId}/links

> Get all links in a space including their status and location where they appear.

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"spaces","description":"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.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"Space\" grouped=\"false\" %}\n    The Space object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"spaceId":{"name":"spaceId","in":"path","required":true,"description":"The unique id of the space","schema":{"$ref":"#/components/schemas/EntityId"}},"listPage":{"name":"page","in":"query","description":"Identifier of the page results to fetch.","schema":{"type":"string"}},"listLimit":{"name":"limit","in":"query","description":"The number of results per page","schema":{"type":"number","minimum":0,"maximum":1000}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"ContentReferenceStatus":{"type":"string","enum":["ok","broken","in-app"],"description":"Text to display to represent the reference. Possible values include:\n- `ok` - No problems detected for this content reference.\n- `broken` - The target does not exist in the revision.\n- `in-app` - The target is a URL link pointing to an internal location in the app.\n"},"List":{"type":"object","properties":{"next":{"type":"object","properties":{"page":{"type":"string","description":"Unique identifier to query the next results page"}},"required":["page"]},"count":{"type":"number","description":"Total count of objects in the list"}}},"ContentReferencesStats":{"type":"object","properties":{"total":{"description":"Total count of links","type":"number"},"broken":{"type":"object","properties":{"total":{"description":"Count of broken links","type":"number"},"changeRequest":{"description":"Count of broken links that were broken in current change request, if applicable.","type":"number"}},"required":["total"]}},"required":["total","broken"]},"ContentReferenceUsage":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/ContentReferenceStatus"},"relation":{"$ref":"#/components/schemas/ContentReferenceRelation"},"targetReference":{"description":"The reference target where a list of pages are pointing at","$ref":"#/components/schemas/ContentLocation"},"locationReferences":{"description":"Pages locations where a link to the target is found.","type":"array","items":{"$ref":"#/components/schemas/ContentLocation"}}},"required":["relation","status","locationReferences"]},"ContentReferenceRelation":{"type":"string","enum":["reference","dependsOn"],"description":"Indicator of the relationship with the content ref target.\n- `reference` - The content soft-references the ref target\n- `dependsOn` - The content depends on the ref target\n"},"ContentLocation":{"description":"An absolute reference to content in GitBook.","oneOf":[{"$ref":"#/components/schemas/ContentLocationFile"},{"$ref":"#/components/schemas/ContentLocationURL"},{"$ref":"#/components/schemas/ContentLocationPage"},{"$ref":"#/components/schemas/ContentLocationUser"},{"$ref":"#/components/schemas/ContentLocationCollection"},{"$ref":"#/components/schemas/ContentLocationSpace"},{"$ref":"#/components/schemas/ContentLocationReusableContent"},{"$ref":"#/components/schemas/ContentLocationOpenAPI"}],"discriminator":{"propertyName":"kind"}},"ContentLocationFile":{"type":"object","properties":{"kind":{"type":"string","enum":["file"]},"organization":{"$ref":"#/components/schemas/Organization"},"space":{"$ref":"#/components/schemas/Space"},"versionContext":{"oneOf":[{"$ref":"#/components/schemas/ContentLocationRevisionContext"},{"$ref":"#/components/schemas/ContentLocationChangeRequestContext"}]},"file":{"$ref":"#/components/schemas/RevisionFile"}},"required":["kind","organization","space","file"]},"Organization":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"organization\"","enum":["organization"]},"id":{"type":"string","description":"Unique identifier for the organization"},"title":{"$ref":"#/components/schemas/OrganizationTitle"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"emailDomains":{"$ref":"#/components/schemas/OrganizationEmailDomains"},"hostname":{"$ref":"#/components/schemas/OrganizationHostname"},"type":{"$ref":"#/components/schemas/OrganizationType"},"useCase":{"$ref":"#/components/schemas/OrganizationUseCase"},"communityType":{"$ref":"#/components/schemas/OrganizationCommunityType"},"defaultRole":{"$ref":"#/components/schemas/MemberRoleOrGuest"},"defaultContent":{"$ref":"#/components/schemas/OrganizationDefaultContent"},"sso":{"description":"Whether SSO is enforced organization-wide","type":"boolean"},"ai":{"description":"If true, the organization is configured to use all our AI features.","type":"boolean"},"inviteLinks":{"description":"If true, invite links are enabled for this organization.","type":"boolean"},"plan":{"$ref":"#/components/schemas/BillingProduct"},"billing":{"description":"Billing details, only available for org members.","$ref":"#/components/schemas/OrganizationBilling"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the organization in the API","format":"uri"},"app":{"type":"string","description":"URL of the organization in the application","format":"uri"},"logo":{"description":"URL of the logo of this organization, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"trial":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/BillingTrialStatus"},"count":{"type":"integer","description":"Number of trials the organization has consumed."},"endDate":{"description":"The trial's end date, if the organization has or had a trial.","$ref":"#/components/schemas/Timestamp"},"decision":{"type":"string","description":"The decision taken by the user at the end of the trial","enum":["downgrade"]}},"required":["status","count"]},"customHostname":{"description":"Custom hostname linked to this organization","type":"string"},"blocked":{"type":"object","description":"If the organization is blocked, information about the block will appear here","properties":{"source":{"$ref":"#/components/schemas/BlockSource"},"reason":{"$ref":"#/components/schemas/BlockReason"}},"required":["reason"]},"internal_billingMigration":{"type":"object","properties":{"deadline":{"description":"When we will upgrade the organization onto new pricing, if they haven't already.","$ref":"#/components/schemas/Timestamp"},"discountPercent":{"description":"A discount the organization may have received thanks to migrating early.","type":"number"},"discountEndDate":{"description":"The expiration date of the discount, after wich regular pricing resumes.","$ref":"#/components/schemas/Timestamp"}}},"permissions":{"type":"object","description":"The set of permissions for the organization","properties":{"view":{"type":"boolean","description":"Can the user view the organization."},"access":{"type":"boolean","description":"Can the user view the organization in the application."},"admin":{"type":"boolean","description":"Can the user manage the title, members, etc."},"ownTeam":{"type":"boolean","description":"Is the user a team owner."},"createContent":{"type":"boolean","description":"Can the user create new spaces/collections in the organization."},"createOpenAPISpec":{"type":"boolean","description":"Can the user create new OpenAPI specifications."},"viewBilling":{"type":"boolean","description":"Can the user view the billing details of the organization."},"listMembers":{"type":"boolean","description":"Can the user list the members of the organization."},"listTeams":{"type":"boolean","description":"Can the user list the teams in the organization."},"listIntegrations":{"type":"boolean","description":"Can the user list the integrations in the organization."},"listInstallations":{"type":"boolean","description":"Can the user list the integration installations in the organization."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the organization."}},"required":["view","access","admin","ownTeam","createContent","createOpenAPISpec","viewBilling","listMembers","listTeams","listIntegrations","listInstallations","installIntegration"]}},"required":["object","id","plan","title","createdAt","inviteLinks","type","emailDomains","mergeRules","urls","trial","permissions"]},"OrganizationTitle":{"type":"string","description":"Name of the organization","minLength":2,"maxLength":255,"pattern":"\\S.*\\S"},"Timestamp":{"type":"string","format":"date-time"},"OrganizationEmailDomains":{"type":"array","items":{"type":"string"}},"OrganizationHostname":{"type":"string","description":"Default hostname for the organization's public content, e.g. <org-hostname>.gitbook.io","minLength":3,"maxLength":32},"OrganizationType":{"type":"string","enum":["business","community"]},"OrganizationUseCase":{"type":"string","enum":["internalDocs","docsSite","audienceControlledSite","productDocs","teamKnowledgeBase","designSystem","openSourceDocs","notes","other"]},"OrganizationCommunityType":{"type":"string","enum":["nonProfit","openSource","education"]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"OrganizationDefaultContent":{"description":"The default content for the organization","oneOf":[{"$ref":"#/components/schemas/SitePointer"}]},"SitePointer":{"type":"object","properties":{"type":{"type":"string","enum":["site"]},"site":{"type":"string","description":"Unique identifier for the site"}},"required":["type","site"]},"BillingProduct":{"type":"string","description":"Name of the product","enum":["free_2024","plus_2024","pro_2024","enterprise_2024","community_2024","free","plus","pro","internal"]},"OrganizationBilling":{"type":"object","properties":{"interval":{"$ref":"#/components/schemas/BillingInterval"},"endDate":{"oneOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"hasPaymentFailed":{"description":"If true, we were unable to collect the last payment","type":"boolean"},"canCheckout":{"description":"If true, organization can create a checkout session to subscribe/update billing. \nIf false, organization must resolve other billing issues before a checkout can be done.\n","type":"boolean"},"isScheduledToCancel":{"description":"If true, the billing is set to cancel at the end of its current period","type":"boolean"},"pricing":{"description":"Pricing information for the organization","$ref":"#/components/schemas/OrganizationPricing"},"usageAddons":{"description":"Configuration for the usage-based addons","type":"object","additionalProperties":{"$ref":"#/components/schemas/BillingMeterAddon"}},"minUsers":{"description":"The minimum number of members allowed for this organization.","type":"number"},"maxUsers":{"description":"The maximum number of members allowed for this organization","type":"number"},"minPremiumSites":{"description":"The minimum number of premium sites allowed for this organization.","type":"number"},"maxPremiumSites":{"description":"The maximum number of premium sites allowed for this organization.","type":"number"},"minUltimateSites":{"description":"The minimum number of ultimate sites allowed for this organization.","type":"number"},"maxUltimateSites":{"description":"The maximum number of ultimate sites allowed for this organization.","type":"number"},"paidMembers":{"description":"The number of paid members on the current subscription.","type":"number"},"paidPremiumSites":{"description":"The number of paid premium sites on the current subscription.","type":"number"},"paidUltimateSites":{"description":"The number of paid ultimate sites on the current subscription.","type":"number"}},"required":["interval","endDate","hasPaymentFailed","canCheckout","isScheduledToCancel","pricing","usageAddons"]},"BillingInterval":{"type":"string","description":"Interval for a billing subscription","enum":["monthly","yearly"]},"OrganizationPricing":{"type":"object","description":"Pricing information for an organization","properties":{"members":{"type":"object","description":"Pricing for members (organization plan)","properties":{"plus_2024":{"$ref":"#/components/schemas/OrganizationPricePair"},"pro_2024":{"$ref":"#/components/schemas/OrganizationPricePair"}},"required":["plus_2024","pro_2024"],"additionalProperties":false},"sites":{"type":"object","description":"Pricing for site types (site plans)","properties":{"premium":{"$ref":"#/components/schemas/OrganizationPricePair"},"ultimate":{"$ref":"#/components/schemas/OrganizationPricePair"}},"required":["premium","ultimate"],"additionalProperties":false}},"required":["members","sites"]},"OrganizationPricePair":{"type":"object","description":"Pricing pair for monthly and yearly intervals","properties":{"monthly":{"type":"number","description":"Monthly price in USD","minimum":0},"yearly":{"type":"number","description":"Yearly price in USD (per month)","minimum":0}},"required":["monthly","yearly"]},"BillingMeterAddon":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"URL":{"type":"string","format":"uri","maxLength":2048},"BillingTrialStatus":{"type":"string","description":"- notapplicable, no trial can be started for this organization. - none, no trial has been started yet. - active, trial is active. - ended, the trial has ended and the user has choosen to stay on the free plan or has upgraded to a paid plan. - expired, the trial has ended but the user hasn't deciced yet what to do.\n","enum":["notapplicable","none","active","ended","expired"]},"BlockSource":{"type":"string","description":"Source for an organization block","enum":["backoffice","external","internal"]},"BlockReason":{"type":"string","description":"A short description giving context on the reason for the block.","minLength":1,"maxLength":255},"Space":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"space\"","enum":["space"]},"id":{"type":"string","description":"Unique identifier for the space"},"title":{"$ref":"#/components/schemas/SpaceTitle"},"emoji":{"description":"An emoji for this space. It'll match the emoji shown in the GitBook app.","$ref":"#/components/schemas/Emoji"},"visibility":{"$ref":"#/components/schemas/ContentVisibility"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"deletedAt":{"$ref":"#/components/schemas/Timestamp"},"editMode":{"$ref":"#/components/schemas/SpaceEditMode"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesSpaceConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the space in the API","format":"uri"},"app":{"type":"string","description":"URL of the space in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the space. Only defined when visibility is not \"private.\"","format":"uri"},"public":{"type":"string","description":"URL of the public version of the space. Only defined when visibility is \"public\".","format":"uri"},"icon":{"description":"URL of the icon of this space, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"organization":{"type":"string","description":"ID of the organization owning this space"},"parent":{"type":"string","description":"ID of the parent collection."},"language":{"$ref":"#/components/schemas/TranslationLanguage"},"gitSync":{"$ref":"#/components/schemas/GitSyncState"},"visitorAuth":{"$ref":"#/components/schemas/VisitorAuth"},"revision":{"type":"string","description":"ID of the active revision in the space."},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"comments":{"type":"number","description":"Count of opened comments on the space."},"changeRequests":{"type":"number","description":"Total count of change requests on the space."},"changeRequestsOpen":{"type":"number","description":"Count of open change requests on the space."},"changeRequestsDraft":{"type":"number","description":"Count of draft change requests on the space."},"internal_poweredByV2":{"type":"boolean","description":"Whether the space is powered by V2 of the content system."},"internal_singleWebsocket":{"type":"boolean","description":"Whether the space uses a single websocket connection for all real-time communication."},"permissions":{"type":"object","description":"The set of permissions for the space","properties":{"view":{"type":"boolean","description":"Can the user view the space content."},"access":{"type":"boolean","description":"Can the user access the space in the application."},"admin":{"type":"boolean","description":"Can the user edit the title, install integrations, and manage the space."},"viewInviteLinks":{"type":"boolean","description":"Can the user view the invite links of the space."},"edit":{"type":"boolean","description":"Can the user edit the content of the space by creating a change request."},"triggerGitSync":{"type":"boolean","description":"Can the user trigger a git sync."},"comment":{"type":"boolean","description":"Can the user comment on the content."},"merge":{"type":"boolean","description":"Can the user merge change requests."},"review":{"type":"boolean","description":"Can the user review change requests."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the space."}},"required":["view","access","admin","viewInviteLinks","edit","triggerGitSync","comment","merge","review","installIntegration"]}},"required":["object","id","title","emoji","organization","visibility","revision","createdAt","updatedAt","comments","changeRequests","changeRequestsOpen","changeRequestsDraft","mergeRules","urls","defaultLevel","permissions"]},"SpaceTitle":{"type":"string","description":"Title of the space","maxLength":50},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"ContentVisibility":{"type":"string","description":"* `public`: Anyone can access the content, and the content is indexed by search engines.\n* `unlisted`: Anyone can access the content, and the content is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the content.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the content.\n* `in-collection`: Anyone who can access the parent collection can access the content.\n  Only available for spaces in a collection.\n* `private`: Authorized members can access the content.\n","enum":["public","unlisted","share-link","visitor-auth","in-collection","private"]},"SpaceEditMode":{"type":"string","description":"Determines how a Space can be edited.\n* `live`: Users can directly edit the space\n* `locked`: All edits are locked for this space.\n","enum":["live","locked"]},"MergeRulesSpaceConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationInherit"},{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"}]},"MergeRulesConfigurationInherit":{"type":"object","description":"The merge rules inherits from the organization configuration.","properties":{"type":{"type":"string","enum":["inherit"]}},"required":["type"]},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","yue","ko","ar","hi","nl","pl","tr","sv","no","da","fi","el","cs","hu","ro","th","vi","id","ms","he","uk","sk","bg","hr","lt","lv","et","sl"]},"GitSyncState":{"type":"object","properties":{"repoName":{"type":"string","description":"Repository name."},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","description":"The integration name providing the Git Sync."},"url":{"type":"string","description":"The URL to the repository tree, used when rendering public content."},"updatedAt":{"description":"When the Git provider details were last updated","$ref":"#/components/schemas/Timestamp"}}},"GitSyncProvider":{"type":"string","description":"The provider of the Git Sync installation.","enum":["github","gitlab","github-legacy"]},"VisitorAuth":{"oneOf":[{"$ref":"#/components/schemas/VisitorAuthCustomBackend"},{"allOf":[{"$ref":"#/components/schemas/VisitorAuthIntegrationBackend"},{"type":"object","properties":{"integration":{"type":"string","description":"Name of integration being used as the backend for authenticated access"}},"required":["integration"]}]}]},"VisitorAuthCustomBackend":{"type":"object","title":"Custom backend for authenticated access","properties":{"backend":{"type":"string","description":"Custom backend for authenticated access","enum":["custom"]}},"required":["backend"]},"VisitorAuthIntegrationBackend":{"type":"object","title":"Integration backend for authenticated access","properties":{"backend":{"type":"string","description":"Integration as backend for authenticated access","enum":["integration"]}},"required":["backend"]},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"ContentLocationRevisionContext":{"type":"object","required":["type","revision"],"properties":{"type":{"type":"string","enum":["revision"]},"revision":{"$ref":"#/components/schemas/Revision"}}},"Revision":{"oneOf":[{"$ref":"#/components/schemas/RevisionTypeEdits"},{"$ref":"#/components/schemas/RevisionTypeMerge"},{"$ref":"#/components/schemas/RevisionTypeRollback"},{"$ref":"#/components/schemas/RevisionTypeUpdate"},{"$ref":"#/components/schemas/RevisionTypeComputed"}],"discriminator":{"propertyName":"type"}},"RevisionTypeEdits":{"allOf":[{"$ref":"#/components/schemas/RevisionBase"},{"type":"object","properties":{"type":{"type":"string","description":"Revision created by editing the content.","enum":["edits"]}},"required":["type"]}]},"RevisionBase":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"revision\"","enum":["revision"]},"id":{"description":"Unique identifier for the revision","type":"string"},"parents":{"description":"IDs of the parent revisions","type":"array","items":{"type":"string"}},"pages":{"type":"array","items":{"$ref":"#/components/schemas/RevisionPage"}},"files":{"type":"array","items":{"$ref":"#/components/schemas/RevisionFile"}},"reusableContents":{"type":"array","items":{"$ref":"#/components/schemas/RevisionReusableContent"}},"tags":{"type":"array","description":"List of available tags within this revision","items":{"$ref":"#/components/schemas/RevisionTag"}},"variables":{"$ref":"#/components/schemas/Variables"},"createdAt":{"description":"When the revision was created.","$ref":"#/components/schemas/Timestamp"},"git":{"description":"Metadata about a potential associated git commit.","$ref":"#/components/schemas/GitSyncCommit"},"urls":{"type":"object","properties":{"app":{"type":"string","format":"uri","description":"URL in the application for the revision"},"published":{"type":"string","description":"URL of the published version of the revision. Only defined when the space visibility is not \"private.\"","format":"uri"},"public":{"type":"string","description":"URL of the public version of the revision. Only defined when the space visibility is \"public\".","format":"uri"}},"required":["app"]}},"required":["object","id","parents","pages","files","reusableContents","tags","urls","createdAt"]},"RevisionPage":{"oneOf":[{"$ref":"#/components/schemas/RevisionPageDocument"},{"$ref":"#/components/schemas/RevisionPageGroup"},{"$ref":"#/components/schemas/RevisionPageLink"},{"$ref":"#/components/schemas/RevisionPageComputed"}],"discriminator":{"propertyName":"type"}},"RevisionPageDocument":{"allOf":[{"$ref":"#/components/schemas/RevisionPageBase"},{"$ref":"#/components/schemas/Document"},{"type":"object","properties":{"kind":{"type":"string","deprecated":true,"enum":["sheet"]},"type":{"type":"string","enum":["document"]},"urls":{"required":["app"],"properties":{"app":{"description":"Location of the page in the app","$ref":"#/components/schemas/URL"}}},"slug":{"$ref":"#/components/schemas/RevisionPageSlug"},"path":{"description":"Complete path to access the page in the revision.","type":"string"},"description":{"type":"string"},"pages":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/RevisionPageDocument"},{"$ref":"#/components/schemas/RevisionPageLink"},{"$ref":"#/components/schemas/RevisionPageComputed"}]}},"git":{"$ref":"#/components/schemas/GitSyncBlob"},"layout":{"$ref":"#/components/schemas/RevisionPageLayoutOptions"},"cover":{"$ref":"#/components/schemas/RevisionPageDocumentCover"},"variables":{"$ref":"#/components/schemas/Variables"},"hidden":{"type":"boolean","description":"If true, the page is not displayed in the navigation, while still being accessible.","default":false},"noIndex":{"type":"boolean","description":"If true, the page is not indexable in the search and ask features.","default":false},"noRobotsIndex":{"type":"boolean","description":"If true, the page is not indexable by search engine robots.","default":false},"metaLinks":{"description":"Meta links associated with the page.","$ref":"#/components/schemas/RevisionPageMetaLinks"},"tags":{"type":"array","description":"A list of all the tags added to this page","items":{"$ref":"#/components/schemas/RevisionPageTag"}}},"required":["kind","type","urls","slug","path","pages","layout","tags"]},{"oneOf":[{"type":"object","description":"Defined when the page was generated by a computed content.","properties":{"computed":{"$ref":"#/components/schemas/ComputedContentSourceDocument"},"computedSeed":{"type":"string","description":"Seed to use for the generation of IDs."}},"required":["computed","computedSeed"]},{"type":"object","properties":{"documentId":{"type":"string","description":"ID of the document with the page body. If undefined, the page is empty."}}}]}]},"RevisionPageBase":{"type":"object","properties":{"id":{"description":"Unique identifier for the page in the revision","type":"string"},"title":{"description":"Title of the page","type":"string","minLength":1},"linkTitle":{"description":"Optional custom title for the page ToC and mention entries instead of the page title.","type":"string","minLength":1,"maxLength":100},"emoji":{"description":"Emoji of the page, if one has been set.","$ref":"#/components/schemas/Emoji"},"icon":{"description":"Icon of the page, if one has been set.","$ref":"#/components/schemas/Icon"},"createdAt":{"description":"When the page was first created. Only present if page has been edited at least once.","$ref":"#/components/schemas/Timestamp"},"updatedAt":{"description":"When the page was last edited. Only present if page has been edited at least once.","$ref":"#/components/schemas/Timestamp"}},"required":["id","title"]},"Icon":{"type":"string","maxLength":50,"format":"icon","description":"Name of the icon"},"Document":{"oneOf":[{"$ref":"#/components/schemas/MarkdownDocument","title":"Markdown"},{"type":"object","title":"JSON Document","properties":{"document":{"$ref":"#/components/schemas/JSONDocument"}},"required":["document"]},{"type":"object","title":"Empty","properties":{},"additionalProperties":false}]},"MarkdownDocument":{"type":"object","properties":{"markdown":{"type":"string","description":"Content of the document formatted as markdown"}},"required":["markdown"]},"JSONDocument":{"type":"object","properties":{"object":{"type":"string","enum":["document"]},"data":{"type":"object","properties":{"schemaVersion":{"description":"The schema version of the document. If undefined, the document is considered to be of the latest schema version.","type":"integer"}},"additionalProperties":true},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlocksTopLevels"}},"meta":{"type":"object","properties":{"token":{"description":"A content token that can be used to fetch the content referenced in this document from the API.","type":"string"}}}},"required":["object","data","nodes"]},"DocumentBlocksTopLevels":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockQuote"},{"$ref":"#/components/schemas/DocumentBlockHint"},{"$ref":"#/components/schemas/DocumentBlockImages"},{"$ref":"#/components/schemas/DocumentBlockFile"},{"$ref":"#/components/schemas/DocumentBlockDrawing"},{"$ref":"#/components/schemas/DocumentBlockEmbed"},{"$ref":"#/components/schemas/DocumentBlockCode"},{"$ref":"#/components/schemas/DocumentBlockMath"},{"$ref":"#/components/schemas/DocumentBlockExpandable"},{"$ref":"#/components/schemas/DocumentBlockTabs"},{"$ref":"#/components/schemas/DocumentBlockTable"},{"$ref":"#/components/schemas/DocumentBlockOpenAPI"},{"$ref":"#/components/schemas/DocumentBlockOpenAPIOperation"},{"$ref":"#/components/schemas/DocumentBlockOpenAPISchemas"},{"$ref":"#/components/schemas/DocumentBlockOpenAPIWebhook"},{"$ref":"#/components/schemas/DocumentBlockContentRef"},{"$ref":"#/components/schemas/DocumentBlockIntegration"},{"$ref":"#/components/schemas/DocumentBlockReusableContent"},{"$ref":"#/components/schemas/DocumentBlockStepper"},{"$ref":"#/components/schemas/DocumentBlockIf"},{"$ref":"#/components/schemas/DocumentBlockColumns"}]},"DocumentBlocksEssentials":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlockParagraph"},{"$ref":"#/components/schemas/DocumentBlockHeading"},{"$ref":"#/components/schemas/DocumentBlockListOrdered"},{"$ref":"#/components/schemas/DocumentBlockListUnordered"},{"$ref":"#/components/schemas/DocumentBlockListTasks"},{"$ref":"#/components/schemas/DocumentBlockDivider"}]},"DocumentBlockParagraph":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["paragraph"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentInline"},{"$ref":"#/components/schemas/DocumentText"}]}},"isVoid":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{"align":{"$ref":"#/components/schemas/TextAlignment"}},"additionalProperties":false}},"required":["object","type","nodes"]},"DocumentInline":{"oneOf":[{"$ref":"#/components/schemas/DocumentInlineLink"},{"$ref":"#/components/schemas/DocumentInlineEmoji"},{"$ref":"#/components/schemas/DocumentInlineIcon"},{"$ref":"#/components/schemas/DocumentInlineExpression"},{"$ref":"#/components/schemas/DocumentInlineMath"},{"$ref":"#/components/schemas/DocumentInlineImage"},{"$ref":"#/components/schemas/DocumentInlineAnnotation"},{"$ref":"#/components/schemas/DocumentInlineMention"},{"$ref":"#/components/schemas/DocumentInlineButton"}]},"DocumentInlineLink":{"type":"object","properties":{"object":{"type":"string","enum":["inline"]},"type":{"type":"string","enum":["link"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentText"},{"$ref":"#/components/schemas/DocumentInlineImage"}]}},"data":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRef"}},"required":["ref"]},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","nodes","data"]},"DocumentText":{"type":"object","properties":{"object":{"type":"string","enum":["text"]},"key":{"type":"string"},"leaves":{"type":"array","items":{"$ref":"#/components/schemas/DocumentTextLeaf"}}},"required":["object","leaves"]},"DocumentTextLeaf":{"type":"object","properties":{"object":{"type":"string","enum":["leaf"]},"text":{"type":"string"},"marks":{"type":"array","items":{"$ref":"#/components/schemas/DocumentTextMark"}}},"required":["object","text","marks"]},"DocumentTextMark":{"oneOf":[{"$ref":"#/components/schemas/DocumentMarkBold"},{"$ref":"#/components/schemas/DocumentMarkItalic"},{"$ref":"#/components/schemas/DocumentMarkCode"},{"$ref":"#/components/schemas/DocumentMarkKeyboard"},{"$ref":"#/components/schemas/DocumentMarkStrikethrough"},{"$ref":"#/components/schemas/DocumentMarkColor"},{"$ref":"#/components/schemas/DocumentMarkSuperscript"},{"$ref":"#/components/schemas/DocumentMarkSubscript"}]},"DocumentMarkBold":{"type":"object","properties":{"object":{"type":"string","enum":["mark"]},"type":{"type":"string","enum":["bold"]}},"required":["object","type"]},"DocumentMarkItalic":{"type":"object","properties":{"object":{"type":"string","enum":["mark"]},"type":{"type":"string","enum":["italic"]}},"required":["object","type"]},"DocumentMarkCode":{"type":"object","properties":{"object":{"type":"string","enum":["mark"]},"type":{"type":"string","enum":["code"]}},"required":["object","type"]},"DocumentMarkKeyboard":{"type":"object","properties":{"object":{"type":"string","enum":["mark"]},"type":{"type":"string","enum":["keyboard"]}},"required":["object","type"]},"DocumentMarkStrikethrough":{"type":"object","properties":{"object":{"type":"string","enum":["mark"]},"type":{"type":"string","enum":["strikethrough"]}},"required":["object","type"]},"DocumentMarkColor":{"type":"object","properties":{"object":{"type":"string","enum":["mark"]},"type":{"type":"string","enum":["color"]},"data":{"type":"object","properties":{"text":{"$ref":"#/components/schemas/DocumentTextColor"},"background":{"$ref":"#/components/schemas/DocumentTextColor"}},"required":["text","background"]}},"required":["object","type","data"]},"DocumentTextColor":{"type":"string","enum":["default","green","blue","red","orange","yellow","purple","$primary","$info","$success","$warning","$danger"]},"DocumentMarkSuperscript":{"type":"object","properties":{"object":{"type":"string","enum":["mark"]},"type":{"type":"string","enum":["superscript"]}},"required":["object","type"]},"DocumentMarkSubscript":{"type":"object","properties":{"object":{"type":"string","enum":["mark"]},"type":{"type":"string","enum":["subscript"]}},"required":["object","type"]},"DocumentInlineImage":{"type":"object","properties":{"object":{"type":"string","enum":["inline"]},"type":{"type":"string","enum":["inline-image"]},"key":{"type":"string"},"data":{"type":"object","properties":{"ref":{"oneOf":[{"$ref":"#/components/schemas/ContentRefURL"},{"$ref":"#/components/schemas/ContentRefFile"}]},"refDark":{"oneOf":[{"$ref":"#/components/schemas/ContentRefURL"},{"$ref":"#/components/schemas/ContentRefFile"}]},"caption":{"type":"string"},"alt":{"type":"string"},"size":{"type":"string","enum":["original","line"]}},"required":["ref"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"ContentRefURL":{"type":"object","properties":{"kind":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["kind","url"]},"ContentRefFile":{"type":"object","properties":{"kind":{"type":"string","enum":["file"]},"file":{"type":"string"},"space":{"description":"ID of the space the file is in. The file is considered as in the current space if none is provided.","type":"string"}},"required":["kind","file"]},"ContentRef":{"description":"A relative reference to content in GitBook.","oneOf":[{"$ref":"#/components/schemas/ContentRefFile"},{"$ref":"#/components/schemas/ContentRefURL"},{"$ref":"#/components/schemas/ContentRefPage"},{"$ref":"#/components/schemas/ContentRefAnchor"},{"$ref":"#/components/schemas/ContentRefUser"},{"$ref":"#/components/schemas/ContentRefCollection"},{"$ref":"#/components/schemas/ContentRefSpace"},{"$ref":"#/components/schemas/ContentRefReusableContent"},{"$ref":"#/components/schemas/ContentRefTag"},{"$ref":"#/components/schemas/ContentRefOpenAPI"}]},"ContentRefPage":{"type":"object","properties":{"kind":{"type":"string","enum":["page"]},"page":{"type":"string"},"space":{"description":"ID of the space the page is in. The page is considered as in the current space if none is provided.","type":"string"}},"required":["kind","page"]},"ContentRefAnchor":{"type":"object","properties":{"kind":{"type":"string","enum":["anchor"]},"anchor":{"type":"string"},"space":{"description":"ID of the space the page is in. The page is considered as in the current space if none is provided.","type":"string"},"page":{"description":"ID of the page the anchor is in. The anchor is considered as in the current page if none is provided.","type":"string"}},"required":["kind","anchor"]},"ContentRefUser":{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"user":{"type":"string"}},"required":["kind","user"]},"ContentRefCollection":{"type":"object","properties":{"kind":{"type":"string","enum":["collection"]},"collection":{"type":"string"}},"required":["kind","collection"]},"ContentRefSpace":{"type":"object","properties":{"kind":{"type":"string","enum":["space"]},"space":{"type":"string"}},"required":["kind","space"]},"ContentRefReusableContent":{"type":"object","properties":{"kind":{"type":"string","enum":["reusable-content"]},"reusableContent":{"type":"string"},"space":{"type":"string","description":"The space in which the reusable content is defined. If undefined, the reusable content is assumed to be in the same space as the content reference."}},"required":["kind","reusableContent"]},"ContentRefTag":{"type":"object","properties":{"kind":{"type":"string","enum":["tag"]},"tag":{"type":"string","description":"The slug of the tag, also used as the ID, and references the tags defined on a revision."},"space":{"type":"string","description":"The space in which the tag is defined. If undefined, the tag is assumed to be in the same space as the content reference."}},"required":["kind","tag"]},"ContentRefOpenAPI":{"type":"object","properties":{"kind":{"type":"string","enum":["openapi"]},"spec":{"type":"string","description":"Slug of the OpenAPI specification"}},"required":["kind","spec"]},"DocumentInlineEmoji":{"type":"object","properties":{"object":{"type":"string","enum":["inline"]},"type":{"type":"string","enum":["emoji"]},"key":{"type":"string"},"data":{"type":"object","properties":{"code":{"type":"string"}},"required":["code"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentInlineIcon":{"type":"object","properties":{"object":{"type":"string","enum":["inline"]},"type":{"type":"string","enum":["icon"]},"key":{"type":"string"},"data":{"type":"object","properties":{"icon":{"type":"string"},"color":{"$ref":"#/components/schemas/DocumentTextColor"}},"required":["icon"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentInlineExpression":{"type":"object","properties":{"object":{"type":"string","enum":["inline"]},"type":{"type":"string","enum":["expression"]},"key":{"type":"string"},"data":{"type":"object","properties":{"expression":{"type":"string"}},"required":["expression"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentInlineMath":{"type":"object","properties":{"object":{"type":"string","enum":["inline"]},"type":{"type":"string","enum":["inline-math"]},"key":{"type":"string"},"data":{"type":"object","properties":{"formula":{"type":"string"}},"required":["formula"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentInlineAnnotation":{"type":"object","properties":{"object":{"type":"string","enum":["inline"]},"type":{"type":"string","enum":["annotation"]},"key":{"type":"string"},"fragments":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/DocumentFragment"},{"type":"object","properties":{"type":{"type":"string","enum":["annotation-body"]},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockCode"}]},"minItems":1}},"required":["nodes","type"]}]}},"isVoid":{"type":"boolean","enum":[false]},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentText"}},"data":{"type":"object","properties":{},"additionalProperties":false}},"required":["object","type","fragments","isVoid","nodes"]},"DocumentFragment":{"type":"object","properties":{"object":{"type":"string","enum":["fragment"]},"key":{"type":"string"},"fragment":{"type":"string"},"type":{"type":"string"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlock"}}},"required":["object","nodes"]},"DocumentBlock":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlockParagraph"},{"$ref":"#/components/schemas/DocumentBlockHeading"},{"$ref":"#/components/schemas/DocumentBlockListOrdered"},{"$ref":"#/components/schemas/DocumentBlockListUnordered"},{"$ref":"#/components/schemas/DocumentBlockListTasks"},{"$ref":"#/components/schemas/DocumentBlockListItem"},{"$ref":"#/components/schemas/DocumentBlockDivider"},{"$ref":"#/components/schemas/DocumentBlockQuote"},{"$ref":"#/components/schemas/DocumentBlockHint"},{"$ref":"#/components/schemas/DocumentBlockIf"},{"$ref":"#/components/schemas/DocumentBlockImages"},{"$ref":"#/components/schemas/DocumentBlockImage"},{"$ref":"#/components/schemas/DocumentBlockFile"},{"$ref":"#/components/schemas/DocumentBlockDrawing"},{"$ref":"#/components/schemas/DocumentBlockEmbed"},{"$ref":"#/components/schemas/DocumentBlockCode"},{"$ref":"#/components/schemas/DocumentBlockCodeLine"},{"$ref":"#/components/schemas/DocumentBlockMath"},{"$ref":"#/components/schemas/DocumentBlockExpandable"},{"$ref":"#/components/schemas/DocumentBlockTabs"},{"$ref":"#/components/schemas/DocumentBlockTabsItem"},{"$ref":"#/components/schemas/DocumentBlockTable"},{"$ref":"#/components/schemas/DocumentBlockOpenAPI"},{"$ref":"#/components/schemas/DocumentBlockOpenAPIOperation"},{"$ref":"#/components/schemas/DocumentBlockOpenAPISchemas"},{"$ref":"#/components/schemas/DocumentBlockOpenAPIWebhook"},{"$ref":"#/components/schemas/DocumentBlockContentRef"},{"$ref":"#/components/schemas/DocumentBlockIntegration"},{"$ref":"#/components/schemas/DocumentBlockReusableContent"},{"$ref":"#/components/schemas/DocumentBlockStepper"},{"$ref":"#/components/schemas/DocumentBlockStepperStep"},{"$ref":"#/components/schemas/DocumentBlockColumns"},{"$ref":"#/components/schemas/DocumentBlockColumn"},{"$ref":"#/components/schemas/DocumentBlockUpdates"},{"$ref":"#/components/schemas/DocumentBlockUpdate"}]},"DocumentBlockHeading":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["heading-1","heading-2","heading-3"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentInline"},{"$ref":"#/components/schemas/DocumentText"}]}},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^[-a-z0-9.+_]+$"},"align":{"$ref":"#/components/schemas/TextAlignment"}}},"meta":{"type":"object","properties":{"id":{"description":"Unique ID to be used in an URL for the block.","type":"string"}},"required":["id"]},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","nodes","data"]},"TextAlignment":{"type":"string","enum":["start","center","end"]},"DocumentBlockListOrdered":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["list-ordered"]},"key":{"type":"string"},"data":{"type":"object","properties":{"start":{"type":"number","description":"An integer to start counting from for the list items."}}},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlockListItem"}]}},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","data","nodes"]},"DocumentBlockListItem":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["list-item"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockCode"},{"$ref":"#/components/schemas/DocumentBlockHint"},{"$ref":"#/components/schemas/DocumentBlockQuote"},{"$ref":"#/components/schemas/DocumentBlockMath"},{"$ref":"#/components/schemas/DocumentBlockTable"}]}},"isVoid":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{"checked":{"type":"boolean"}}}},"required":["object","type","nodes"]},"DocumentBlockCode":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["code"]},"key":{"type":"string"},"data":{"type":"object","properties":{"syntax":{"type":"string"},"title":{"type":"string"},"overflow":{"type":"string","default":"scroll","enum":["scroll","wrap"]},"lineNumbers":{"type":"boolean"},"fullWidth":{"type":"boolean"},"expandable":{"type":"boolean"},"collapsedLineCount":{"type":"integer","description":"Number of lines rendered in a code block when it is collapsed","minimum":1,"default":10}}},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlockCodeLine"}},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","data","nodes"]},"DocumentBlockCodeLine":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["code-line"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentText"},{"$ref":"#/components/schemas/DocumentInlineAnnotation"},{"$ref":"#/components/schemas/DocumentInlineExpression"}]}},"data":{"type":"object","properties":{"highlighted":{"type":"boolean"}}},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","nodes","data"]},"DocumentBlockHint":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["hint"]},"key":{"type":"string"},"data":{"type":"object","properties":{"style":{"type":"string","enum":["info","warning","danger","success"]},"icon":{"$ref":"#/components/schemas/Icon"}},"required":["style"]},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlocksEssentials"}},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","data","nodes"]},"DocumentBlockQuote":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["blockquote"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockQuote"}]}},"isVoid":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{},"additionalProperties":false}},"required":["object","type","nodes"]},"DocumentBlockMath":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["math"]},"key":{"type":"string"},"data":{"type":"object","properties":{"formula":{"type":"string"}},"required":["formula"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentBlockTable":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["table"]},"key":{"type":"string"},"isVoid":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"view":{"oneOf":[{"$ref":"#/components/schemas/DocumentTableViewGrid"},{"$ref":"#/components/schemas/DocumentTableViewCards"}]},"records":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/DocumentTableRecord"}},"definition":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/DocumentTableDefinition"}},"fullWidth":{"type":"boolean","description":"Whether to render the block as a full width one"}},"required":["view","records","definition"]},"fragments":{"type":"array","items":{"$ref":"#/components/schemas/DocumentFragment"}}},"required":["object","type","data","isVoid","fragments"]},"DocumentTableViewGrid":{"type":"object","properties":{"type":{"type":"string","enum":["grid"]},"columns":{"type":"array","description":"Ordered list of the definition IDs to display","items":{"type":"string"}},"columnWidths":{"type":"object","description":"Percent width of each column","additionalProperties":{"type":"number"}},"hideHeader":{"type":"boolean","description":"Should we display the header with column titles"},"stickyHeader":{"type":"boolean","description":"Should we keep the table header sticky while the page scrolls"},"useNewSizing":{"type":"boolean","description":"Tables in GitBook originally used a scaled width approach i.e. the width defined\nin columnWidths would be scaled to ensure a 100% width table.\n\nWe later changed this to treat the widths in columnWidths as exact values - they are\nnever scaled. A columnWidth of 50 is rendered as 50px.\n\nIn order to maintain backwards compatibility, we track whether or not we\nuse the new system here.\n\nAll new tables should have this value set to true, older tables will have it set\nto undefined.\n"}},"required":["type","columns","hideHeader"]},"DocumentTableViewCards":{"type":"object","properties":{"type":{"type":"string","enum":["cards"]},"cardSize":{"type":"string","description":"Size of the cards. It indicates how many columns will be used","enum":["medium","large"]},"columns":{"type":"array","description":"Ordered list of the definition IDs to display","items":{"type":"string"}},"targetDefinition":{"type":"string","description":"Definition ID to use as a target link for the card"},"coverDefinition":{"type":"string","description":"Definition ID to use as a cover image"},"coverDefinitionDark":{"type":"string","description":"Definition ID to use as a dark mode cover image"},"hideColumnTitle":{"type":"boolean","description":"Should we display the column title or not"}},"required":["type","columns","cardSize"]},"DocumentTableRecord":{"type":"object","properties":{"orderIndex":{"type":"string"},"values":{"type":"object","additionalProperties":{"oneOf":[{"type":"number"},{"type":["string","null"]},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"$ref":"#/components/schemas/ContentRef"},{"$ref":"#/components/schemas/DocumentTableImageRecord"}]}}},"required":["orderIndex","values"]},"DocumentTableImageRecord":{"description":"A table record value for image columns, supporting both direct ContentRefs and the additional format with record-level settings.","oneOf":[{"$ref":"#/components/schemas/ContentRefFile"},{"$ref":"#/components/schemas/ContentRefURL"},{"type":"object","properties":{"ref":{"oneOf":[{"$ref":"#/components/schemas/ContentRefFile"},{"$ref":"#/components/schemas/ContentRefURL"}]},"objectFit":{"$ref":"#/components/schemas/CardsImageObjectFit"},"alt":{"type":"string","description":"Alternative text for the cover image"}},"required":["ref"]}]},"CardsImageObjectFit":{"type":"string","description":"Object fit for image display in card views","enum":["contain","fill","cover"]},"DocumentTableDefinition":{"oneOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionText"},{"$ref":"#/components/schemas/DocumentTableDefinitionNumber"},{"$ref":"#/components/schemas/DocumentTableDefinitionCheckbox"},{"$ref":"#/components/schemas/DocumentTableDefinitionFiles"},{"$ref":"#/components/schemas/DocumentTableDefinitionUsers"},{"$ref":"#/components/schemas/DocumentTableDefinitionRating"},{"$ref":"#/components/schemas/DocumentTableDefinitionSelect"},{"$ref":"#/components/schemas/DocumentTableDefinitionContentRef"},{"$ref":"#/components/schemas/DocumentTableDefinitionImage"}]},"DocumentTableDefinitionText":{"allOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionBase"},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"textAlignment":{"type":"string","enum":["center","right","left"]},"verticalAlignment":{"$ref":"#/components/schemas/VerticalAlignment"}},"required":["type","textAlignment"]}]},"DocumentTableDefinitionBase":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","description":"Title for the column"}},"required":["id","title"]},"VerticalAlignment":{"type":"string","enum":["top","middle","bottom"]},"DocumentTableDefinitionNumber":{"allOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionBase"},{"type":"object","properties":{"type":{"type":"string","enum":["number"]}},"required":["type"]}]},"DocumentTableDefinitionCheckbox":{"allOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionBase"},{"type":"object","properties":{"type":{"type":"string","enum":["checkbox"]}},"required":["type"]}]},"DocumentTableDefinitionFiles":{"allOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionBase"},{"type":"object","properties":{"type":{"type":"string","enum":["files"]}},"required":["type"]}]},"DocumentTableDefinitionUsers":{"allOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionBase"},{"type":"object","properties":{"type":{"type":"string","enum":["users"]},"multiple":{"type":"boolean"}},"required":["type","multiple"]}]},"DocumentTableDefinitionRating":{"allOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionBase"},{"type":"object","properties":{"type":{"type":"string","enum":["rating"]},"max":{"type":"number"}},"required":["type","max"]}]},"DocumentTableDefinitionSelect":{"allOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionBase"},{"type":"object","properties":{"type":{"type":"string","enum":["select"]},"multiple":{"type":"boolean"},"options":{"type":"array","items":{"$ref":"#/components/schemas/DocumentTableSelectOption"}}},"required":["type","multiple","options"]}]},"DocumentTableSelectOption":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"color":{"type":"string"}},"required":["value","label","color"]},"DocumentTableDefinitionContentRef":{"allOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionBase"},{"type":"object","properties":{"type":{"type":"string","enum":["content-ref"]}},"required":["type"]}]},"DocumentTableDefinitionImage":{"allOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionBase"},{"type":"object","properties":{"type":{"type":"string","enum":["image"]}},"required":["type"]}]},"DocumentBlockListUnordered":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["list-unordered"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlockListItem"}]}},"data":{"type":"object","additionalProperties":false},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","nodes"]},"DocumentBlockListTasks":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["list-tasks"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlockListItem"}]}},"isVoid":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{},"additionalProperties":false}},"required":["object","type","nodes"]},"DocumentBlockDivider":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["divider"]},"key":{"type":"string"},"isVoid":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{},"additionalProperties":false}},"required":["object","type","isVoid","data"]},"DocumentBlockIf":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["if"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlocksTopLevels"}},"isVoid":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{"expression":{"type":"string"}},"required":["expression"]}},"required":["object","type","nodes","data"]},"DocumentBlockImages":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["images"]},"key":{"type":"string"},"data":{"type":"object","properties":{"align":{"type":"string","enum":["center","left","right"]},"fullWidth":{"type":"boolean"},"withFrame":{"type":"boolean"}}},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlockImage"}},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","data","nodes","isVoid"]},"DocumentBlockImage":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["image"]},"key":{"type":"string"},"data":{"type":"object","properties":{"ref":{"oneOf":[{"$ref":"#/components/schemas/ContentRefURL"},{"$ref":"#/components/schemas/ContentRefFile"}]},"refDark":{"oneOf":[{"$ref":"#/components/schemas/ContentRefURL"},{"$ref":"#/components/schemas/ContentRefFile"}]},"width":{"$ref":"#/components/schemas/Length"},"height":{"$ref":"#/components/schemas/Length"},"alt":{"type":"string"}},"required":["ref"]},"fragments":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/DocumentFragment"},{"type":"object","properties":{"fragment":{"type":"string","enum":["caption"]},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlockParagraph"}}},"required":["nodes","fragment"]}]}},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","fragments","isVoid"]},"Length":{"oneOf":[{"type":"number"},{"type":"object","properties":{"unit":{"type":"string"},"value":{"type":"number"}},"required":["unit","value"]}]},"DocumentBlockFile":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["file"]},"key":{"type":"string"},"data":{"type":"object","properties":{"ref":{"oneOf":[{"$ref":"#/components/schemas/ContentRefFile"}]}},"required":["ref"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentBlockDrawing":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["drawing"]},"key":{"type":"string"},"data":{"type":"object","properties":{"ref":{"oneOf":[{"$ref":"#/components/schemas/ContentRefFile"}]}}},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentBlockEmbed":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["embed"]},"key":{"type":"string"},"data":{"type":"object","properties":{"url":{"type":"string"},"fullWidth":{"type":"boolean"}},"required":["url"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentBlockExpandable":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["expandable"]},"key":{"type":"string"},"isVoid":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"defaultExpanded":{"type":"boolean"}},"additionalProperties":false},"fragments":{"type":"array","items":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/DocumentFragment"},{"type":"object","properties":{"fragment":{"type":"string","enum":["expandable-title"]},"type":{"type":"string","enum":["expandable-title"]},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlockParagraph"},"minItems":1,"maxItems":1}},"required":["nodes","fragment","type"]}]},{"allOf":[{"$ref":"#/components/schemas/DocumentFragment"},{"type":"object","properties":{"fragment":{"type":"string","enum":["expandable-body"]},"type":{"type":"string","enum":["expandable-body"]},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockFile"},{"$ref":"#/components/schemas/DocumentBlockImages"},{"$ref":"#/components/schemas/DocumentBlockCode"},{"$ref":"#/components/schemas/DocumentBlockTable"},{"$ref":"#/components/schemas/DocumentBlockHint"},{"$ref":"#/components/schemas/DocumentBlockQuote"},{"$ref":"#/components/schemas/DocumentBlockReusableContent"},{"$ref":"#/components/schemas/DocumentBlockIntegration"}]},"minItems":1}},"required":["nodes","fragment","type"]}]}]}},"meta":{"type":"object","properties":{"id":{"description":"Unique ID to be used in an URL for the block.","type":"string"}},"required":["id"]}},"required":["object","type","isVoid","fragments","data"]},"DocumentBlockReusableContent":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["reusable-content"]},"key":{"type":"string"},"data":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRefReusableContent"}},"required":["ref"]},"isVoid":{"type":"boolean","enum":[true]},"meta":{"type":"object","properties":{"token":{"description":"A content token that can be used to fetch the reusable content from the API.","type":"string"}}}},"required":["object","type","data","isVoid"]},"DocumentBlockIntegration":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["integration"]},"key":{"type":"string"},"data":{"type":"object","properties":{"integration":{"type":"string","description":"Name of the integration"},"block":{"type":"string","description":"ID of the block in the integration"},"props":{"description":"Properties passed to the block during rendering","$ref":"#/components/schemas/PlainObject"},"action":{"$ref":"#/components/schemas/ContentKitAction"},"url":{"type":"string","description":"URL associated with the content represented by the block.\nThis property is set when creating a block from a URL (unfurl) to ensure\nwe can convert the block back to an embed.\n"},"fullWidth":{"type":"boolean"}},"required":["integration","block","props"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"PlainObject":{"properties":{},"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/PlainObject"},{"type":"string"},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"number"},{"$ref":"#/components/schemas/PlainObject"}]}}]}},"ContentKitAction":{"anyOf":[{"type":"object","description":"Custom action to re-render the block.","properties":{"action":{"type":"string"}},"additionalProperties":true,"required":["action"]},{"$ref":"#/components/schemas/ContentKitDefaultAction"}]},"ContentKitDefaultAction":{"oneOf":[{"type":"object","description":"Action to open an overlay modal defined by \"componentId\".","properties":{"action":{"type":"string","enum":["@ui.modal.open"]},"componentId":{"type":"string"},"props":{"$ref":"#/components/schemas/PlainObject"}},"required":["action","componentId","props"]},{"type":"object","description":"Action when a modal overlay is closed, with a return value to the higher level component in the stack. This action will be triggered on the parent component instance.","properties":{"action":{"type":"string","enum":["@ui.modal.close"]},"returnValue":{"$ref":"#/components/schemas/PlainObject"}},"required":["action","returnValue"]},{"type":"object","description":"Action to open an url.","properties":{"action":{"type":"string","enum":["@ui.url.open"]},"url":{"type":"string"}},"required":["action","url"]},{"type":"object","description":"Action when a link is being unfurled into a block.","properties":{"action":{"type":"string","enum":["@link.unfurl"]},"url":{"type":"string"}},"required":["action","url"]},{"type":"object","description":"Action to update the properties stored in the related node.","properties":{"action":{"type":"string","enum":["@editor.node.updateProps"]},"props":{"$ref":"#/components/schemas/PlainObject"}},"required":["action","props"]}]},"DocumentBlockTabs":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["tabs"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlockTabsItem"}},"isVoid":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{"fullWidth":{"type":"boolean"}},"additionalProperties":false}},"required":["object","type","nodes"]},"DocumentBlockTabsItem":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["tabs-item"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockContentRef"},{"$ref":"#/components/schemas/DocumentBlockCode"},{"$ref":"#/components/schemas/DocumentBlockEmbed"},{"$ref":"#/components/schemas/DocumentBlockFile"},{"$ref":"#/components/schemas/DocumentBlockImages"},{"$ref":"#/components/schemas/DocumentBlockDrawing"},{"$ref":"#/components/schemas/DocumentBlockHint"},{"$ref":"#/components/schemas/DocumentBlockQuote"},{"$ref":"#/components/schemas/DocumentBlockMath"},{"$ref":"#/components/schemas/DocumentBlockIntegration"}]}},"data":{"type":"object","properties":{"title":{"type":"string"}}},"meta":{"type":"object","properties":{"id":{"description":"Unique ID to be used in an URL for the block.","type":"string"}},"required":["id"]},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","nodes","data"]},"DocumentBlockContentRef":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["content-ref"]},"key":{"type":"string"},"data":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRef"}},"required":["ref"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentBlockOpenAPI":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["swagger"]},"key":{"type":"string"},"data":{"allOf":[{"$ref":"#/components/schemas/OpenAPIOperationPointer"},{"type":"object","properties":{"ref":{"oneOf":[{"$ref":"#/components/schemas/ContentRefFile"},{"$ref":"#/components/schemas/ContentRefURL"}]},"expanded":{"type":"boolean","description":"If true, the block is opened by default."},"fullWidth":{"type":"boolean"}},"required":["ref"]}]},"isVoid":{"type":"boolean","enum":[true]},"meta":{"type":"object","properties":{"id":{"description":"Unique ID to be used in an URL for the block.","type":"string"}},"required":["id"]}},"required":["object","type","data","isVoid"]},"OpenAPIOperationPointer":{"type":"object","description":"Pointer to an operation in the OpenAPI spec.","properties":{"path":{"type":"string","description":"Path of the operation in the OpenAPI spec."},"method":{"type":"string","description":"HTTP method of the operation in the OpenAPI spec."}},"required":["path","method"]},"DocumentBlockOpenAPIOperation":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["openapi-operation"]},"key":{"type":"string"},"data":{"allOf":[{"$ref":"#/components/schemas/OpenAPIOperationPointer"},{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRefOpenAPI"}},"required":["ref"]}]},"isVoid":{"type":"boolean","enum":[true]},"meta":{"type":"object","properties":{"id":{"description":"Unique ID to be used in an URL for the block.","type":"string"}},"required":["id"]}},"required":["object","type","data","isVoid"]},"DocumentBlockOpenAPISchemas":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["openapi-schemas"]},"key":{"type":"string"},"data":{"allOf":[{"$ref":"#/components/schemas/OpenAPISchemasPointer"},{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRefOpenAPI"}},"required":["ref"]}],"required":["ref"]},"isVoid":{"type":"boolean","enum":[true]},"meta":{"type":"object","properties":{"id":{"description":"Unique ID to be used in an URL for the block.","type":"string"}},"required":["id"]}},"required":["object","type","data","isVoid"]},"OpenAPISchemasPointer":{"type":"object","description":"Pointer to schemas in the OpenAPI spec.","properties":{"grouped":{"type":"boolean","description":"Whether the schemas are grouped or not.","default":true},"schemas":{"type":"array","description":"List of schemas name from the OpenAPI spec.","items":{"type":"string"}},"title":{"type":"string","description":"Custom title for the schemas block. When not provided, defaults to \"The <SchemaName> object\"."}},"required":["schemas"]},"DocumentBlockOpenAPIWebhook":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["openapi-webhook"]},"key":{"type":"string"},"data":{"allOf":[{"$ref":"#/components/schemas/OpenAPIWebhookPointer"},{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRefOpenAPI"}},"required":["ref"]}]},"isVoid":{"type":"boolean","enum":[true]},"meta":{"type":"object","properties":{"id":{"description":"Unique ID to be used in an URL for the block.","type":"string"}},"required":["id"]}},"required":["object","type","data","isVoid"]},"OpenAPIWebhookPointer":{"type":"object","description":"Pointer to a webhook in the OpenAPI spec.","properties":{"name":{"type":"string","description":"Name of the webhook in the OpenAPI spec."},"method":{"type":"string","description":"HTTP method of the webhook in the OpenAPI spec."}},"required":["name","method"]},"DocumentBlockStepper":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["stepper"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlockStepperStep"}},"isVoid":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{},"additionalProperties":false}},"required":["object","type","nodes"]},"DocumentBlockStepperStep":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["stepper-step"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockContentRef"},{"$ref":"#/components/schemas/DocumentBlockCode"},{"$ref":"#/components/schemas/DocumentBlockEmbed"},{"$ref":"#/components/schemas/DocumentBlockFile"},{"$ref":"#/components/schemas/DocumentBlockImages"},{"$ref":"#/components/schemas/DocumentBlockDrawing"},{"$ref":"#/components/schemas/DocumentBlockHint"},{"$ref":"#/components/schemas/DocumentBlockQuote"},{"$ref":"#/components/schemas/DocumentBlockMath"},{"$ref":"#/components/schemas/DocumentBlockIntegration"},{"$ref":"#/components/schemas/DocumentBlockExpandable"}]}},"data":{"type":"object","properties":{"icon":{"type":"string"}}},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","nodes","data"]},"DocumentBlockColumns":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["columns"]},"key":{"type":"string"},"data":{"type":"object","properties":{"fullWidth":{"type":"boolean"}}},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlockColumn"}},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","data","nodes","isVoid"]},"DocumentBlockColumn":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["column"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockImages"},{"$ref":"#/components/schemas/DocumentBlockCode"},{"$ref":"#/components/schemas/DocumentBlockHint"},{"$ref":"#/components/schemas/DocumentBlockContentRef"},{"$ref":"#/components/schemas/DocumentBlockDrawing"},{"$ref":"#/components/schemas/DocumentBlockEmbed"},{"$ref":"#/components/schemas/DocumentBlockFile"},{"$ref":"#/components/schemas/DocumentBlockIntegration"},{"$ref":"#/components/schemas/DocumentBlockMath"},{"$ref":"#/components/schemas/DocumentBlockQuote"},{"$ref":"#/components/schemas/DocumentBlockTable"},{"$ref":"#/components/schemas/DocumentBlockExpandable"},{"$ref":"#/components/schemas/DocumentBlockStepper"}]}},"isVoid":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{"width":{"$ref":"#/components/schemas/Length"},"verticalAlignment":{"$ref":"#/components/schemas/VerticalAlignment"}},"additionalProperties":false}},"required":["object","type","nodes","data"]},"DocumentBlockUpdates":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["updates"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlockUpdate"}},"isVoid":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{"format":{"type":"string","enum":["numeric","full","short"],"default":"full"}},"required":["format"],"additionalProperties":false}},"required":["object","type","nodes","data"]},"DocumentBlockUpdate":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["update"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockContentRef"},{"$ref":"#/components/schemas/DocumentBlockCode"},{"$ref":"#/components/schemas/DocumentBlockEmbed"},{"$ref":"#/components/schemas/DocumentBlockFile"},{"$ref":"#/components/schemas/DocumentBlockImages"},{"$ref":"#/components/schemas/DocumentBlockDrawing"},{"$ref":"#/components/schemas/DocumentBlockHint"},{"$ref":"#/components/schemas/DocumentBlockQuote"},{"$ref":"#/components/schemas/DocumentBlockMath"},{"$ref":"#/components/schemas/DocumentBlockIntegration"},{"$ref":"#/components/schemas/DocumentBlockTabs"},{"$ref":"#/components/schemas/DocumentBlockExpandable"}]}},"data":{"type":"object","properties":{"date":{"$ref":"#/components/schemas/Timestamp"},"tags":{"type":"array","description":"Array of tags. Each tag is id'ed by its slug.","items":{"$ref":"#/components/schemas/ContentRefTag"}}},"required":["date"]},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","nodes","data"]},"DocumentInlineMention":{"type":"object","properties":{"object":{"type":"string","enum":["inline"]},"type":{"type":"string","enum":["mention"]},"key":{"type":"string"},"data":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRef"}},"required":["ref"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentInlineButton":{"type":"object","properties":{"object":{"type":"string","enum":["inline"]},"type":{"type":"string","enum":["button"]},"key":{"type":"string"},"data":{"allOf":[{"type":"object","properties":{"label":{"type":"string"},"kind":{"type":"string","enum":["primary","secondary"]},"icon":{"$ref":"#/components/schemas/Icon"}},"required":["label","kind"]},{"oneOf":[{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRef"}},"required":["ref"],"additionalProperties":false},{"type":"object","properties":{"action":{"$ref":"#/components/schemas/DocumentAction"}},"required":["action"],"additionalProperties":false}]}]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentAction":{"type":"object","oneOf":[{"type":"object","properties":{"action":{"type":"string","enum":["search"]},"query":{"type":"string"}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["ask"]},"query":{"type":"string"}},"required":["action"],"additionalProperties":false}]},"RevisionPageSlug":{"type":"string","description":"Page's slug in its direct parent","minLength":0,"maxLength":100},"RevisionPageLink":{"allOf":[{"$ref":"#/components/schemas/RevisionPageBase"},{"type":"object","properties":{"kind":{"type":"string","deprecated":true,"enum":["link"]},"type":{"type":"string","enum":["link"]},"target":{"$ref":"#/components/schemas/ContentRef"},"href":{"type":"string"},"hidden":{"type":"boolean","description":"If true, the page is not displayed in the navigation, while still being accessible.","default":false}},"required":["kind","type","target"]}]},"RevisionPageComputed":{"allOf":[{"$ref":"#/components/schemas/RevisionPageBase"},{"type":"object","properties":{"type":{"type":"string","enum":["computed"]},"computed":{"$ref":"#/components/schemas/ComputedContentSourceRevision"}},"required":["type","computed"]}]},"ComputedContentSourceRevision":{"oneOf":[{"$ref":"#/components/schemas/ComputedContentSourceRevisionOpenAPI"},{"$ref":"#/components/schemas/ComputedContentSourceRevisionTranslation"},{"$ref":"#/components/schemas/ComputedContentSourceIntegration"}]},"ComputedContentSourceRevisionOpenAPI":{"allOf":[{"$ref":"#/components/schemas/ComputedContentSourceOpenAPIBase"},{"type":"object","description":"Parameters for an OpenAPI computed revision","required":["props"],"properties":{"props":{"type":"object","properties":{"models":{"type":"boolean"},"downloadLink":{"type":"boolean","description":"Whether to show a link to download the OpenAPI spec."}},"required":["models"]}}}]},"ComputedContentSourceOpenAPIBase":{"type":"object","description":"Generic parameters from an OpenAPI computed content source","properties":{"type":{"type":"string","enum":["builtin:openapi"]},"dependencies":{"type":"object","required":["spec"],"properties":{"spec":{"oneOf":[{"type":"object","additionalProperties":false,"required":["ref"],"properties":{"ref":{"$ref":"#/components/schemas/ContentRefOpenAPI"}}},{"$ref":"#/components/schemas/ComputedContentDependencyOpenAPI"}]}}}},"required":["type","dependencies"]},"ComputedContentDependencyOpenAPI":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRefOpenAPI"},"value":{"type":["object","null"],"description":"See `OpenAPI` schema component.","properties":{"object":{"type":"string","enum":["openapi-spec"]},"id":{"type":"string"},"slug":{"type":"string"},"lastVersion":{"type":"string"},"visibility":{"$ref":"#/components/schemas/OpenAPISpecVisibility"}},"required":["object","id","slug"]}},"required":["ref","value"]},"OpenAPISpecVisibility":{"type":"string","description":"The visibility setting of the OpenAPI spec.\n* `private`: The spec is not publicly available.\n* `public`: The spec is available to anyone with a public link.\n","enum":["private","public"]},"ComputedContentSourceRevisionTranslation":{"type":"object","description":"Parameters for a translation computed content source","properties":{"type":{"type":"string","enum":["builtin:translation"]},"props":{"type":"object","additionalProperties":false,"properties":{}},"dependencies":{"type":"object","required":["translation"],"properties":{"translation":{"oneOf":[{"type":"object","additionalProperties":false,"required":["ref"],"properties":{"ref":{"$ref":"#/components/schemas/TranslationRef"}}},{"$ref":"#/components/schemas/ComputedContentDependencyTranslation"}]}}}},"required":["type","props","dependencies"]},"TranslationRef":{"type":"object","properties":{"kind":{"type":"string","enum":["translation"]},"translation":{"type":"string","description":"ID of the translation sync"}},"required":["kind","translation"]},"ComputedContentDependencyTranslation":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/TranslationRef"},"value":{"oneOf":[{"$ref":"#/components/schemas/TranslationResult"},{"type":"null","description":"Translation has not been run yet"}]}},"required":["ref","value"]},"TranslationResult":{"type":"object","description":"Result of a translation.","properties":{"space":{"type":"string","description":"ID of the space containing the result of the translation"},"revision":{"type":"string","description":"ID of the revision generated by the translation"}},"required":["space","revision"]},"ComputedContentSourceIntegration":{"type":"object","description":"Parameters for a computed content managed by an integration","properties":{"type":{"type":"string","description":"Type of the computed source","pattern":"^integration:[^:]+:[^:]+$"},"props":{"description":"Properties to be passed to the computation","$ref":"#/components/schemas/PlainObject"},"dependencies":{"type":"object","description":"Dependencies the computation depends on.\nThe state of the dependencies will be passed to the computation.\nWhen the dependency's targets are updated, the computation will be updated.\n","additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/ComputedContentDependency"},{"$ref":"#/components/schemas/ComputedContentDependencyResolved"}]}}},"required":["type","props"]},"ComputedContentDependency":{"type":"object","description":"Dependency for a computation, before its resolution.","additionalProperties":false,"properties":{"ref":{"oneOf":[{"$ref":"#/components/schemas/ContentRefSpace"},{"$ref":"#/components/schemas/ContentRefOpenAPI"},{"$ref":"#/components/schemas/TranslationRef"}]}},"required":["ref"]},"ComputedContentDependencyResolved":{"description":"Dependency for a computation, with its resolved value.","oneOf":[{"$ref":"#/components/schemas/ComputedContentDependencySpace"},{"$ref":"#/components/schemas/ComputedContentDependencyOpenAPI"},{"$ref":"#/components/schemas/ComputedContentDependencyTranslation"}]},"ComputedContentDependencySpace":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRefSpace"},"value":{"type":["object","null"],"description":"See `Space` schema component.","properties":{"object":{"type":"string","enum":["space"]},"id":{"type":"string"},"revision":{"type":"string"}},"required":["object","id","revision"]}},"required":["ref","value"]},"GitSyncBlob":{"type":"object","properties":{"oid":{"type":"string","description":"SHA for the blob"},"path":{"type":"string","description":"Path of the blob in the Git tree"}},"required":["oid","path"]},"RevisionPageLayoutOptions":{"type":"object","properties":{"width":{"$ref":"#/components/schemas/RevisionPageLayoutOptionsWidth"},"cover":{"type":"boolean","description":"Should the cover be visible?"},"coverSize":{"$ref":"#/components/schemas/RevisionPageLayoutOptionsCoverSize"},"title":{"type":"boolean","description":"Should the title be visible?"},"description":{"type":"boolean","description":"Should the description be visible?"},"tableOfContents":{"type":"boolean","description":"Should the table of contents be visible?"},"outline":{"type":"boolean","description":"Should the outline be visible?"},"pagination":{"type":"boolean","description":"Should the pagination be visible?"},"metadata":{"type":"boolean","description":"Should the page metadata (last modified, author, etc.) be visible?"},"tags":{"type":"boolean","description":"Should the tags be visible on the page?"}},"required":["width","cover","coverSize","title","description","tableOfContents","outline","pagination","metadata","tags"]},"RevisionPageLayoutOptionsWidth":{"type":"string","description":"Width of the page.","enum":["default","wide"]},"RevisionPageLayoutOptionsCoverSize":{"type":"string","description":"Size of the cover image.","enum":["hero","full"]},"RevisionPageDocumentCover":{"type":"object","properties":{"ref":{"description":"Content reference pointing to the source image.","oneOf":[{"$ref":"#/components/schemas/ContentRefFile"},{"$ref":"#/components/schemas/ContentRefURL"}]},"refDark":{"description":"Content reference pointing to the source image for dark mode.","oneOf":[{"$ref":"#/components/schemas/ContentRefFile"},{"$ref":"#/components/schemas/ContentRefURL"}]},"yPos":{"description":"Vertical position of the cover image.","type":"number","default":0},"height":{"description":"Height of the cover image in pixels.","type":"number","minimum":10,"maximum":700,"default":240}},"required":["yPos"]},"Variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/VariableValue"}},"VariableValue":{"oneOf":[{"type":"string","maxLength":256},{"type":"number"},{"type":"boolean"}]},"RevisionPageMetaLinks":{"type":"object","properties":{"canonical":{"$ref":"#/components/schemas/RevisionPageMetaLinkTarget"},"alternates":{"type":"array","items":{"$ref":"#/components/schemas/RevisionPageMetaLinkTarget"}}}},"RevisionPageMetaLinkTarget":{"oneOf":[{"$ref":"#/components/schemas/ContentRefPage"},{"$ref":"#/components/schemas/ContentRefURL"}]},"RevisionPageTag":{"type":"object","description":"A reference to a tag with optional primary flag for page-level tags.","properties":{"tag":{"$ref":"#/components/schemas/ContentRefTag"},"primary":{"type":"boolean","description":"Whether this is the primary tag for display in table of contents."}},"required":["tag"]},"ComputedContentSourceDocument":{"oneOf":[{"$ref":"#/components/schemas/ComputedContentSourceDocumentOpenAPI"},{"$ref":"#/components/schemas/ComputedContentSourceDocumentTranslation"},{"$ref":"#/components/schemas/ComputedContentSourceIntegration"}]},"ComputedContentSourceDocumentOpenAPI":{"allOf":[{"$ref":"#/components/schemas/ComputedContentSourceOpenAPIBase"},{"type":"object","description":"Parameters for an OpenAPI computed document","required":["props"],"properties":{"props":{"oneOf":[{"type":"object","required":["doc"],"properties":{"doc":{"type":"string","enum":["models"]}}},{"type":"object","required":["doc","page"],"properties":{"doc":{"type":"string","enum":["operations","info"]},"page":{"type":"string","minLength":1}}}]}}}]},"ComputedContentSourceDocumentTranslation":{"type":"object","description":"Parameters for a document translation computed content source","required":["type","props"],"properties":{"type":{"type":"string","enum":["builtin:translation"]},"props":{"type":"object","required":["space","document"],"properties":{"space":{"type":"string"},"document":{"type":"string"}}}}},"RevisionPageGroup":{"allOf":[{"$ref":"#/components/schemas/RevisionPageBase"},{"type":"object","properties":{"kind":{"type":"string","deprecated":true,"enum":["group"]},"type":{"type":"string","enum":["group"]},"slug":{"description":"Page's slug in its direct parent","type":"string"},"path":{"description":"Complete path to access the page in the revision.","type":"string"},"hidden":{"type":"boolean","description":"If true, the page is not displayed in the navigation, while still being accessible.","default":false},"noIndex":{"type":"boolean","description":"If true, the page is not indexable in the search and ask features.","default":false},"noRobotsIndex":{"type":"boolean","description":"If true, the page is not indexable by search engine robots.","default":false},"pages":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/RevisionPageDocument"},{"$ref":"#/components/schemas/RevisionPageLink"},{"$ref":"#/components/schemas/RevisionPageComputed"}]}}},"required":["kind","type","slug","path","pages"]}]},"RevisionFile":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"downloadURL":{"type":"string"},"size":{"type":"number"},"dimensions":{"type":"object","description":"For images, it contains the dimensions of it.","properties":{"width":{"type":"number"},"height":{"type":"number"}},"required":["width","height"]},"git":{"$ref":"#/components/schemas/GitSyncBlob"}},"required":["id","name","contentType","downloadURL","size"]},"RevisionReusableContent":{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"git":{"$ref":"#/components/schemas/GitSyncBlob"}},"required":["id","title"]},{"oneOf":[{"type":"object","description":"Defined when the reusable content was generated by a computed content.","properties":{"computed":{"$ref":"#/components/schemas/ComputedContentSourceDocument"},"computedSeed":{"type":"string","description":"Seed to use for the generation of IDs."}},"required":["computed","computedSeed"]},{"type":"object","properties":{"document":{"type":"string","description":"ID of the document with the content body. If undefined, the reusable content is empty."}}}]}]},"RevisionTag":{"allOf":[{"type":"object","description":"A reusable tag that different types of content can be associated to (e.g. pages, update entries)","properties":{"slug":{"type":"string","description":"The slug identifier for the tag, immutable after creation."},"label":{"type":"string","description":"Display label for the tag. Can be renamed and differ from the slug."},"color":{"$ref":"#/components/schemas/DocumentTextColor"}},"required":["slug","label","color"]},{"oneOf":[{"type":"object","properties":{"emoji":{"$ref":"#/components/schemas/Emoji"}},"required":["emoji"]},{"type":"object","properties":{"icon":{"$ref":"#/components/schemas/Icon"}}}]}]},"GitSyncCommit":{"type":"object","properties":{"oid":{"type":"string","description":"SHA for the commit"},"message":{"type":"string","description":"Message describing the purpose of the commit"},"createdByGitBook":{"type":"boolean","description":"If true, the Git commit was generated by an export from GitBook"},"url":{"type":"string","description":"URL of the commit in the GitSync provider"},"ref":{"type":"string","description":"Original name of the ref where the commit originated from"}},"required":["oid","message","createdByGitBook"]},"RevisionTypeMerge":{"allOf":[{"$ref":"#/components/schemas/RevisionBase"},{"type":"object","properties":{"type":{"type":"string","description":"Revision created when merging a change request with primary.","enum":["merge"]},"mergedFrom":{"$ref":"#/components/schemas/ChangeRequest"}},"required":["type","mergedFrom"]}]},"ChangeRequest":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"change-request\"","enum":["change-request"]},"id":{"type":"string","description":"Unique identifier for the change request"},"number":{"type":"number","description":"Incremental identifier of the change request"},"status":{"$ref":"#/components/schemas/ChangeRequestStatus"},"subject":{"$ref":"#/components/schemas/ChangeRequestSubject"},"description":{"$ref":"#/components/schemas/JSONDocument"},"createdBy":{"$ref":"#/components/schemas/User"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"space":{"type":"string","description":"ID of the space in which the change request was created."},"revision":{"type":"string","description":"ID of the active revision in the change request."},"revisionInitial":{"type":"string","description":"ID of the initial revision in the space from which the change request was created."},"revisionMergedAncestor":{"type":"string","description":"ID of the latest revision when updating from main space content."},"revisionMerged":{"type":"string","description":"When merged, ID of the revision resulting from the merge."},"comments":{"type":"number","description":"Count of opened comments on the change request."},"siteTopic":{"type":"object","description":"Site context associated with the change request when it was created from a site topic or finding.","properties":{"site":{"type":"string","description":"ID of the site associated with the change request."},"topic":{"type":"string","description":"ID of the site topic associated with the change request."},"finding":{"type":"string","description":"ID of the site finding associated with the change request, when applicable."}},"required":["site","topic"]},"outdated":{"type":"boolean","description":"If true, the change request is not up-to-date with latest changes in the main content."},"links":{"$ref":"#/components/schemas/ChangeRequestLinks"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"app":{"type":"string","description":"URL of the space in the application","format":"uri"},"location":{"type":"string","description":"URL of the user in the API","format":"uri"}},"required":["app","location"]}},"required":["object","id","number","status","subject","createdBy","createdAt","updatedAt","space","revision","revisionInitial","comments","outdated","urls"]},"ChangeRequestStatus":{"type":"string","enum":["draft","open","archived","merged"]},"ChangeRequestSubject":{"type":"string","description":"Subject of the change request","minLength":0,"maxLength":100},"User":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"user\"","enum":["user"]},"id":{"type":"string","description":"Unique identifier for the user"},"displayName":{"type":"string","description":"Full name for the user"},"email":{"type":"string","description":"Email address of the user"},"photoURL":{"type":"string","description":"URL of the user's profile picture"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the user in the API","format":"uri"}},"required":["location"]}},"required":["object","id","displayName","urls"]},"ChangeRequestLinks":{"type":"array","description":"External links associated with the change request.","items":{"$ref":"#/components/schemas/ChangeRequestLink"},"maxItems":10},"ChangeRequestLink":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRefURL"},"title":{"$ref":"#/components/schemas/ChangeRequestLinkTitle"}},"required":["ref"]},"ChangeRequestLinkTitle":{"type":"string","description":"Optional title to display for the link.","maxLength":128},"RevisionTypeRollback":{"allOf":[{"$ref":"#/components/schemas/RevisionBase"},{"type":"object","properties":{"type":{"type":"string","description":"Revision created as a rollback of a previous revision.","enum":["rollback"]}},"required":["type"]}]},"RevisionTypeUpdate":{"allOf":[{"$ref":"#/components/schemas/RevisionBase"},{"type":"object","properties":{"type":{"type":"string","description":"Revision created when updating a change request with changes from primary.","enum":["update"]}},"required":["type"]}]},"RevisionTypeComputed":{"allOf":[{"$ref":"#/components/schemas/RevisionBase"},{"type":"object","properties":{"type":{"type":"string","description":"Virtual revision, computed from a source revision","enum":["computed"]}},"required":["type"]}]},"ContentLocationChangeRequestContext":{"type":"object","required":["type","changeRequest"],"properties":{"type":{"type":"string","enum":["changeRequest"]},"changeRequest":{"$ref":"#/components/schemas/ChangeRequest"}}},"ContentLocationURL":{"type":"object","properties":{"kind":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["kind","url"]},"ContentLocationPage":{"type":"object","properties":{"kind":{"type":"string","enum":["page"]},"organization":{"$ref":"#/components/schemas/Organization"},"page":{"$ref":"#/components/schemas/RevisionPage"},"space":{"$ref":"#/components/schemas/Space"},"versionContext":{"oneOf":[{"$ref":"#/components/schemas/ContentLocationRevisionContext"},{"$ref":"#/components/schemas/ContentLocationChangeRequestContext"}]},"internalLocation":{"oneOf":[{"$ref":"#/components/schemas/ContentLocationPageAnchor"},{"$ref":"#/components/schemas/ContentLocationPageNode"}]}},"required":["kind","organization","space","page"]},"ContentLocationPageAnchor":{"type":"object","properties":{"type":{"type":"string","enum":["anchor"]},"anchor":{"description":"The anchor within the page.","type":"string"}},"required":["type","anchor"]},"ContentLocationPageNode":{"type":"object","properties":{"type":{"type":"string","enum":["node"]},"node":{"description":"The node id within the page.","type":"string"}},"required":["type","node"]},"ContentLocationUser":{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"user":{"$ref":"#/components/schemas/User"}},"required":["kind","user"]},"ContentLocationCollection":{"type":"object","properties":{"kind":{"type":"string","enum":["collection"]},"organization":{"$ref":"#/components/schemas/Organization"},"collection":{"$ref":"#/components/schemas/Collection"}},"required":["kind","organization","collection"]},"Collection":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"collection\"","enum":["collection"]},"id":{"type":"string","description":"Unique identifier for the collection"},"title":{"$ref":"#/components/schemas/CollectionTitle"},"description":{"$ref":"#/components/schemas/CollectionDescription"},"organization":{"type":"string","description":"ID of the organization owning this collection"},"parent":{"type":"string","description":"ID of the parent collection, if any"},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the collection in the API","format":"uri"},"app":{"type":"string","description":"URL of the collection in the application","format":"uri"}},"required":["app","location"]},"permissions":{"type":"object","description":"The set of permissions for the collection","properties":{"view":{"type":"boolean","description":"Can the user view the collection."},"admin":{"type":"boolean","description":"Can the user edit the title/description."},"viewInviteLinks":{"type":"boolean","description":"Can the user view the invite links of the collection."},"create":{"type":"boolean","description":"Can the user create spaces/collections in this collection."}},"required":["view","admin","viewInviteLinks","create"]}},"required":["object","id","title","organization","urls","defaultLevel","permissions"]},"CollectionTitle":{"type":"string","description":"Title of the collection","maxLength":50},"CollectionDescription":{"type":"string","description":"Description of the collection","minLength":0,"maxLength":100},"ContentLocationSpace":{"type":"object","properties":{"kind":{"type":"string","enum":["space"]},"organization":{"$ref":"#/components/schemas/Organization"},"space":{"$ref":"#/components/schemas/Space"}},"required":["kind","organization","space"]},"ContentLocationReusableContent":{"type":"object","properties":{"kind":{"type":"string","enum":["reusable-content"]},"organization":{"$ref":"#/components/schemas/Organization"},"space":{"$ref":"#/components/schemas/Space"},"versionContext":{"oneOf":[{"$ref":"#/components/schemas/ContentLocationRevisionContext"},{"$ref":"#/components/schemas/ContentLocationChangeRequestContext"}]},"reusableContent":{"$ref":"#/components/schemas/RevisionReusableContent"}},"required":["kind","organization","space","reusableContent"]},"ContentLocationOpenAPI":{"type":"object","properties":{"kind":{"type":"string","enum":["openapi"]},"organization":{"$ref":"#/components/schemas/Organization"},"openAPISpec":{"$ref":"#/components/schemas/OpenAPISpec"}},"required":["kind","organization","openAPISpec"]},"OpenAPISpec":{"type":"object","properties":{"object":{"description":"The object type, which is always \"openapi-spec\"","type":"string","enum":["openapi-spec"]},"id":{"description":"Unique identifier","type":"string"},"createdAt":{"description":"Date of creation","$ref":"#/components/schemas/Timestamp"},"updatedAt":{"description":"Date of the last update","$ref":"#/components/schemas/Timestamp"},"slug":{"$ref":"#/components/schemas/OpenAPISpecSlug"},"sourceURL":{"$ref":"#/components/schemas/URL"},"processingState":{"$ref":"#/components/schemas/OpenAPISpecProcessingState"},"visibility":{"$ref":"#/components/schemas/OpenAPISpecVisibility"},"lastVersion":{"type":"string","description":"ID of the latest version of the OpenAPI specification"},"lastProcessedAt":{"description":"Date of the last processing","$ref":"#/components/schemas/Timestamp"},"lastProcessErrorCode":{"$ref":"#/components/schemas/OpenAPISpecProcessingErrorCode"},"lastProcessedErrors":{"type":"array","items":{"$ref":"#/components/schemas/OpenAPIErrorObject"}},"lastProcessedErrorCount":{"type":"integer","minimum":0,"description":"Total number of processing errors before truncation of lastProcessedErrors."},"permissions":{"type":"object","description":"The set of permissions for the OpenAPI specification.","required":["view","edit"],"properties":{"view":{"type":"boolean","description":"Can the user view the specification."},"edit":{"type":"boolean","description":"Can the user edit the specification."}}},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"description":"URL of the OpenAPI specification in the API","$ref":"#/components/schemas/URL"},"app":{"description":"URL of the OpenAPI specification in the application","$ref":"#/components/schemas/URL"},"published":{"type":"string","description":"URL of the published spec. Only defined when visibility is \"published.\"","format":"uri"}},"required":["app","location"]}},"required":["object","id","createdAt","updatedAt","slug","processingState","lastProcessedErrorCount","permissions","urls"]},"OpenAPISpecSlug":{"description":"Slug used as reference","type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$"},"OpenAPISpecProcessingState":{"description":"Processing state","enum":["pending","progress","complete"]},"OpenAPISpecProcessingErrorCode":{"description":"OpenAPI processing error code","enum":["FETCH_TIMEOUT","FETCH_ERROR","PARSE_ERROR"]},"OpenAPIErrorObject":{"type":"object","description":"OpenAPI error object.","properties":{"message":{"type":"string","description":"Description of the error."},"code":{"type":"string","description":"Unique code of the error."}},"required":["message"]}},"responses":{"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[404]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/spaces/{spaceId}/links":{"get":{"operationId":"listSpaceLinks","summary":"Get all links in a space including their status and location where they appear.","tags":["spaces","links","critical"],"parameters":[{"$ref":"#/components/parameters/spaceId"},{"$ref":"#/components/parameters/listPage"},{"$ref":"#/components/parameters/listLimit"},{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/ContentReferenceStatus"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"stats":{"$ref":"#/components/schemas/ContentReferencesStats"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ContentReferenceUsage"}}},"required":["items","stats"]}]}}}},"404":{"description":"The space could not be found.","$ref":"#/components/responses/NotFoundError"}}}}}}
```

## GET /orgs/{organizationId}/spaces

> List all spaces

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"spaces","description":"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.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"Space\" grouped=\"false\" %}\n    The Space object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}},"listPage":{"name":"page","in":"query","description":"Identifier of the page results to fetch.","schema":{"type":"string"}},"listLimit":{"name":"limit","in":"query","description":"The number of results per page","schema":{"type":"number","minimum":0,"maximum":1000}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"List":{"type":"object","properties":{"next":{"type":"object","properties":{"page":{"type":"string","description":"Unique identifier to query the next results page"}},"required":["page"]},"count":{"type":"number","description":"Total count of objects in the list"}}},"Space":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"space\"","enum":["space"]},"id":{"type":"string","description":"Unique identifier for the space"},"title":{"$ref":"#/components/schemas/SpaceTitle"},"emoji":{"description":"An emoji for this space. It'll match the emoji shown in the GitBook app.","$ref":"#/components/schemas/Emoji"},"visibility":{"$ref":"#/components/schemas/ContentVisibility"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"deletedAt":{"$ref":"#/components/schemas/Timestamp"},"editMode":{"$ref":"#/components/schemas/SpaceEditMode"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesSpaceConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the space in the API","format":"uri"},"app":{"type":"string","description":"URL of the space in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the space. Only defined when visibility is not \"private.\"","format":"uri"},"public":{"type":"string","description":"URL of the public version of the space. Only defined when visibility is \"public\".","format":"uri"},"icon":{"description":"URL of the icon of this space, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"organization":{"type":"string","description":"ID of the organization owning this space"},"parent":{"type":"string","description":"ID of the parent collection."},"language":{"$ref":"#/components/schemas/TranslationLanguage"},"gitSync":{"$ref":"#/components/schemas/GitSyncState"},"visitorAuth":{"$ref":"#/components/schemas/VisitorAuth"},"revision":{"type":"string","description":"ID of the active revision in the space."},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"comments":{"type":"number","description":"Count of opened comments on the space."},"changeRequests":{"type":"number","description":"Total count of change requests on the space."},"changeRequestsOpen":{"type":"number","description":"Count of open change requests on the space."},"changeRequestsDraft":{"type":"number","description":"Count of draft change requests on the space."},"internal_poweredByV2":{"type":"boolean","description":"Whether the space is powered by V2 of the content system."},"internal_singleWebsocket":{"type":"boolean","description":"Whether the space uses a single websocket connection for all real-time communication."},"permissions":{"type":"object","description":"The set of permissions for the space","properties":{"view":{"type":"boolean","description":"Can the user view the space content."},"access":{"type":"boolean","description":"Can the user access the space in the application."},"admin":{"type":"boolean","description":"Can the user edit the title, install integrations, and manage the space."},"viewInviteLinks":{"type":"boolean","description":"Can the user view the invite links of the space."},"edit":{"type":"boolean","description":"Can the user edit the content of the space by creating a change request."},"triggerGitSync":{"type":"boolean","description":"Can the user trigger a git sync."},"comment":{"type":"boolean","description":"Can the user comment on the content."},"merge":{"type":"boolean","description":"Can the user merge change requests."},"review":{"type":"boolean","description":"Can the user review change requests."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the space."}},"required":["view","access","admin","viewInviteLinks","edit","triggerGitSync","comment","merge","review","installIntegration"]}},"required":["object","id","title","emoji","organization","visibility","revision","createdAt","updatedAt","comments","changeRequests","changeRequestsOpen","changeRequestsDraft","mergeRules","urls","defaultLevel","permissions"]},"SpaceTitle":{"type":"string","description":"Title of the space","maxLength":50},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"ContentVisibility":{"type":"string","description":"* `public`: Anyone can access the content, and the content is indexed by search engines.\n* `unlisted`: Anyone can access the content, and the content is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the content.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the content.\n* `in-collection`: Anyone who can access the parent collection can access the content.\n  Only available for spaces in a collection.\n* `private`: Authorized members can access the content.\n","enum":["public","unlisted","share-link","visitor-auth","in-collection","private"]},"Timestamp":{"type":"string","format":"date-time"},"SpaceEditMode":{"type":"string","description":"Determines how a Space can be edited.\n* `live`: Users can directly edit the space\n* `locked`: All edits are locked for this space.\n","enum":["live","locked"]},"MergeRulesSpaceConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationInherit"},{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"}]},"MergeRulesConfigurationInherit":{"type":"object","description":"The merge rules inherits from the organization configuration.","properties":{"type":{"type":"string","enum":["inherit"]}},"required":["type"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"URL":{"type":"string","format":"uri","maxLength":2048},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","yue","ko","ar","hi","nl","pl","tr","sv","no","da","fi","el","cs","hu","ro","th","vi","id","ms","he","uk","sk","bg","hr","lt","lv","et","sl"]},"GitSyncState":{"type":"object","properties":{"repoName":{"type":"string","description":"Repository name."},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","description":"The integration name providing the Git Sync."},"url":{"type":"string","description":"The URL to the repository tree, used when rendering public content."},"updatedAt":{"description":"When the Git provider details were last updated","$ref":"#/components/schemas/Timestamp"}}},"GitSyncProvider":{"type":"string","description":"The provider of the Git Sync installation.","enum":["github","gitlab","github-legacy"]},"VisitorAuth":{"oneOf":[{"$ref":"#/components/schemas/VisitorAuthCustomBackend"},{"allOf":[{"$ref":"#/components/schemas/VisitorAuthIntegrationBackend"},{"type":"object","properties":{"integration":{"type":"string","description":"Name of integration being used as the backend for authenticated access"}},"required":["integration"]}]}]},"VisitorAuthCustomBackend":{"type":"object","title":"Custom backend for authenticated access","properties":{"backend":{"type":"string","description":"Custom backend for authenticated access","enum":["custom"]}},"required":["backend"]},"VisitorAuthIntegrationBackend":{"type":"object","title":"Integration backend for authenticated access","properties":{"backend":{"type":"string","description":"Integration as backend for authenticated access","enum":["integration"]}},"required":["backend"]},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]}}},"paths":{"/orgs/{organizationId}/spaces":{"get":{"operationId":"listSpacesInOrganizationById","summary":"List all spaces","tags":["spaces"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/listPage"},{"$ref":"#/components/parameters/listLimit"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Space"}}}}]}}}}}}}}}
```

## POST /orgs/{organizationId}/spaces

> Create a space

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"spaces","description":"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.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"Space\" grouped=\"false\" %}\n    The Space object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"CreateSpace":{"allOf":[{"type":"object","properties":{"title":{"type":"string","maxLength":50},"emoji":{"$ref":"#/components/schemas/Emoji"},"parent":{"type":"string","description":"ID of a parent collection"},"language":{"$ref":"#/components/schemas/TranslationLanguage"},"editMode":{"$ref":"#/components/schemas/SpaceEditMode","description":"The edit mode of the space"}}},{"anyOf":[{"type":"object","properties":{},"additionalProperties":true},{"oneOf":[{"type":"object","description":"Create a space from a template","required":["template"],"properties":{"template":{"$ref":"#/components/schemas/ApplySpaceTemplate"}}},{"type":"object","description":"Create a space from a computed content source","required":["computedSource"],"properties":{"computedSource":{"$ref":"#/components/schemas/ComputedContentSourceRevision"}}},{"type":"object","description":"Create a completely empty space (no page in it)","required":["empty"],"properties":{"empty":{"type":"boolean","enum":[true]}}}]}]}]},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","yue","ko","ar","hi","nl","pl","tr","sv","no","da","fi","el","cs","hu","ro","th","vi","id","ms","he","uk","sk","bg","hr","lt","lv","et","sl"]},"SpaceEditMode":{"type":"string","description":"Determines how a Space can be edited.\n* `live`: Users can directly edit the space\n* `locked`: All edits are locked for this space.\n","enum":["live","locked"]},"ApplySpaceTemplate":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the template to use for the space"},"params":{"$ref":"#/components/schemas/SpaceTemplateParams"}},"required":["id"]},"SpaceTemplateParams":{"type":"object","description":"Parameters for a space template","properties":{"contentRefs":{"type":"object","additionalProperties":{"type":"object","$ref":"#/components/schemas/ContentRef"}}}},"ContentRef":{"description":"A relative reference to content in GitBook.","oneOf":[{"$ref":"#/components/schemas/ContentRefFile"},{"$ref":"#/components/schemas/ContentRefURL"},{"$ref":"#/components/schemas/ContentRefPage"},{"$ref":"#/components/schemas/ContentRefAnchor"},{"$ref":"#/components/schemas/ContentRefUser"},{"$ref":"#/components/schemas/ContentRefCollection"},{"$ref":"#/components/schemas/ContentRefSpace"},{"$ref":"#/components/schemas/ContentRefReusableContent"},{"$ref":"#/components/schemas/ContentRefTag"},{"$ref":"#/components/schemas/ContentRefOpenAPI"}]},"ContentRefFile":{"type":"object","properties":{"kind":{"type":"string","enum":["file"]},"file":{"type":"string"},"space":{"description":"ID of the space the file is in. The file is considered as in the current space if none is provided.","type":"string"}},"required":["kind","file"]},"ContentRefURL":{"type":"object","properties":{"kind":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["kind","url"]},"ContentRefPage":{"type":"object","properties":{"kind":{"type":"string","enum":["page"]},"page":{"type":"string"},"space":{"description":"ID of the space the page is in. The page is considered as in the current space if none is provided.","type":"string"}},"required":["kind","page"]},"ContentRefAnchor":{"type":"object","properties":{"kind":{"type":"string","enum":["anchor"]},"anchor":{"type":"string"},"space":{"description":"ID of the space the page is in. The page is considered as in the current space if none is provided.","type":"string"},"page":{"description":"ID of the page the anchor is in. The anchor is considered as in the current page if none is provided.","type":"string"}},"required":["kind","anchor"]},"ContentRefUser":{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"user":{"type":"string"}},"required":["kind","user"]},"ContentRefCollection":{"type":"object","properties":{"kind":{"type":"string","enum":["collection"]},"collection":{"type":"string"}},"required":["kind","collection"]},"ContentRefSpace":{"type":"object","properties":{"kind":{"type":"string","enum":["space"]},"space":{"type":"string"}},"required":["kind","space"]},"ContentRefReusableContent":{"type":"object","properties":{"kind":{"type":"string","enum":["reusable-content"]},"reusableContent":{"type":"string"},"space":{"type":"string","description":"The space in which the reusable content is defined. If undefined, the reusable content is assumed to be in the same space as the content reference."}},"required":["kind","reusableContent"]},"ContentRefTag":{"type":"object","properties":{"kind":{"type":"string","enum":["tag"]},"tag":{"type":"string","description":"The slug of the tag, also used as the ID, and references the tags defined on a revision."},"space":{"type":"string","description":"The space in which the tag is defined. If undefined, the tag is assumed to be in the same space as the content reference."}},"required":["kind","tag"]},"ContentRefOpenAPI":{"type":"object","properties":{"kind":{"type":"string","enum":["openapi"]},"spec":{"type":"string","description":"Slug of the OpenAPI specification"}},"required":["kind","spec"]},"ComputedContentSourceRevision":{"oneOf":[{"$ref":"#/components/schemas/ComputedContentSourceRevisionOpenAPI"},{"$ref":"#/components/schemas/ComputedContentSourceRevisionTranslation"},{"$ref":"#/components/schemas/ComputedContentSourceIntegration"}]},"ComputedContentSourceRevisionOpenAPI":{"allOf":[{"$ref":"#/components/schemas/ComputedContentSourceOpenAPIBase"},{"type":"object","description":"Parameters for an OpenAPI computed revision","required":["props"],"properties":{"props":{"type":"object","properties":{"models":{"type":"boolean"},"downloadLink":{"type":"boolean","description":"Whether to show a link to download the OpenAPI spec."}},"required":["models"]}}}]},"ComputedContentSourceOpenAPIBase":{"type":"object","description":"Generic parameters from an OpenAPI computed content source","properties":{"type":{"type":"string","enum":["builtin:openapi"]},"dependencies":{"type":"object","required":["spec"],"properties":{"spec":{"oneOf":[{"type":"object","additionalProperties":false,"required":["ref"],"properties":{"ref":{"$ref":"#/components/schemas/ContentRefOpenAPI"}}},{"$ref":"#/components/schemas/ComputedContentDependencyOpenAPI"}]}}}},"required":["type","dependencies"]},"ComputedContentDependencyOpenAPI":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRefOpenAPI"},"value":{"type":["object","null"],"description":"See `OpenAPI` schema component.","properties":{"object":{"type":"string","enum":["openapi-spec"]},"id":{"type":"string"},"slug":{"type":"string"},"lastVersion":{"type":"string"},"visibility":{"$ref":"#/components/schemas/OpenAPISpecVisibility"}},"required":["object","id","slug"]}},"required":["ref","value"]},"OpenAPISpecVisibility":{"type":"string","description":"The visibility setting of the OpenAPI spec.\n* `private`: The spec is not publicly available.\n* `public`: The spec is available to anyone with a public link.\n","enum":["private","public"]},"ComputedContentSourceRevisionTranslation":{"type":"object","description":"Parameters for a translation computed content source","properties":{"type":{"type":"string","enum":["builtin:translation"]},"props":{"type":"object","additionalProperties":false,"properties":{}},"dependencies":{"type":"object","required":["translation"],"properties":{"translation":{"oneOf":[{"type":"object","additionalProperties":false,"required":["ref"],"properties":{"ref":{"$ref":"#/components/schemas/TranslationRef"}}},{"$ref":"#/components/schemas/ComputedContentDependencyTranslation"}]}}}},"required":["type","props","dependencies"]},"TranslationRef":{"type":"object","properties":{"kind":{"type":"string","enum":["translation"]},"translation":{"type":"string","description":"ID of the translation sync"}},"required":["kind","translation"]},"ComputedContentDependencyTranslation":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/TranslationRef"},"value":{"oneOf":[{"$ref":"#/components/schemas/TranslationResult"},{"type":"null","description":"Translation has not been run yet"}]}},"required":["ref","value"]},"TranslationResult":{"type":"object","description":"Result of a translation.","properties":{"space":{"type":"string","description":"ID of the space containing the result of the translation"},"revision":{"type":"string","description":"ID of the revision generated by the translation"}},"required":["space","revision"]},"ComputedContentSourceIntegration":{"type":"object","description":"Parameters for a computed content managed by an integration","properties":{"type":{"type":"string","description":"Type of the computed source","pattern":"^integration:[^:]+:[^:]+$"},"props":{"description":"Properties to be passed to the computation","$ref":"#/components/schemas/PlainObject"},"dependencies":{"type":"object","description":"Dependencies the computation depends on.\nThe state of the dependencies will be passed to the computation.\nWhen the dependency's targets are updated, the computation will be updated.\n","additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/ComputedContentDependency"},{"$ref":"#/components/schemas/ComputedContentDependencyResolved"}]}}},"required":["type","props"]},"PlainObject":{"properties":{},"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/PlainObject"},{"type":"string"},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"number"},{"$ref":"#/components/schemas/PlainObject"}]}}]}},"ComputedContentDependency":{"type":"object","description":"Dependency for a computation, before its resolution.","additionalProperties":false,"properties":{"ref":{"oneOf":[{"$ref":"#/components/schemas/ContentRefSpace"},{"$ref":"#/components/schemas/ContentRefOpenAPI"},{"$ref":"#/components/schemas/TranslationRef"}]}},"required":["ref"]},"ComputedContentDependencyResolved":{"description":"Dependency for a computation, with its resolved value.","oneOf":[{"$ref":"#/components/schemas/ComputedContentDependencySpace"},{"$ref":"#/components/schemas/ComputedContentDependencyOpenAPI"},{"$ref":"#/components/schemas/ComputedContentDependencyTranslation"}]},"ComputedContentDependencySpace":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRefSpace"},"value":{"type":["object","null"],"description":"See `Space` schema component.","properties":{"object":{"type":"string","enum":["space"]},"id":{"type":"string"},"revision":{"type":"string"}},"required":["object","id","revision"]}},"required":["ref","value"]},"Space":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"space\"","enum":["space"]},"id":{"type":"string","description":"Unique identifier for the space"},"title":{"$ref":"#/components/schemas/SpaceTitle"},"emoji":{"description":"An emoji for this space. It'll match the emoji shown in the GitBook app.","$ref":"#/components/schemas/Emoji"},"visibility":{"$ref":"#/components/schemas/ContentVisibility"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"deletedAt":{"$ref":"#/components/schemas/Timestamp"},"editMode":{"$ref":"#/components/schemas/SpaceEditMode"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesSpaceConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the space in the API","format":"uri"},"app":{"type":"string","description":"URL of the space in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the space. Only defined when visibility is not \"private.\"","format":"uri"},"public":{"type":"string","description":"URL of the public version of the space. Only defined when visibility is \"public\".","format":"uri"},"icon":{"description":"URL of the icon of this space, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"organization":{"type":"string","description":"ID of the organization owning this space"},"parent":{"type":"string","description":"ID of the parent collection."},"language":{"$ref":"#/components/schemas/TranslationLanguage"},"gitSync":{"$ref":"#/components/schemas/GitSyncState"},"visitorAuth":{"$ref":"#/components/schemas/VisitorAuth"},"revision":{"type":"string","description":"ID of the active revision in the space."},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"comments":{"type":"number","description":"Count of opened comments on the space."},"changeRequests":{"type":"number","description":"Total count of change requests on the space."},"changeRequestsOpen":{"type":"number","description":"Count of open change requests on the space."},"changeRequestsDraft":{"type":"number","description":"Count of draft change requests on the space."},"internal_poweredByV2":{"type":"boolean","description":"Whether the space is powered by V2 of the content system."},"internal_singleWebsocket":{"type":"boolean","description":"Whether the space uses a single websocket connection for all real-time communication."},"permissions":{"type":"object","description":"The set of permissions for the space","properties":{"view":{"type":"boolean","description":"Can the user view the space content."},"access":{"type":"boolean","description":"Can the user access the space in the application."},"admin":{"type":"boolean","description":"Can the user edit the title, install integrations, and manage the space."},"viewInviteLinks":{"type":"boolean","description":"Can the user view the invite links of the space."},"edit":{"type":"boolean","description":"Can the user edit the content of the space by creating a change request."},"triggerGitSync":{"type":"boolean","description":"Can the user trigger a git sync."},"comment":{"type":"boolean","description":"Can the user comment on the content."},"merge":{"type":"boolean","description":"Can the user merge change requests."},"review":{"type":"boolean","description":"Can the user review change requests."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the space."}},"required":["view","access","admin","viewInviteLinks","edit","triggerGitSync","comment","merge","review","installIntegration"]}},"required":["object","id","title","emoji","organization","visibility","revision","createdAt","updatedAt","comments","changeRequests","changeRequestsOpen","changeRequestsDraft","mergeRules","urls","defaultLevel","permissions"]},"SpaceTitle":{"type":"string","description":"Title of the space","maxLength":50},"ContentVisibility":{"type":"string","description":"* `public`: Anyone can access the content, and the content is indexed by search engines.\n* `unlisted`: Anyone can access the content, and the content is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the content.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the content.\n* `in-collection`: Anyone who can access the parent collection can access the content.\n  Only available for spaces in a collection.\n* `private`: Authorized members can access the content.\n","enum":["public","unlisted","share-link","visitor-auth","in-collection","private"]},"Timestamp":{"type":"string","format":"date-time"},"MergeRulesSpaceConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationInherit"},{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"}]},"MergeRulesConfigurationInherit":{"type":"object","description":"The merge rules inherits from the organization configuration.","properties":{"type":{"type":"string","enum":["inherit"]}},"required":["type"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"URL":{"type":"string","format":"uri","maxLength":2048},"GitSyncState":{"type":"object","properties":{"repoName":{"type":"string","description":"Repository name."},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","description":"The integration name providing the Git Sync."},"url":{"type":"string","description":"The URL to the repository tree, used when rendering public content."},"updatedAt":{"description":"When the Git provider details were last updated","$ref":"#/components/schemas/Timestamp"}}},"GitSyncProvider":{"type":"string","description":"The provider of the Git Sync installation.","enum":["github","gitlab","github-legacy"]},"VisitorAuth":{"oneOf":[{"$ref":"#/components/schemas/VisitorAuthCustomBackend"},{"allOf":[{"$ref":"#/components/schemas/VisitorAuthIntegrationBackend"},{"type":"object","properties":{"integration":{"type":"string","description":"Name of integration being used as the backend for authenticated access"}},"required":["integration"]}]}]},"VisitorAuthCustomBackend":{"type":"object","title":"Custom backend for authenticated access","properties":{"backend":{"type":"string","description":"Custom backend for authenticated access","enum":["custom"]}},"required":["backend"]},"VisitorAuthIntegrationBackend":{"type":"object","title":"Integration backend for authenticated access","properties":{"backend":{"type":"string","description":"Integration as backend for authenticated access","enum":["integration"]}},"required":["backend"]},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]}}},"paths":{"/orgs/{organizationId}/spaces":{"post":{"operationId":"createSpace","summary":"Create a space","tags":["spaces"],"parameters":[{"$ref":"#/components/parameters/organizationId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSpace"}}}},"responses":{"201":{"description":"Space created","headers":{"Location":{"description":"API URL for the newly created space","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}}}}}}}}
```
