Collections

Organize and manage grouped sets of spaces for better content structure.

Collections let you bundle multiple spaces under a unified entity, making large-scale content easier to handle. You can sort content by subject, department, or any grouping logic.

The Collection object

Attributes
objectstring · enumRequired

Type of Object, always equals to "collection"

Possible values:
idstringRequired

Unique identifier for the collection

titlestring · max: 50Required

Title of the collection

descriptionstring · max: 100Optional

Description of the collection

organizationstringRequired

ID of the organization owning this collection

parentstringOptional

ID of the parent collection, if any

defaultLevelone ofRequired

Default level for a piece of content

string · enum | nullableOptional

"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:

The Collection object

{  "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  } }

Get a collection by its ID

get
Authorizations
Path parameters
collectionIdstringRequired

The unique id of the collection

Responses
200

OK

application/json
get
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  } }

Delete a collection

delete
Authorizations
Path parameters
collectionIdstringRequired

The unique id of the collection

Responses
204

Collection did not exist

No content

delete
DELETE /v1/collections/{collectionId} HTTP/1.1 Host: api.gitbook.com Authorization: Bearer YOUR_SECRET_TOKEN Accept: */* 

No content

Update a collection

patch
Authorizations
Path parameters
collectionIdstringRequired

The unique id of the collection

Body
titlestring · max: 50Optional

Title of the collection

descriptionstring · max: 100Optional

Description of the collection

defaultLevelone ofOptional

Default level for a piece of content

string · enum | nullableOptional

"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

The collection has been updated

application/json
patch
PATCH /v1/collections/{collectionId} HTTP/1.1 Host: api.gitbook.com Authorization: Bearer YOUR_SECRET_TOKEN Content-Type: application/json Accept: */* Content-Length: 60  {  "title": "text",  "description": "text",  "defaultLevel": "admin" }
200

The collection has been updated

{  "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
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-10-10T11:03:45.016Z",  "updatedAt": "2025-10-10T11:03:45.016Z",  "deletedAt": "2025-10-10T11:03:45.016Z",  "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-10-10T11:03:45.016Z"  },  "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  }  }  ] }

Move a collection to a new position.

post
Authorizations
Path parameters
collectionIdstringRequired

The unique id of the collection

Body
parentstring | nullableOptional

The unique id of the parent collection

Responses
200

Collection moved

application/json
post
POST /v1/collections/{collectionId}/move HTTP/1.1 Host: api.gitbook.com Authorization: Bearer YOUR_SECRET_TOKEN Content-Type: application/json Accept: */* Content-Length: 111  {  "parent": "text",  "position": {  "before": {  "type": "space",  "space": "text"  },  "after": {  "type": "space",  "space": "text"  }  } }
{  "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  } }

Transfer a collection

post
Authorizations
Path parameters
collectionIdstringRequired

The unique id of the collection

Body
organizationstringRequired

The unique id of the target organization

Responses
200

Collection transferred

application/json
post
POST /v1/collections/{collectionId}/transfer HTTP/1.1 Host: api.gitbook.com Authorization: Bearer YOUR_SECRET_TOKEN Content-Type: application/json Accept: */* Content-Length: 23  {  "organization": "text" }
{  "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

get
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

nestedbooleanOptional

If true, all nested collections will be listed

Default: true
Responses
200

OK

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

OK

{  "next": {  "page": "text"  },  "count": 1,  "items": [  {  "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  }  }  ] }

Create a collection

post
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

Body
titlestring · max: 50Optional
parentstringOptional

ID of a parent collection

Responses
201

Collection created

application/json
post
POST /v1/orgs/{organizationId}/collections HTTP/1.1 Host: api.gitbook.com Authorization: Bearer YOUR_SECRET_TOKEN Content-Type: application/json Accept: */* Content-Length: 32  {  "title": "text",  "parent": "text" }
201

Collection created

{  "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  } }

Was this helpful?