Site section groups

Group and manage sections of your docs for easier organization.

Section groups let you bundle multiple top-level sections together, offering additional structuring capabilities and simplifying navigation for your readers.

The SiteSectionGroup object

Attributes
objectstring · enumrequired

The object type, which is always "site-section-group"

Available options:
idstringrequired

Unique identifier of the site section group

titlestring · min: 1 · max: 100required

Title of the site section group

sectionsobject[]required

List of site section ids that are members of the group

iconstring · icon · max: 50optional

Name of the icon

Example: gear

The SiteSectionGroup object

{
  "object": "site-section-group",
  "id": "text",
  "title": "text",
  "sections": [
    {
      "object": "site-section",
      "id": "text",
      "title": "text",
      "description": "text",
      "default": true,
      "path": "text",
      "condition": "text",
      "sectionGroup": "text",
      "siteSpaces": [
        {
          "object": "site-space",
          "id": "text",
          "path": "text",
          "section": "text",
          "space": {
            "object": "space",
            "id": "text",
            "title": "text",
            "emoji": "🎉",
            "visibility": "public",
            "createdAt": "2025-04-12T21:04:01.285Z",
            "updatedAt": "2025-04-12T21:04:01.285Z",
            "deletedAt": "2025-04-12T21:04:01.285Z",
            "editMode": "live",
            "urls": {
              "location": "https://example.com",
              "app": "https://example.com",
              "published": "https://example.com",
              "public": "https://example.com",
              "icon": "https://example.com"
            },
            "organization": "text",
            "parent": "text",
            "gitSync": {
              "repoName": "text",
              "installationProvider": "github",
              "integration": "text",
              "url": "text",
              "updatedAt": "2025-04-12T21:04:01.285Z"
            },
            "visitorAuth": {
              "backend": "custom"
            },
            "revision": "text",
            "defaultLevel": "admin",
            "comments": 1,
            "changeRequests": 1,
            "changeRequestsOpen": 1,
            "changeRequestsDraft": 1,
            "permissions": {
              "access": true,
              "admin": true,
              "edit": true,
              "comment": true,
              "merge": true,
              "review": true
            }
          },
          "title": "text",
          "default": true,
          "condition": "text",
          "hasAdvancedCustomizationFeature": true,
          "urls": {
            "published": "https://example.com"
          }
        }
      ],
      "urls": {
        "published": "https://example.com"
      },
      "icon": "gear"
    }
  ],
  "icon": "gear"
}

List all site section groups

get
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

siteIdstringrequired

The unique id of the site

Query parameters
pagestringoptional

Identifier of the page results to fetch.

limitnumber · max: 1000optional

The number of results per page

Responses
curl -L \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/sites/{siteId}/section-groups' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "object": "site-section-group",
      "id": "text",
      "title": "text",
      "sections": [
        {
          "object": "site-section",
          "id": "text",
          "title": "text",
          "description": "text",
          "default": true,
          "path": "text",
          "condition": "text",
          "sectionGroup": "text",
          "siteSpaces": [
            {
              "object": "site-space",
              "id": "text",
              "path": "text",
              "section": "text",
              "space": {
                "object": "space",
                "id": "text",
                "title": "text",
                "emoji": "🎉",
                "visibility": "public",
                "createdAt": "2025-04-12T21:04:01.285Z",
                "updatedAt": "2025-04-12T21:04:01.285Z",
                "deletedAt": "2025-04-12T21:04:01.285Z",
                "editMode": "live",
                "urls": {
                  "location": "https://example.com",
                  "app": "https://example.com",
                  "published": "https://example.com",
                  "public": "https://example.com",
                  "icon": "https://example.com"
                },
                "organization": "text",
                "parent": "text",
                "gitSync": {
                  "repoName": "text",
                  "installationProvider": "github",
                  "integration": "text",
                  "url": "text",
                  "updatedAt": "2025-04-12T21:04:01.285Z"
                },
                "visitorAuth": {
                  "backend": "custom"
                },
                "revision": "text",
                "defaultLevel": "admin",
                "comments": 1,
                "changeRequests": 1,
                "changeRequestsOpen": 1,
                "changeRequestsDraft": 1,
                "permissions": {
                  "access": true,
                  "admin": true,
                  "edit": true,
                  "comment": true,
                  "merge": true,
                  "review": true
                }
              },
              "title": "text",
              "default": true,
              "condition": "text",
              "hasAdvancedCustomizationFeature": true,
              "urls": {
                "published": "https://example.com"
              }
            }
          ],
          "urls": {
            "published": "https://example.com"
          },
          "icon": "gear"
        }
      ],
      "icon": "gear"
    }
  ]
}

Add a section group to a site

post
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

siteIdstringrequired

The unique id of the site

Body
titlestring · min: 1 · max: 100required

