Organization members

Handle all aspects of membership within an organization, from listing to role management.

Organization members can be managed through this API, which lets you invite and manage users under a particular organization. You can define roles and permissions to ensure your team has the right level of access.

List all organization members

get
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

Query parameters
pagestringoptional

Identifier of the page results to fetch.

limitnumber · max: 1000optional

The number of results per page

orderstring · enumoptional

An order for the items in the list

Default: descAvailable options:
roleone ofoptional

The Role to filter the member list by

"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.

searchstringoptional

A query to filter the member list (displayName and email)

sortstring · enumoptional

The property to sort the results by. When sorting by lastSeenAt, only active members will be listed.

Default: joinedAtAvailable options:
Responses
curl -L \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/members' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "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.285Z",
      "lastSeenAt": "2025-04-12T21:04:01.285Z",
      "sso": true,
      "spaces": 1,
      "teams": 1
    }
  ]
}

Get an organization member by its ID

get
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

userIdstringrequired

The unique ID of the User

Responses
curl -L \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/members/{userId}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "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.285Z",
  "lastSeenAt": "2025-04-12T21:04:01.285Z",
  "sso": true,
  "spaces": 1,
  "teams": 1
}

Delete an organization member

delete
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

userIdstringrequired

The unique ID of the User

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

No Content

Update an organization member

patch
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

userIdstringrequired

The unique ID of the User

Body
roleone ofoptional

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.

Responses
curl -L \
  --request PATCH \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/members/{userId}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "role": "admin"
  }'
{
  "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.285Z",
  "lastSeenAt": "2025-04-12T21:04:01.285Z",
  "sso": true,
  "spaces": 1,
  "teams": 1
}

Update an organization member last seen at

post
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

Responses
curl -L \
  --request POST \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/ping' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "gitbookVisitorClaims": "text"
}

Set a user as an SSO member of an organization

post
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

userIdstringrequired

The unique ID of the User

Responses
curl -L \
  --request POST \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/members/{userId}/sso' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "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.285Z",
  "lastSeenAt": "2025-04-12T21:04:01.285Z",
  "sso": true,
  "spaces": 1,
  "teams": 1
}

List an organization member space permissions

get
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

userIdstringrequired

The unique ID of the User

Query parameters
pagestringoptional

Identifier of the page results to fetch.

limitnumber · max: 1000optional

The number of results per page

orderstring · enumoptional

An order for the items in the list

Default: descAvailable options:
Responses
curl -L \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/members/{userId}/spaces' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "permission": "admin",
      "space": {
        "object": "space",
        "id": "text",
        "title": "text",
        "emoji": "🎉",
        "visibility": "public",
        "createdAt": "2025-04-12T21:04:01.285Z",
        "updatedAt": "2025-04-12T21:04:01.285Z",
        "deletedAt": "2025-04-12T21:04:01.285Z",
        "editMode": "live",
        "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",
        "gitSync": {
          "repoName": "text",
          "installationProvider": "github",
          "integration": "text",
          "url": "text",
          "updatedAt": "2025-04-12T21:04:01.285Z"
        },
        "visitorAuth": {
          "backend": "custom"
        },
        "revision": "text",
        "defaultLevel": "admin",
        "comments": 1,
        "changeRequests": 1,
        "changeRequestsOpen": 1,
        "changeRequestsDraft": 1,
        "permissions": {
          "access": true,
          "admin": true,
          "edit": true,
          "comment": true,
          "merge": true,
          "review": true
        }
      }
    }
  ]
}

List all organization member teams

get
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

userIdstringrequired

The unique ID of the User

Query parameters
pagestringoptional

Identifier of the page results to fetch.

limitnumber · max: 1000optional

The number of results per page

titlestringoptional

If provided, only teams whose name contains the given parameter will be returned. Case insensitive.

Responses
curl -L \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/members/{userId}/teams' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "team": {
        "object": "team",
        "id": "text",
        "title": "text",
        "members": 1,
        "spaces": 1,
        "createdAt": "2025-04-12T21:04:01.285Z"
      },
      "member": {
        "role": "owner"
      }
    }
  ]
}

Was this helpful?