GitBook API API reference CollectionsCollection teams Allocate team-based permissions to your collections.
Assign entire teams to a collection for easier role and permission management. Perfect for larger organizations looking to streamline content access.
List a collection team permissions
get
https://api.gitbook.com/v1 /collections/ {collectionId} /permissions/teams
collectionId string Required The unique id of the collection
page string Optional Identifier of the page results to fetch.
limit number · max: 1000 Optional The number of results per page
Copy GET /v1/collections/{collectionId}/permissions/teams HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Remove a team from a collection
delete
https://api.gitbook.com/v1 /collections/ {collectionId} /permissions/teams/ {teamId}
collectionId string Required The unique id of the collection
teamId string Required The unique ID of the Team
Copy DELETE /v1/collections/{collectionId}/permissions/teams/{teamId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Update a collection team permission
patch
https://api.gitbook.com/v1 /collections/ {collectionId} /permissions/teams/ {teamId}
collectionId string Required The unique id of the collection
teamId string Required The unique ID of the Team
role one of Optional The role of a member in an organization, null for guests
"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.
Copy PATCH /v1/collections/{collectionId}/permissions/teams/{teamId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"role": "admin"
}