Title of the site section group

iconone ofoptional

Name of the icon

sectionsstring[]optional

IDs of the sections to be added to the section group

Responses
curl -L \
  --request POST \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/sites/{siteId}/section-groups' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "title": "text",
    "icon": "gear",
    "sections": [
      "text"
    ]
  }'
{
  "object": "site-section-group",
  "id": "text",
  "title": "text",
  "sections": [
    {
      "object": "site-section",
      "id": "text",
      "title": "text",
      "description": "text",
      "default": true,
      "path": "text",
      "condition": "text",
      "sectionGroup": "text",
      "siteSpaces": [
        {
          "object": "site-space",
          "id": "text",
          "path": "text",
          "section": "text",
          "space": {
            "object": "space",
            "id": "text",
            "title": "text",
            "emoji": "🎉",
            "visibility": "public",
            "createdAt": "2025-04-12T21:04:01.285Z",
            "updatedAt": "2025-04-12T21:04:01.285Z",
            "deletedAt": "2025-04-12T21:04:01.285Z",
            "editMode": "live",
            "urls": {
              "location": "https://example.com",
              "app": "https://example.com",
              "published": "https://example.com",
              "public": "https://example.com",
              "icon": "https://example.com"
            },
            "organization": "text",
            "parent": "text",
            "gitSync": {
              "repoName": "text",
              "installationProvider": "github",
              "integration": "text",
              "url": "text",
              "updatedAt": "2025-04-12T21:04:01.285Z"
            },
            "visitorAuth": {
              "backend": "custom"
            },
            "revision": "text",
            "defaultLevel": "admin",
            "comments": 1,
            "changeRequests": 1,
            "changeRequestsOpen": 1,
            "changeRequestsDraft": 1,
            "permissions": {
              "access": true,
              "admin": true,
              "edit": true,
              "comment": true,
              "merge": true,
              "review": true
            }
          },
          "title": "text",
          "default": true,
          "condition": "text",
          "hasAdvancedCustomizationFeature": true,
          "urls": {
            "published": "https://example.com"
          }
        }
      ],
      "urls": {
        "published": "https://example.com"
      },
      "icon": "gear"
    }
  ],
  "icon": "gear"
}

Delete a site section group

delete
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

siteIdstringrequired

The unique id of the site

siteSectionGroupIdstringrequired

The unique id of the site group

Responses
curl -L \
  --request DELETE \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'

No Content

Update a site section group

patch
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

siteIdstringrequired

The unique id of the site

siteSectionGroupIdstringrequired

The unique id of the site group

Body
titlestring · min: 1 · max: 100optional

Title of the site section group

iconone ofoptional

Name of the icon

Responses
curl -L \
  --request PATCH \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "title": "text",
    "icon": "gear"
  }'
{
  "object": "site-section-group",
  "id": "text",
  "title": "text",
  "sections": [
    {
      "object": "site-section",
      "id": "text",
      "title": "text",
      "description": "text",
      "default": true,
      "path": "text",
      "condition": "text",
      "sectionGroup": "text",
      "siteSpaces": [
        {
          "object": "site-space",
          "id": "text",
          "path": "text",
          "section": "text",
          "space": {
            "object": "space",
            "id": "text",
            "title": "text",
            "emoji": "🎉",
            "visibility": "public",
            "createdAt": "2025-04-12T21:04:01.285Z",
            "updatedAt": "2025-04-12T21:04:01.285Z",
            "deletedAt": "2025-04-12T21:04:01.285Z",
            "editMode": "live",
            "urls": {
              "location": "https://example.com",
              "app": "https://example.com",
              "published": "https://example.com",
              "public": "https://example.com",
              "icon": "https://example.com"
            },
            "organization": "text",
            "parent": "text",
            "gitSync": {
              "repoName": "text",
              "installationProvider": "github",
              "integration": "text",
              "url": "text",
              "updatedAt": "2025-04-12T21:04:01.285Z"
            },
            "visitorAuth": {
              "backend": "custom"
            },
            "revision": "text",
            "defaultLevel": "admin",
            "comments": 1,
            "changeRequests": 1,
            "changeRequestsOpen": 1,
            "changeRequestsDraft": 1,
            "permissions": {
              "access": true,
              "admin": true,
              "edit": true,
              "comment": true,
              "merge": true,
              "review": true
            }
          },
          "title": "text",
          "default": true,
          "condition": "text",
          "hasAdvancedCustomizationFeature": true,
          "urls": {
            "published": "https://example.com"
          }
        }
      ],
      "urls": {
        "published": "https://example.com"
      },
      "icon": "gear"
    }
  ],
  "icon": "gear"
}

Add a section to a section group

post
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

siteIdstringrequired

The unique id of the site

siteSectionGroupIdstringrequired

