Space 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
Authorizations
Path parameters
spaceIdstringRequired

The unique id of the space

teamIdstringRequired

The unique ID of the Team

Responses
205
The team has been removed from the space
delete
DELETE /v1/spaces/{spaceId}/permissions/teams/{teamId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Update a space team permission

patch
Authorizations
Path parameters
spaceIdstringRequired

The unique id of the space

teamIdstringRequired

The unique ID of the Team

Body
roleone ofOptional

The role of a member in an organization, null for guests

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
204
Team permission was updated
patch
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"
}

No content

List space team persmissions

get
Authorizations
Path parameters
spaceIdstringRequired

The unique id of the space

Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

Responses
200
Listing of teams who have been added to a space.
application/json
Responseall of
get
GET /v1/spaces/{spaceId}/permissions/teams HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "permission": "admin",
      "team": {
        "object": "team",
        "id": "text",
        "title": "text",
        "members": 1,
        "spaces": 1,
        "createdAt": "2025-05-05T09:56:40.319Z",
        "permissions": {
          "admin": true,
          "view": true
        }
      }
    }
  ]
}

Was this helpful?