> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/developers/gitbook-api/api-reference/docs-sites/site-sections/add-a-new-navigation-section-to-a-site-backed-by-a-space.md).

# Add a new navigation section to a site backed by a space

Creates a new top-level navigation section in the site. The section appears as a tab or sidebar entry in the site navigation. Pass an existing space ID to link it as the section's primary content source, or pass `null` to create and link a new space. New spaces start with a blank page unless a template is provided or `empty` is `true`, which creates the space with no page at all (use it when you are about to add the pages yourself).

```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":[]},{"oauth":["site:write"]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"oauth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://oauth.gitbook.com/authorize","tokenUrl":"https://oauth.gitbook.com/token","scopes":{"user:read":"Read your GitBook user profile.","organization:read":"Read the organizations you belong to, their settings and metadata, and their AI agent conversations.","organization:write":"Create organizations, and update organization settings and AI agent conversations.","organization:members:read":"Read organization members, teams, invites and link invites.","organization:members:write":"Manage organization members, teams, invites and link invites.","organization:ask":"Ask AI questions across an organization's content.","organization:search":"Search across an organization's content.","space:read":"Read spaces and their content, including pages, change requests and their reviews, comments, files and revision history.","space:write":"Create, update and delete spaces and their content, including change requests (create, edit, review), comments, and content imports and exports. Merging a change request also requires change-request:merge.","space:permissions:read":"Read the users and teams who have access to spaces and collections.","space:permissions:write":"Manage who has access to spaces and collections, including inviting users and teams.","change-request:merge":"Merge change requests, publishing their changes to the space. Creating, editing and reviewing change requests only requires space:write.","site:read":"Read sites and their settings, including navigation structure, linked spaces, customization, redirects, topics, AI configuration and documentation issues.","site:write":"Create, update and delete sites and their settings, including navigation structure (sections, linked spaces, external links), customization, redirects, topics and AI configuration.","site:publish":"Publish and unpublish sites, controlling their public exposure.","site:permissions:read":"Read the users and teams who have access to sites.","site:permissions:write":"Manage who has access to sites, including inviting users and teams.","site:auth:read":"Read how visitors authenticate on a site and its security configuration, including private share links.","site:auth:write":"Manage how visitors authenticate on a site and its security configuration, including private share links.","site:insights:read":"Read site analytics and insights, including the questions visitors asked Ask AI and the answers they received.","site:ask":"Ask AI questions across a site's content.","site:search":"Search across a site's content.","integration:read":"Read integrations, their status and where they are installed.","integration:installations:read":"Read integration installations and their configuration, which can include credentials for third-party services.","integration:installations:write":"Install and configure integrations on an organization, its spaces and its sites.","integration:publish":"Publish integrations, which can request their own permissions on your content, and route their events to a development tunnel.","integration:delete":"Unpublish integrations, permanently deleting them and every installation of them.","openapi:read":"Read OpenAPI specifications.","openapi:write":"Create, update and delete OpenAPI specifications."}}}}},"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"},"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"]},"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","fr-ca","es-mx","es-419"]},"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"},"pageId":{"oneOf":[{"type":"string"},{"type":"null"}],"description":"Custom home page within the space, rendered at the site space's path root instead of the space's default landing page."},"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"},"type":{"type":"string","description":"Kind of space. Only set to `styleguide` for spaces holding a team's writing style guide; omitted for regular spaces.","enum":["styleguide"]},"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"},"previousGitSync":{"$ref":"#/components/schemas/PreviousGitSyncState"},"imports":{"description":"Import runs targeting this space, still running or ended recently, most recent first. Only returned when fetching a single space.\n","type":"array","items":{"$ref":"#/components/schemas/ContentImportRun"}},"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"},"message":{"type":"string","description":"Optional message to display when the expression evaluates to false."}},"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."},"parentInstallationId":{"type":"string","description":"The ID of the parent Git Sync installation, if any."},"url":{"type":"string","description":"The URL to the repository tree, used when rendering public content."},"installationProjectDirectory":{"type":"string","description":"Directory in the repository this content syncs from, resolved against the parent installation when the installation is managed by a site. Absent when the content syncs from the root of the repository."},"operation":{"type":"object","description":"The latest operation on the Git Sync installation.","properties":{"state":{"$ref":"#/components/schemas/GitSyncOperationState"},"direction":{"$ref":"#/components/schemas/GitSyncOperationDirection"},"startedAt":{"$ref":"#/components/schemas/Timestamp"},"endedAt":{"$ref":"#/components/schemas/Timestamp"},"error":{"type":"string","description":"Why the operation failed, when it did."},"errorAction":{"$ref":"#/components/schemas/GitSyncOperationErrorAction"}},"required":["state","direction","startedAt"]},"operationTimeout":{"type":"integer","description":"How long an operation is allowed to run before it is terminated (in milliseconds)."},"updatedAt":{"description":"When the Git provider details were last updated","$ref":"#/components/schemas/Timestamp"}},"required":["installationId","installationProvider","installationStatus"]},"GitSyncInstallationStatus":{"type":"string","enum":["unauthenticated","active","pending"]},"GitSyncProvider":{"type":"string","description":"The provider of the Git Sync installation.","enum":["github","gitlab","github-legacy"]},"GitSyncOperationState":{"type":"string","description":"* `running`: The operation is still running\n* `failure`: The operation failed\n* `success`: The operation was successful\n* `timeout`: The operation timed out\n","enum":["running","failure","success","timeout"]},"GitSyncOperationDirection":{"type":"string","enum":["export","import"]},"GitSyncOperationErrorAction":{"type":"object","description":"An action the user can take to resolve a failed Git Sync operation.","properties":{"label":{"type":"string","description":"Label for the action."},"url":{"type":"string","format":"uri","description":"URL where the user can resolve the failure."}},"required":["label","url"]},"PreviousGitSyncState":{"type":"object","description":"What is still known about a target's Git Sync after its installation was removed. Never returned alongside `gitSync`, which describes a live installation.","required":["url"],"properties":{"url":{"type":"string","description":"The URL to the directory of the repository tree the content synced with before its Git Sync installation was removed, at the branch it synced."}}},"ContentImportRun":{"type":"object","properties":{"object":{"description":"Type of Object, always equals to \"import-run\"","type":"string","enum":["import-run"]},"id":{"description":"Unique ID of the import","type":"string"},"startedAt":{"description":"Date when the import has started","$ref":"#/components/schemas/Timestamp"},"completedAt":{"description":"Filled when the imported is in status \"completed\"","$ref":"#/components/schemas/Timestamp"},"createdAt":{"description":"Date when the import was requested","$ref":"#/components/schemas/Timestamp"},"updatedAt":{"description":"Date when the import was last updated","$ref":"#/components/schemas/Timestamp"},"status":{"description":"Status of the import","type":"string","enum":["pending","in-progress","completed","failed","cancelled"]},"reason":{"description":"Reason for the import failure when `status` is `failed`.","type":"string"},"source":{"description":"Where the content is imported from.","$ref":"#/components/schemas/ContentImportSource"},"target":{"description":"Where the content is imported into.","$ref":"#/components/schemas/ContentImportTarget"},"site":{"description":"ID of the site the target space belongs to, when it belongs to exactly one.","type":"string"},"createdBy":{"description":"ID of the user who started the import.","type":"string"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"description":"URL of the import run in the API","type":"string","format":"uri"}},"required":["location"]},"pages":{"description":"Pages included in the import","type":"array","items":{"type":"object","properties":{"id":{"description":"ID of page","type":"string"},"sourceURL":{"description":"Source URL where the page has been imported from","type":"string"},"type":{"description":"Type of page","type":"string","enum":["page","folder"]},"status":{"description":"Status of the page","type":"string","enum":["complete","pending"]}},"required":["id","type","status"]}}},"required":["id","status"]},"ContentImportSource":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["website"]},"url":{"$ref":"#/components/schemas/URL"}},"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"files":{"description":"Files to import","type":"array","maxItems":50,"items":{"description":"Key of file","type":"string"}}},"required":["type","files"]}]},"ContentImportTarget":{"type":"object","properties":{"space":{"type":"string","description":"ID of the space to import in"},"changeRequest":{"type":"string","description":"ID of the change request to import in"},"page":{"type":"string","description":"ID of the page to import in"}},"required":["space"]},"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"]},"SubscriptionNotice":{"type":"object","description":"A notice about the organization's subscription to relay to the user, such as how many days are left in their trial. It is returned by the operations whose features may require a paid plan once a trial ends.\n","properties":{"type":{"type":"string","description":"- trial_started, the operation started the organization's trial. - trial_countdown, the organization's trial ends soon. - checkout_required, the operation needs a paid plan to complete.\n","enum":["trial_started","trial_countdown","checkout_required"]},"context":{"type":"string","description":"What the user was doing when the notice was given.","enum":["trial_started","site_publishing","site_features","site_customization"]},"commercialStatus":{"type":"string","description":"Whether the organization is on a trial, the free plan, or a paid plan.","enum":["trial","free","paid"]},"message":{"type":"string","description":"Message to show the user. For users who cannot upgrade, it asks them to reach out to an administrator of the organization."},"trial":{"$ref":"#/components/schemas/SubscriptionTrial"},"canManageBilling":{"type":"boolean","description":"Whether the user is an administrator of the organization, and so can upgrade. Otherwise, they have to ask an administrator to upgrade."},"upgradeUrl":{"description":"Where to upgrade in the application. Only set when `canManageBilling` is true.","$ref":"#/components/schemas/URL"},"pricingUrl":{"description":"Public page comparing the GitBook plans.","$ref":"#/components/schemas/URL"}},"required":["type","context","commercialStatus","message","canManageBilling","pricingUrl"]},"SubscriptionTrial":{"type":"object","description":"The current or last trial of an organization.","properties":{"status":{"$ref":"#/components/schemas/BillingTrialStatus"},"endDate":{"description":"When the trial ends, or ended.","$ref":"#/components/schemas/Timestamp"},"daysRemaining":{"type":"integer","description":"Days left in the trial, rounded up, so 1 is its last day. 0 once it has ended."}},"required":["status","endDate","daysRemaining"]},"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"]}}},"paths":{"/orgs/{organizationId}/sites/{siteId}/sections":{"post":{"operationId":"addSectionToSite","summary":"Add a new navigation section to a site backed by a space","description":"Creates a new top-level navigation section in the site. The section appears as a tab or sidebar entry in the site navigation. Pass an existing space ID to link it as the section's primary content source, or pass `null` to create and link a new space. New spaces start with a blank page unless a template is provided or `empty` is `true`, which creates the space with no page at all (use it when you are about to add the pages yourself).","tags":["site-sections"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/siteId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"oneOf":[{"type":"string"},{"type":"null"}],"description":"Pass the ID of an existing space or pass `null` to create a new space. The space will be added to the section as a site space variant."},"template":{"$ref":"#/components/schemas/ApplySpaceTemplate","description":"Template for the new space when `spaceId` is `null`. Templates that provision organization-level resources, such as OpenAPI specifications, are not supported by this site-scoped operation."},"empty":{"type":"boolean","default":false,"description":"Create the new space without any content, not even a blank page. Useful when the content is about to be populated, for example by an import. Only valid when `spaceId` is `null` and no template is provided."},"title":{"oneOf":[{"$ref":"#/components/schemas/SiteSectionTitle"},{"type":"null"}],"description":"Section title. Also used as the space title when `spaceId` is `null` and no template is provided."},"icon":{"oneOf":[{"$ref":"#/components/schemas/Icon"},{"type":"null"}]},"draft":{"type":"boolean","default":false,"description":"Whether the section should be created in draft mode. Defaults to false. Editors can set this to true to create draft content after sections are enabled. Creating live content requires Creator permission; enabling sections requires Admin permission."},"pageId":{"type":"string","description":"Custom home page within an existing space, rendered at the section's path root instead of the space's default landing page. Providing it when `spaceId` is `null` returns a 400 error."},"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":{"allOf":[{"$ref":"#/components/schemas/SiteSection"},{"type":"object","properties":{"subscriptionNotice":{"$ref":"#/components/schemas/SubscriptionNotice"}}}]}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook.com/docs/developers/gitbook-api/api-reference/docs-sites/site-sections/add-a-new-navigation-section-to-a-site-backed-by-a-space.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
