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
application/json
all ofOptional
get
GET /v1/orgs/{organizationId}/members HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "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-22T10:43:05.940Z",
      "lastSeenAt": "2025-04-22T10:43:05.940Z",
      "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
application/json
objectOptional
get
GET /v1/orgs/{organizationId}/members/{userId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "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-22T10:43:05.940Z",
  "lastSeenAt": "2025-04-22T10:43:05.940Z",
  "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
delete
DELETE /v1/orgs/{organizationId}/members/{userId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
204

The member was deleted from the organization.

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
application/json
objectOptional
patch
PATCH /v1/orgs/{organizationId}/members/{userId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "role": "admin"
}
200

The member has been updated

{
  "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-22T10:43:05.940Z",
  "lastSeenAt": "2025-04-22T10:43:05.940Z",
  "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
application/json
objectOptional
post
POST /v1/orgs/{organizationId}/ping HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Organization member has been updated. Optionally returns a JWT token to attach to the user.

{
  "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
application/json
objectOptional
post
POST /v1/orgs/{organizationId}/members/{userId}/sso HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

The user has been added as an SSO member of the 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-22T10:43:05.940Z",
  "lastSeenAt": "2025-04-22T10:43:05.940Z",
  "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
application/json
all ofOptional
get
GET /v1/orgs/{organizationId}/members/{userId}/spaces HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Listing of spaces that can be accessed by the user in the organization.

{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "permission": "admin",
      "space": {
        "object": "space",
        "id": "text",
        "title": "text",
        "emoji": "🎉",
        "visibility": "public",
        "createdAt": "2025-04-22T10:43:05.940Z",
        "updatedAt": "2025-04-22T10:43:05.940Z",
        "deletedAt": "2025-04-22T10:43:05.940Z",
        "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-22T10:43:05.940Z"
        },
        "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
application/json
all ofOptional
get
GET /v1/orgs/{organizationId}/members/{userId}/teams HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "team": {
        "object": "team",
        "id": "text",
        "title": "text",
        "members": 1,
        "spaces": 1,
        "createdAt": "2025-04-22T10:43:05.940Z"
      },
      "member": {
        "role": "owner"
      }
    }
  ]
}

Was this helpful?