Collections
A collection in GitBook is the entity of a group that a space can belong to.
The unique id of the collection
OK
GET /v1/collections/{collectionId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
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
}
}The unique id of the collection
Identifier of the page results to fetch.
The number of results per page
OK
GET /v1/collections/{collectionId}/spaces HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
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
}
}
]
}The unique id of the collection
OK
GET /v1/collections/{collectionId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
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
}
}The unique id of the collection
Identifier of the page results to fetch.
The number of results per page
"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.
Listing of users who can access the collections.
GET /v1/collections/{collectionId}/permissions/aggregate HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
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?