GitBook API API reference SpacesSpace teams Integrate team-based permissions for better collaboration in a space.
Assign entire teams to your spaces and streamline the process of granting or revoking access at scale, without dealing with individual user roles.
Remove a space team
delete
https://api.gitbook.com/v1 /spaces/ {spaceId} /permissions/teams/ {teamId}
spaceId string required The unique id of the space
teamId string required The unique ID of the Team
Copy DELETE /v1/spaces/{spaceId}/permissions/teams/{teamId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Update a space team permission
patch
https://api.gitbook.com/v1 /spaces/ {spaceId} /permissions/teams/ {teamId}
spaceId string required The unique id of the space
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/spaces/{spaceId}/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"
}
List space team persmissions
get
https://api.gitbook.com/v1 /spaces/ {spaceId} /permissions/teams
spaceId string required The unique id of the space
page string optional Identifier of the page results to fetch.
limit number · max: 1000 optional The number of results per page
Copy GET /v1/spaces/{spaceId}/permissions/teams HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*