The unique id of the site group

Body
sectionIdstringrequired

ID of the section to add to the section group

Responses
curl -L \
  --request POST \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}/sections' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "sectionId": "text"
  }'
{
  "object": "site-section-group",
  "id": "text",
  "title": "text",
  "sections": [
    {
      "object": "site-section",
      "id": "text",
      "title": "text",
      "description": "text",
      "default": true,
      "path": "text",
      "condition": "text",
      "sectionGroup": "text",
      "siteSpaces": [
        {
          "object": "site-space",
          "id": "text",
          "path": "text",
          "section": "text",
          "space": {
            "object": "space",
            "id": "text",
            "title": "text",
            "emoji": "🎉",
            "visibility": "public",
            "createdAt": "2025-04-12T21:04:01.285Z",
            "updatedAt": "2025-04-12T21:04:01.285Z",
            "deletedAt": "2025-04-12T21:04:01.285Z",
            "editMode": "live",
            "urls": {
              "location": "https://example.com",
              "app": "https://example.com",
              "published": "https://example.com",
              "public": "https://example.com",
              "icon": "https://example.com"
            },
            "organization": "text",
            "parent": "text",
            "gitSync": {
              "repoName": "text",
              "installationProvider": "github",
              "integration": "text",
              "url": "text",
              "updatedAt": "2025-04-12T21:04:01.285Z"
            },
            "visitorAuth": {
              "backend": "custom"
            },
            "revision": "text",
            "defaultLevel": "admin",
            "comments": 1,
            "changeRequests": 1,
            "changeRequestsOpen": 1,
            "changeRequestsDraft": 1,
            "permissions": {
              "access": true,
              "admin": true,
              "edit": true,
              "comment": true,
              "merge": true,
              "review": true
            }
          },
          "title": "text",
          "default": true,
          "condition": "text",
          "hasAdvancedCustomizationFeature": true,
          "urls": {
            "published": "https://example.com"
          }
        }
      ],
      "urls": {
        "published": "https://example.com"
      },
      "icon": "gear"
    }
  ],
  "icon": "gear"
}

Remove a section from a section group

delete
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

siteIdstringrequired

The unique id of the site

siteSectionGroupIdstringrequired

The unique id of the site group

siteSectionIdstringrequired

The unique id of the section within a site

Responses
curl -L \
  --request DELETE \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}/sections/{siteSectionId}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'

No Content

Move a site section group to a new position

post
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

siteIdstringrequired

The unique id of the site

siteSectionGroupIdstringrequired

The unique id of the site group

Body
positionobjectoptional

The position where to move the site section group. When not provided the site section group is moved at the end of the site.

Responses
curl -L \
  --request POST \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}/move' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "position": {
      "before": {
        "type": "site-section",
        "id": "text"
      },
      "after": {
        "type": "site-section",
        "id": "text"
      }
    }
  }'
{
  "object": "site-section-group",
  "id": "text",
  "title": "text",
  "sections": [
    {
      "object": "site-section",
      "id": "text",
      "title": "text",
      "description": "text",
      "default": true,
      "path": "text",
      "condition": "text",
      "sectionGroup": "text",
      "siteSpaces": [
        {
          "object": "site-space",
          "id": "text",
          "path": "text",
          "section": "text",
          "space": {
            "object": "space",
            "id": "text",
            "title": "text",
            "emoji": "🎉",
            "visibility": "public",
            "createdAt": "2025-04-12T21:04:01.285Z",
            "updatedAt": "2025-04-12T21:04:01.285Z",
            "deletedAt": "2025-04-12T21:04:01.285Z",
            "editMode": "live",
            "urls": {
              "location": "https://example.com",
              "app": "https://example.com",
              "published": "https://example.com",
              "public": "https://example.com",
              "icon": "https://example.com"
            },
            "organization": "text",
            "parent": "text",
            "gitSync": {
              "repoName": "text",
              "installationProvider": "github",
              "integration": "text",
              "url": "text",
              "updatedAt": "2025-04-12T21:04:01.285Z"
            },
            "visitorAuth": {
              "backend": "custom"
            },
            "revision": "text",
            "defaultLevel": "admin",
            "comments": 1,
            "changeRequests": 1,
            "changeRequestsOpen": 1,
            "changeRequestsDraft": 1,
            "permissions": {
              "access": true,
              "admin": true,
              "edit": true,
              "comment": true,
              "merge": true,
              "review": true
            }
          },
          "title": "text",
          "default": true,
          "condition": "text",
          "hasAdvancedCustomizationFeature": true,
          "urls": {
            "published": "https://example.com"
          }
        }
      ],
      "urls": {
        "published": "https://example.com"
      },
      "icon": "gear"
    }
  ],
  "icon": "gear"
}

Was this helpful?