Explore how adaptive content transforms your docs into a dynamic, tailored experience for every user.
Read the docs
LogoLogo
ProductPricingLog inSign up
  • Documentation
  • Developers
  • Guides
  • Changelog
  • Help Center
  • Getting Started
    • Developer Documentation
    • Quickstart
    • Development
    • Publishing
  • Integrations
    • Introduction
    • Using the CLI
    • Configuration
    • ContentKit
      • Component reference
    • Integration runtime
  • Client library
  • Guides
    • Creating a custom unfurl action
    • Creating interactive blocks
    • Referencing your integration in Markdown
    • Working with HTTP requests
    • Using the CLI in CI/CD
  • GitBook API
    • Introduction
    • Authentication
    • API reference
      • Organizations
        • Organization members
        • Organization invites
        • Organization AI ask
      • Docs sites
        • Site share links
        • Site structure
        • Site auth
        • Site preview
        • Site customization
        • Site spaces
        • Site sections
        • Site section groups
        • Site redirects
        • Site MCP servers
        • Site ads
        • Site users
        • Site insights
        • Site AI ask
      • Collections
        • Collection users
        • Collection teams
      • Spaces
        • Space content
        • Space comments
        • Space embeds
        • Space users
        • Space teams
        • Space integrations
        • Git
      • Change requests
        • Change request content
        • Change request contributors
        • Change request reviewers
        • Change request comments
      • Translations
        • Glossary
      • Integrations
      • URLs
      • OpenAPI
        • OpenAPI spec versions
      • Conversations
      • Custom fonts
      • Subdomains
      • Users
      • Teams
        • Team members
      • SSO
      • Storage
      • Custom hostnames
      • System info
    • Rate limiting
    • Pagination
    • Errors
  • Marketplace
    • Overview
    • Submit your app for review
  • Resources
    • Concepts
    • Changelog
    • ContentKit playground
    • GitHub examples
Powered by GitBook
On this page
  1. GitBook API
  2. API reference
  3. Organizations

Organization members

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

Was this helpful?

LogoLogo

Resources

  • Showcase
  • Enterprise
  • Status

Company

  • Careers
  • Blog
  • Community

Policies

  • Subprocessors
  • Terms of Service
CtrlK

Was this helpful?

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.

  • GETList all organization members
  • GETGet an organization member by its ID
  • DELETEDelete an organization member
  • PATCHUpdate an organization member
  • POSTUpdate an organization member last seen at
  • POSTSet a user as an SSO member of an organization
  • GETList an organization member space permissions
  • GETList all organization member teams

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: descPossible values:
roleone ofOptional

The Role to filter the member list by

string · enumOptional

"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:
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: joinedAtPossible values:
Responses
200

OK

application/json
Responseall of
get

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
200

OK

application/json
get
200

OK

Delete an organization member

delete
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

userIdstringRequired

The unique ID of the User

Responses
204

Member did not exist in the organization.

205

The member was deleted from the organization.

delete

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

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
200

The member has been updated

application/json
patch
200

Update an organization member last seen at

post
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

Responses
200

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

application/json
post
200

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

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
200

The user has been added as an SSO member of the organization.

application/json
post
200

The user has been added as an SSO member of the organization.

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: descPossible values:
Responses
200

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

application/json
Responseall of
get
200

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

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
200

OK

application/json
Responseall of
get
200

OK

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-08-26T20:54:12.033Z",
      "lastSeenAt": "2025-08-26T20:54:12.033Z",
      "sso": true,
      "spaces": 1,
      "teams": 1
    }
  ]
}

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-08-26T20:54:12.033Z",
  "lastSeenAt": "2025-08-26T20:54:12.033Z",
  "sso": true,
  "spaces": 1,
  "teams": 1
}
GET /v1/orgs/{organizationId}/members HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
GET /v1/orgs/{organizationId}/members/{userId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "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-08-26T20:54:12.033Z",
  "lastSeenAt": "2025-08-26T20:54:12.033Z",
  "sso": true,
  "spaces": 1,
  "teams": 1
}
DELETE /v1/orgs/{organizationId}/members/{userId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
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"
}
POST /v1/orgs/{organizationId}/ping HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "gitbookVisitorClaims": "text"
}
POST /v1/orgs/{organizationId}/members/{userId}/sso HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "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-08-26T20:54:12.033Z",
  "lastSeenAt": "2025-08-26T20:54:12.033Z",
  "sso": true,
  "spaces": 1,
  "teams": 1
}
GET /v1/orgs/{organizationId}/members/{userId}/spaces HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "permission": "admin",
      "space": {
        "object": "space",
        "id": "text",
        "title": "text",
        "emoji": "🎉",
        "visibility": "public",
        "createdAt": "2025-08-26T20:54:12.033Z",
        "updatedAt": "2025-08-26T20:54:12.033Z",
        "deletedAt": "2025-08-26T20:54:12.033Z",
        "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",
        "language": "en",
        "gitSync": {
          "repoName": "text",
          "installationProvider": "github",
          "integration": "text",
          "url": "text",
          "updatedAt": "2025-08-26T20:54:12.033Z"
        },
        "visitorAuth": {
          "backend": "custom"
        },
        "revision": "text",
        "defaultLevel": "admin",
        "comments": 1,
        "changeRequests": 1,
        "changeRequestsOpen": 1,
        "changeRequestsDraft": 1,
        "permissions": {
          "view": true,
          "access": true,
          "admin": true,
          "viewInviteLinks": true,
          "edit": true,
          "triggerGitSync": true,
          "comment": true,
          "merge": true,
          "review": true,
          "installIntegration": true
        }
      }
    }
  ]
}
GET /v1/orgs/{organizationId}/members/{userId}/teams HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "team": {
        "object": "team",
        "id": "text",
        "title": "text",
        "members": 1,
        "spaces": 1,
        "createdAt": "2025-08-26T20:54:12.033Z",
        "permissions": {
          "admin": true,
          "view": true
        }
      },
      "member": {
        "role": "owner"
      }
    }
  ]
}