Collections

A collection in GitBook is the entity of a group that a space can belong to.

Get a collection by its ID

get
Authorizations
Path parameters
collectionIdstringRequired

The unique id of the collection

Responses
200

OK

application/json
get
/collections/{collectionId}
GET /v1/collections/{collectionId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "object": "collection",
  "id": "text",
  "title": "text",
  "description": "text",
  "organization": "text",
  "parent": "text",
  "defaultLevel": "admin",
  "urls": {
    "location": "https://example.com",
    "app": "https://example.com"
  },
  "permissions": {
    "view": true,
    "admin": true,
    "viewInviteLinks": true,
    "create": true
  }
}

List all collection spaces

get
Authorizations
Path parameters
collectionIdstringRequired

The unique id of the collection

Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

Responses
200

OK

application/json
Responseall of
get
/collections/{collectionId}/spaces
GET /v1/collections/{collectionId}/spaces HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "object": "space",
      "id": "text",
      "title": "text",
      "emoji": "🎉",
      "visibility": "public",
      "createdAt": "2025-11-06T14:38:23.370Z",
      "updatedAt": "2025-11-06T14:38:23.370Z",
      "deletedAt": "2025-11-06T14:38:23.370Z",
      "editMode": "live",
      "mergeRules": {
        "type": "inherit"
      },
      "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",
      "language": "en",
      "gitSync": {
        "repoName": "text",
        "installationProvider": "github",
        "integration": "text",
        "url": "text",
        "updatedAt": "2025-11-06T14:38:23.370Z"
      },
      "visitorAuth": {
        "backend": "custom"
      },
      "revision": "text",
      "defaultLevel": "admin",
      "comments": 1,
      "changeRequests": 1,
      "changeRequestsOpen": 1,
      "changeRequestsDraft": 1,
      "permissions": {
        "view": true,
        "access": true,
        "admin": true,
        "viewInviteLinks": true,
        "edit": true,
        "triggerGitSync": true,
        "comment": true,
        "merge": true,
        "review": true,
        "installIntegration": true
      }
    }
  ]
}

Get a collection by its ID

get
Authorizations
Path parameters
collectionIdstringRequired

The unique id of the collection

Responses
200

OK

application/json
get
/collections/{collectionId}
GET /v1/collections/{collectionId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "object": "collection",
  "id": "text",
  "title": "text",
  "description": "text",
  "organization": "text",
  "parent": "text",
  "defaultLevel": "admin",
  "urls": {
    "location": "https://example.com",
    "app": "https://example.com"
  },
  "permissions": {
    "view": true,
    "admin": true,
    "viewInviteLinks": true,
    "create": true
  }
}

List all collections users permissions

get
Authorizations
Path parameters
collectionIdstringRequired

The unique id of the collection

Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

rolestring · enumOptional

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

Possible values:
Responses
200

Listing of users who can access the collections.

application/json
Responseall of
get
/collections/{collectionId}/permissions/aggregate
GET /v1/collections/{collectionId}/permissions/aggregate HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Listing of users who can access the collections.

{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "permission": "admin",
      "user": {
        "object": "user",
        "id": "text",
        "displayName": "text",
        "email": "text",
        "photoURL": "text",
        "urls": {
          "location": "https://example.com"
        }
      }
    }
  ]
}

Was this helpful?