# Site sections

Sections help partition your site's content at the top level. They can be modified, deleted, or reorganized to reflect your site's changing structure.

## The SiteSection object

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"components":{"schemas":{"SiteSection":{"type":"object","properties":{"object":{"type":"string","description":"The object type, which is always \"site-section\"","enum":["site-section"]},"id":{"type":"string","description":"Unique identifier of the site section"},"title":{"$ref":"#/components/schemas/SiteSectionTitle"},"localizedTitle":{"$ref":"#/components/schemas/LocalizedString128"},"description":{"$ref":"#/components/schemas/SiteSectionDescription"},"localizedDescription":{"$ref":"#/components/schemas/LocalizedString256"},"default":{"type":"boolean","description":"Whether this is the default section for the site"},"draft":{"type":"boolean","description":"Whether the site section is draft and not live."},"path":{"$ref":"#/components/schemas/SiteSectionPath"},"condition":{"description":"Conditional expression used to evaluate whether the site section should be shown to the site's visitor.","$ref":"#/components/schemas/Expression"},"sectionGroup":{"type":"string","description":"ID of the section group the section belongs to in the site"},"siteSpaces":{"type":"array","items":{"$ref":"#/components/schemas/SiteSpace"}},"urls":{"type":"object","description":"URLs associated with the object","properties":{"published":{"type":"string","description":"URL of the published version of the site section. Only defined when site is published.","format":"uri"}}},"icon":{"$ref":"#/components/schemas/Icon"}},"required":["object","id","title","path","draft","siteSpaces","urls"]},"SiteSectionTitle":{"type":"string","description":"Title of the site section","minLength":2,"maxLength":128},"LocalizedString128":{"type":"object","description":"Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only.","additionalProperties":{"type":"string","maxLength":128},"propertyNames":{"$ref":"#/components/schemas/TranslationLanguage"}},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","zh-tw","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"]},"SiteSectionDescription":{"type":"string","description":"Description of the site section","minLength":0,"maxLength":256},"LocalizedString256":{"type":"object","description":"Localized string value with a 256 character limit, keyed by locale. Contains overrides for non-default languages only.","additionalProperties":{"type":"string","maxLength":256},"propertyNames":{"$ref":"#/components/schemas/TranslationLanguage"}},"SiteSectionPath":{"type":"string","description":"Path to the section on the site","minLength":1,"maxLength":100},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"SiteSpace":{"type":"object","properties":{"object":{"type":"string","description":"The object type, which is always \"site-space\"","enum":["site-space"]},"id":{"type":"string","description":"Unique identifier of the site-space"},"path":{"$ref":"#/components/schemas/SiteSpacePath"},"section":{"type":"string","description":"ID of the section the space belongs to in the site"},"space":{"$ref":"#/components/schemas/Space"},"title":{"type":"string"},"localizedTitle":{"$ref":"#/components/schemas/LocalizedString128"},"default":{"type":"boolean","description":"Whether this is the default space for the site"},"condition":{"description":"Conditional expression used to evaluate whether the site space should be shown to the site's visitor.","$ref":"#/components/schemas/Expression"},"draft":{"type":"boolean","description":"Whether the site space is draft and not live."},"hasAdvancedCustomizationFeature":{"type":"boolean","description":"Whether the space has advanced customization feature enabled"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"published":{"type":"string","description":"URL of the published version of the site-space. Only defined when site is published.","format":"uri"}}},"hidden":{"type":"boolean","description":"Whether the site space is hidden. If true, the site space will not be shown in the site's navigation."}},"required":["object","id","space","title","path","draft","urls"]},"SiteSpacePath":{"type":"string","description":"Path to the space on the site","minLength":1,"maxLength":100},"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"]}]},"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."},"installationStatus":{"$ref":"#/components/schemas/GitSyncInstallationStatus"},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","deprecated":true,"description":"The integration name providing the Git Sync."},"installationId":{"type":"string","description":"The ID of the Git Sync installation."},"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"}}},"GitSyncInstallationStatus":{"type":"string","enum":["unauthenticated","active","pending"]},"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"]},"Icon":{"type":"string","maxLength":50,"format":"icon","description":"Name of the icon"}}}}
```

## GET /orgs/{organizationId}/sites/{siteId}/sections

> List all site sections

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"site-sections","description":"Sections help partition your site's content at the top level. They can be modified, deleted, or reorganized to reflect your site's changing structure.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"SiteSection\" grouped=\"false\" %}\n    The SiteSection 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"}},"siteId":{"name":"siteId","in":"path","required":true,"description":"The unique id of the site","schema":{"type":"string"}},"siteShareKey":{"name":"shareKey","in":"query","description":"For sites published via share-links, the share key is useful to resolve published URLs.","schema":{"type":"string"}},"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"}}},"SiteSection":{"type":"object","properties":{"object":{"type":"string","description":"The object type, which is always \"site-section\"","enum":["site-section"]},"id":{"type":"string","description":"Unique identifier of the site section"},"title":{"$ref":"#/components/schemas/SiteSectionTitle"},"localizedTitle":{"$ref":"#/components/schemas/LocalizedString128"},"description":{"$ref":"#/components/schemas/SiteSectionDescription"},"localizedDescription":{"$ref":"#/components/schemas/LocalizedString256"},"default":{"type":"boolean","description":"Whether this is the default section for the site"},"draft":{"type":"boolean","description":"Whether the site section is draft and not live."},"path":{"$ref":"#/components/schemas/SiteSectionPath"},"condition":{"description":"Conditional expression used to evaluate whether the site section should be shown to the site's visitor.","$ref":"#/components/schemas/Expression"},"sectionGroup":{"type":"string","description":"ID of the section group the section belongs to in the site"},"siteSpaces":{"type":"array","items":{"$ref":"#/components/schemas/SiteSpace"}},"urls":{"type":"object","description":"URLs associated with the object","properties":{"published":{"type":"string","description":"URL of the published version of the site section. Only defined when site is published.","format":"uri"}}},"icon":{"$ref":"#/components/schemas/Icon"}},"required":["object","id","title","path","draft","siteSpaces","urls"]},"SiteSectionTitle":{"type":"string","description":"Title of the site section","minLength":2,"maxLength":128},"LocalizedString128":{"type":"object","description":"Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only.","additionalProperties":{"type":"string","maxLength":128},"propertyNames":{"$ref":"#/components/schemas/TranslationLanguage"}},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","zh-tw","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"]},"SiteSectionDescription":{"type":"string","description":"Description of the site section","minLength":0,"maxLength":256},"LocalizedString256":{"type":"object","description":"Localized string value with a 256 character limit, keyed by locale. Contains overrides for non-default languages only.","additionalProperties":{"type":"string","maxLength":256},"propertyNames":{"$ref":"#/components/schemas/TranslationLanguage"}},"SiteSectionPath":{"type":"string","description":"Path to the section on the site","minLength":1,"maxLength":100},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"SiteSpace":{"type":"object","properties":{"object":{"type":"string","description":"The object type, which is always \"site-space\"","enum":["site-space"]},"id":{"type":"string","description":"Unique identifier of the site-space"},"path":{"$ref":"#/components/schemas/SiteSpacePath"},"section":{"type":"string","description":"ID of the section the space belongs to in the site"},"space":{"$ref":"#/components/schemas/Space"},"title":{"type":"string"},"localizedTitle":{"$ref":"#/components/schemas/LocalizedString128"},"default":{"type":"boolean","description":"Whether this is the default space for the site"},"condition":{"description":"Conditional expression used to evaluate whether the site space should be shown to the site's visitor.","$ref":"#/components/schemas/Expression"},"draft":{"type":"boolean","description":"Whether the site space is draft and not live."},"hasAdvancedCustomizationFeature":{"type":"boolean","description":"Whether the space has advanced customization feature enabled"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"published":{"type":"string","description":"URL of the published version of the site-space. Only defined when site is published.","format":"uri"}}},"hidden":{"type":"boolean","description":"Whether the site space is hidden. If true, the site space will not be shown in the site's navigation."}},"required":["object","id","space","title","path","draft","urls"]},"SiteSpacePath":{"type":"string","description":"Path to the space on the site","minLength":1,"maxLength":100},"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"]}]},"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."},"installationStatus":{"$ref":"#/components/schemas/GitSyncInstallationStatus"},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","deprecated":true,"description":"The integration name providing the Git Sync."},"installationId":{"type":"string","description":"The ID of the Git Sync installation."},"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"}}},"GitSyncInstallationStatus":{"type":"string","enum":["unauthenticated","active","pending"]},"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"]},"Icon":{"type":"string","maxLength":50,"format":"icon","description":"Name of the icon"}}},"paths":{"/orgs/{organizationId}/sites/{siteId}/sections":{"get":{"operationId":"listSiteSections","summary":"List all site sections","tags":["site-sections"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/siteId"},{"$ref":"#/components/parameters/siteShareKey"},{"$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/SiteSection"}}}}]}}}}}}}}}
```

## POST /orgs/{organizationId}/sites/{siteId}/sections

> Add a section to a site

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"site-sections","description":"Sections help partition your site's content at the top level. They can be modified, deleted, or reorganized to reflect your site's changing structure.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"SiteSection\" grouped=\"false\" %}\n    The SiteSection 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"}},"siteId":{"name":"siteId","in":"path","required":true,"description":"The unique id of the site","schema":{"type":"string"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"SiteSectionTitle":{"type":"string","description":"Title of the site section","minLength":2,"maxLength":128},"Icon":{"type":"string","maxLength":50,"format":"icon","description":"Name of the icon"},"SiteSection":{"type":"object","properties":{"object":{"type":"string","description":"The object type, which is always \"site-section\"","enum":["site-section"]},"id":{"type":"string","description":"Unique identifier of the site section"},"title":{"$ref":"#/components/schemas/SiteSectionTitle"},"localizedTitle":{"$ref":"#/components/schemas/LocalizedString128"},"description":{"$ref":"#/components/schemas/SiteSectionDescription"},"localizedDescription":{"$ref":"#/components/schemas/LocalizedString256"},"default":{"type":"boolean","description":"Whether this is the default section for the site"},"draft":{"type":"boolean","description":"Whether the site section is draft and not live."},"path":{"$ref":"#/components/schemas/SiteSectionPath"},"condition":{"description":"Conditional expression used to evaluate whether the site section should be shown to the site's visitor.","$ref":"#/components/schemas/Expression"},"sectionGroup":{"type":"string","description":"ID of the section group the section belongs to in the site"},"siteSpaces":{"type":"array","items":{"$ref":"#/components/schemas/SiteSpace"}},"urls":{"type":"object","description":"URLs associated with the object","properties":{"published":{"type":"string","description":"URL of the published version of the site section. Only defined when site is published.","format":"uri"}}},"icon":{"$ref":"#/components/schemas/Icon"}},"required":["object","id","title","path","draft","siteSpaces","urls"]},"LocalizedString128":{"type":"object","description":"Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only.","additionalProperties":{"type":"string","maxLength":128},"propertyNames":{"$ref":"#/components/schemas/TranslationLanguage"}},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","zh-tw","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"]},"SiteSectionDescription":{"type":"string","description":"Description of the site section","minLength":0,"maxLength":256},"LocalizedString256":{"type":"object","description":"Localized string value with a 256 character limit, keyed by locale. Contains overrides for non-default languages only.","additionalProperties":{"type":"string","maxLength":256},"propertyNames":{"$ref":"#/components/schemas/TranslationLanguage"}},"SiteSectionPath":{"type":"string","description":"Path to the section on the site","minLength":1,"maxLength":100},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"SiteSpace":{"type":"object","properties":{"object":{"type":"string","description":"The object type, which is always \"site-space\"","enum":["site-space"]},"id":{"type":"string","description":"Unique identifier of the site-space"},"path":{"$ref":"#/components/schemas/SiteSpacePath"},"section":{"type":"string","description":"ID of the section the space belongs to in the site"},"space":{"$ref":"#/components/schemas/Space"},"title":{"type":"string"},"localizedTitle":{"$ref":"#/components/schemas/LocalizedString128"},"default":{"type":"boolean","description":"Whether this is the default space for the site"},"condition":{"description":"Conditional expression used to evaluate whether the site space should be shown to the site's visitor.","$ref":"#/components/schemas/Expression"},"draft":{"type":"boolean","description":"Whether the site space is draft and not live."},"hasAdvancedCustomizationFeature":{"type":"boolean","description":"Whether the space has advanced customization feature enabled"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"published":{"type":"string","description":"URL of the published version of the site-space. Only defined when site is published.","format":"uri"}}},"hidden":{"type":"boolean","description":"Whether the site space is hidden. If true, the site space will not be shown in the site's navigation."}},"required":["object","id","space","title","path","draft","urls"]},"SiteSpacePath":{"type":"string","description":"Path to the space on the site","minLength":1,"maxLength":100},"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"]}]},"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."},"installationStatus":{"$ref":"#/components/schemas/GitSyncInstallationStatus"},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","deprecated":true,"description":"The integration name providing the Git Sync."},"installationId":{"type":"string","description":"The ID of the Git Sync installation."},"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"}}},"GitSyncInstallationStatus":{"type":"string","enum":["unauthenticated","active","pending"]},"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}/sites/{siteId}/sections":{"post":{"operationId":"addSectionToSite","summary":"Add a section to a site","tags":["site-sections"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/siteId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"type":"string","description":"ID of the space to be added to the section as a site space variant"},"title":{"oneOf":[{"$ref":"#/components/schemas/SiteSectionTitle"},{"type":"null"}]},"icon":{"oneOf":[{"$ref":"#/components/schemas/Icon"},{"type":"null"}]},"draft":{"type":"boolean","description":"Whether the section should be created in draft mode."},"siteSectionGroupId":{"type":"string","description":"ID of the section group to create the section in"}},"required":["spaceId"]}}}},"responses":{"201":{"description":"Section added to the site","headers":{"Location":{"description":"API URL for the newly created site-section relationship","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteSection"}}}}}}}}}
```

## DELETE /orgs/{organizationId}/sites/{siteId}/sections/{siteSectionId}

> Delete a site section

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"site-sections","description":"Sections help partition your site's content at the top level. They can be modified, deleted, or reorganized to reflect your site's changing structure.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"SiteSection\" grouped=\"false\" %}\n    The SiteSection 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"}},"siteId":{"name":"siteId","in":"path","required":true,"description":"The unique id of the site","schema":{"type":"string"}},"siteSectionId":{"name":"siteSectionId","in":"path","required":true,"description":"The unique id of the section within a site","schema":{"type":"string"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"}}},"paths":{"/orgs/{organizationId}/sites/{siteId}/sections/{siteSectionId}":{"delete":{"operationId":"deleteSiteSectionById","summary":"Delete a site section","tags":["site-sections"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/siteId"},{"$ref":"#/components/parameters/siteSectionId"}],"responses":{"204":{"description":"Site section did not exist"},"205":{"description":"Site section has been deleted"}}}}}}
```

## PATCH /orgs/{organizationId}/sites/{siteId}/sections/{siteSectionId}

> Update a site section

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"site-sections","description":"Sections help partition your site's content at the top level. They can be modified, deleted, or reorganized to reflect your site's changing structure.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"SiteSection\" grouped=\"false\" %}\n    The SiteSection 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"}},"siteId":{"name":"siteId","in":"path","required":true,"description":"The unique id of the site","schema":{"type":"string"}},"siteSectionId":{"name":"siteSectionId","in":"path","required":true,"description":"The unique id of the section within a site","schema":{"type":"string"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"SiteSectionTitle":{"type":"string","description":"Title of the site section","minLength":2,"maxLength":128},"LocalizedString128":{"type":"object","description":"Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only.","additionalProperties":{"type":"string","maxLength":128},"propertyNames":{"$ref":"#/components/schemas/TranslationLanguage"}},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","zh-tw","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"]},"SiteSectionPath":{"type":"string","description":"Path to the section on the site","minLength":1,"maxLength":100},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"Icon":{"type":"string","maxLength":50,"format":"icon","description":"Name of the icon"},"SiteSectionDescription":{"type":"string","description":"Description of the site section","minLength":0,"maxLength":256},"LocalizedString256":{"type":"object","description":"Localized string value with a 256 character limit, keyed by locale. Contains overrides for non-default languages only.","additionalProperties":{"type":"string","maxLength":256},"propertyNames":{"$ref":"#/components/schemas/TranslationLanguage"}},"SiteSection":{"type":"object","properties":{"object":{"type":"string","description":"The object type, which is always \"site-section\"","enum":["site-section"]},"id":{"type":"string","description":"Unique identifier of the site section"},"title":{"$ref":"#/components/schemas/SiteSectionTitle"},"localizedTitle":{"$ref":"#/components/schemas/LocalizedString128"},"description":{"$ref":"#/components/schemas/SiteSectionDescription"},"localizedDescription":{"$ref":"#/components/schemas/LocalizedString256"},"default":{"type":"boolean","description":"Whether this is the default section for the site"},"draft":{"type":"boolean","description":"Whether the site section is draft and not live."},"path":{"$ref":"#/components/schemas/SiteSectionPath"},"condition":{"description":"Conditional expression used to evaluate whether the site section should be shown to the site's visitor.","$ref":"#/components/schemas/Expression"},"sectionGroup":{"type":"string","description":"ID of the section group the section belongs to in the site"},"siteSpaces":{"type":"array","items":{"$ref":"#/components/schemas/SiteSpace"}},"urls":{"type":"object","description":"URLs associated with the object","properties":{"published":{"type":"string","description":"URL of the published version of the site section. Only defined when site is published.","format":"uri"}}},"icon":{"$ref":"#/components/schemas/Icon"}},"required":["object","id","title","path","draft","siteSpaces","urls"]},"SiteSpace":{"type":"object","properties":{"object":{"type":"string","description":"The object type, which is always \"site-space\"","enum":["site-space"]},"id":{"type":"string","description":"Unique identifier of the site-space"},"path":{"$ref":"#/components/schemas/SiteSpacePath"},"section":{"type":"string","description":"ID of the section the space belongs to in the site"},"space":{"$ref":"#/components/schemas/Space"},"title":{"type":"string"},"localizedTitle":{"$ref":"#/components/schemas/LocalizedString128"},"default":{"type":"boolean","description":"Whether this is the default space for the site"},"condition":{"description":"Conditional expression used to evaluate whether the site space should be shown to the site's visitor.","$ref":"#/components/schemas/Expression"},"draft":{"type":"boolean","description":"Whether the site space is draft and not live."},"hasAdvancedCustomizationFeature":{"type":"boolean","description":"Whether the space has advanced customization feature enabled"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"published":{"type":"string","description":"URL of the published version of the site-space. Only defined when site is published.","format":"uri"}}},"hidden":{"type":"boolean","description":"Whether the site space is hidden. If true, the site space will not be shown in the site's navigation."}},"required":["object","id","space","title","path","draft","urls"]},"SiteSpacePath":{"type":"string","description":"Path to the space on the site","minLength":1,"maxLength":100},"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"]}]},"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."},"installationStatus":{"$ref":"#/components/schemas/GitSyncInstallationStatus"},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","deprecated":true,"description":"The integration name providing the Git Sync."},"installationId":{"type":"string","description":"The ID of the Git Sync installation."},"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"}}},"GitSyncInstallationStatus":{"type":"string","enum":["unauthenticated","active","pending"]},"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}/sites/{siteId}/sections/{siteSectionId}":{"patch":{"operationId":"updateSiteSectionById","summary":"Update a site section","tags":["site-sections"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/siteId"},{"$ref":"#/components/parameters/siteSectionId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"$ref":"#/components/schemas/SiteSectionTitle"},"localizedTitle":{"$ref":"#/components/schemas/LocalizedString128"},"path":{"$ref":"#/components/schemas/SiteSectionPath"},"defaultSiteSpace":{"type":"string","description":"ID of the site-space to be used as the default in this section."},"condition":{"description":"Conditional expression used to evaluate whether the site section should be shown to the site's visitor (should evaluate to a boolean). If not set, the condition will remain unchanged. If set to null, the condition will be removed.","oneOf":[{"$ref":"#/components/schemas/Expression"},{"type":"null"}]},"icon":{"oneOf":[{"$ref":"#/components/schemas/Icon"},{"type":"null"}]},"draft":{"type":"boolean","description":"Whether the site section is draft and not live."},"description":{"oneOf":[{"$ref":"#/components/schemas/SiteSectionDescription"},{"type":"null"}]},"localizedDescription":{"$ref":"#/components/schemas/LocalizedString256"},"siteSectionGroupId":{"description":"ID of the section group to move the section into. Set to null to move the section to the root of the site.","oneOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteSection"}}}}}}}}}
```

## POST /orgs/{organizationId}/sites/{siteId}/sections/{siteSectionId}/move

> Move a site section to a new position. (Deprecated) use sortSiteStructure instead.

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"site-sections","description":"Sections help partition your site's content at the top level. They can be modified, deleted, or reorganized to reflect your site's changing structure.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"SiteSection\" grouped=\"false\" %}\n    The SiteSection 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"}},"siteId":{"name":"siteId","in":"path","required":true,"description":"The unique id of the site","schema":{"type":"string"}},"siteSectionId":{"name":"siteSectionId","in":"path","required":true,"description":"The unique id of the section within a site","schema":{"type":"string"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"SiteSectionMovePosition":{"type":"object","description":"Position at which to move the site section to.","properties":{"before":{"$ref":"#/components/schemas/SiteSectionPointer"},"after":{"$ref":"#/components/schemas/SiteSectionPointer"}}},"SiteSectionPointer":{"type":"object","properties":{"type":{"type":"string","enum":["site-section"]},"siteSection":{"type":"string","description":"Unique identifier for the site section"}},"required":["type","siteSection"]},"SiteSection":{"type":"object","properties":{"object":{"type":"string","description":"The object type, which is always \"site-section\"","enum":["site-section"]},"id":{"type":"string","description":"Unique identifier of the site section"},"title":{"$ref":"#/components/schemas/SiteSectionTitle"},"localizedTitle":{"$ref":"#/components/schemas/LocalizedString128"},"description":{"$ref":"#/components/schemas/SiteSectionDescription"},"localizedDescription":{"$ref":"#/components/schemas/LocalizedString256"},"default":{"type":"boolean","description":"Whether this is the default section for the site"},"draft":{"type":"boolean","description":"Whether the site section is draft and not live."},"path":{"$ref":"#/components/schemas/SiteSectionPath"},"condition":{"description":"Conditional expression used to evaluate whether the site section should be shown to the site's visitor.","$ref":"#/components/schemas/Expression"},"sectionGroup":{"type":"string","description":"ID of the section group the section belongs to in the site"},"siteSpaces":{"type":"array","items":{"$ref":"#/components/schemas/SiteSpace"}},"urls":{"type":"object","description":"URLs associated with the object","properties":{"published":{"type":"string","description":"URL of the published version of the site section. Only defined when site is published.","format":"uri"}}},"icon":{"$ref":"#/components/schemas/Icon"}},"required":["object","id","title","path","draft","siteSpaces","urls"]},"SiteSectionTitle":{"type":"string","description":"Title of the site section","minLength":2,"maxLength":128},"LocalizedString128":{"type":"object","description":"Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only.","additionalProperties":{"type":"string","maxLength":128},"propertyNames":{"$ref":"#/components/schemas/TranslationLanguage"}},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","zh-tw","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"]},"SiteSectionDescription":{"type":"string","description":"Description of the site section","minLength":0,"maxLength":256},"LocalizedString256":{"type":"object","description":"Localized string value with a 256 character limit, keyed by locale. Contains overrides for non-default languages only.","additionalProperties":{"type":"string","maxLength":256},"propertyNames":{"$ref":"#/components/schemas/TranslationLanguage"}},"SiteSectionPath":{"type":"string","description":"Path to the section on the site","minLength":1,"maxLength":100},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"SiteSpace":{"type":"object","properties":{"object":{"type":"string","description":"The object type, which is always \"site-space\"","enum":["site-space"]},"id":{"type":"string","description":"Unique identifier of the site-space"},"path":{"$ref":"#/components/schemas/SiteSpacePath"},"section":{"type":"string","description":"ID of the section the space belongs to in the site"},"space":{"$ref":"#/components/schemas/Space"},"title":{"type":"string"},"localizedTitle":{"$ref":"#/components/schemas/LocalizedString128"},"default":{"type":"boolean","description":"Whether this is the default space for the site"},"condition":{"description":"Conditional expression used to evaluate whether the site space should be shown to the site's visitor.","$ref":"#/components/schemas/Expression"},"draft":{"type":"boolean","description":"Whether the site space is draft and not live."},"hasAdvancedCustomizationFeature":{"type":"boolean","description":"Whether the space has advanced customization feature enabled"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"published":{"type":"string","description":"URL of the published version of the site-space. Only defined when site is published.","format":"uri"}}},"hidden":{"type":"boolean","description":"Whether the site space is hidden. If true, the site space will not be shown in the site's navigation."}},"required":["object","id","space","title","path","draft","urls"]},"SiteSpacePath":{"type":"string","description":"Path to the space on the site","minLength":1,"maxLength":100},"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"]}]},"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."},"installationStatus":{"$ref":"#/components/schemas/GitSyncInstallationStatus"},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","deprecated":true,"description":"The integration name providing the Git Sync."},"installationId":{"type":"string","description":"The ID of the Git Sync installation."},"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"}}},"GitSyncInstallationStatus":{"type":"string","enum":["unauthenticated","active","pending"]},"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"]},"Icon":{"type":"string","maxLength":50,"format":"icon","description":"Name of the icon"}},"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"]}}}}}}}},"paths":{"/orgs/{organizationId}/sites/{siteId}/sections/{siteSectionId}/move":{"post":{"operationId":"moveSiteSection","deprecated":true,"summary":"Move a site section to a new position. (Deprecated) use sortSiteStructure instead.","tags":["site-sections"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/siteId"},{"$ref":"#/components/parameters/siteSectionId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"position":{"description":"The position where to move the site section. When not provided the site section is moved at the end of the site.","$ref":"#/components/schemas/SiteSectionMovePosition"}}}}}},"responses":{"200":{"description":"Site section moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteSection"}}}},"400":{"description":"Invalid move site section position provided","$ref":"#/components/responses/BadRequestError"},"404":{"description":"No matching Site section found","$ref":"#/components/responses/NotFoundError"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gitbook-open-v2-preview.gitbook.workers.dev/url/gitbook.com/docs/developers/gitbook-api/api-reference/docs-sites/site-sections.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
