Team members

Control membership at the team level for cohesive role management.

Easily add or remove users from teams, as well as fine-tune their specific roles within a team to ensure secure, well-organized collaboration.

The TeamMember object

Attributes
rolestring · enumrequired

"The role of a team member. "owner": Can manage team members. "member": Is a member of the team.

Available options:

The TeamMember object

{
  "role": "owner"
}

List all team members

get

Lists members, and their roles, for the specified organization team.

Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

teamIdstringrequired

The unique ID of the Team

Query parameters
pagestringoptional

Identifier of the page results to fetch.

limitnumber · max: 1000optional

The number of results per page

Responses
curl -L \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/teams/{teamId}/members' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "organization": {
        "object": "member",
        "id": "text",
        "role": "admin",
        "user": {
          "object": "user",
          "id": "text",
          "displayName": "text",
          "email": "text",
          "photoURL": "text",
          "urls": {
            "location": "https://example.com"
          }
        },
        "disabled": true,
        "joinedAt": "2025-04-12T21:04:01.096Z",
        "lastSeenAt": "2025-04-12T21:04:01.096Z",
        "sso": true,
        "spaces": 1,
        "teams": 1
      },
      "team": {
        "role": "owner"
      }
    }
  ]
}

Updates members of a team

put

Updates members of an organization team, either adding or removing them. If a the same user is included as both an add and a remove, they will be removed from the team.

Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

teamIdstringrequired

The unique ID of the Team

Body
addstring[]optional

A user to add. It can either be a user ID or an email.

membershipsobjectoptional

removestring[]optional

A user to remove. It can either be a user ID or an email.

Responses
curl -L \
  --request PUT \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/teams/{teamId}/members' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "add": [
      "text"
    ],
    "memberships": {
      "ANY_ADDITIONAL_PROPERTY": {
        "role": "owner"
      }
    },
    "remove": [
      "text"
    ]
  }'

No Content

Add a team member

put

Add or updates member in the specified organization team.

Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

teamIdstringrequired

The unique ID of the Team

userIdstringrequired

The unique ID of the User

Body
rolestring · enumoptional

"The role of a team member. "owner": Can manage team members. "member": Is a member of the team.

Available options:
Responses
curl -L \
  --request PUT \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/teams/{teamId}/members/{userId}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "role": "owner"
  }'

No Content

Delete a team member

delete

Deletes member from the specified organization team.

Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

teamIdstringrequired

The unique ID of the Team

userIdstringrequired

The unique ID of the User

Responses
curl -L \
  --request DELETE \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/teams/{teamId}/members/{userId}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'

No Content

Was this helpful?