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

Organizations

Manage your organizations and group your members, spaces, and resources under one collaborative structure.

Was this helpful?

LogoLogo

Resources

  • Showcase
  • Enterprise
  • Status

Company

  • Careers
  • Blog
  • Community

Policies

  • Subprocessors
  • Terms of Service
CtrlK

Was this helpful?

The Organizations API provides a robust way to handle the administrative structure of your GitBook workspace. By creating and configuring organizations, you can group multiple users, spaces, and collections, simplifying your permission management and fostering efficient collaboration for teams of any size.

  • The Organization object
  • GETGet the list of organizations for the currently authenticated user
  • GETGet an organization by its ID
  • PATCHUpdate an organization
  • DELETEDeletes an organization invite.
  • GETSearch content in an organization
  • GETGet all organizations by email domain

The Organization object

Attributes
objectstring · enumRequired

Type of Object, always equals to "organization"

Possible values:
idstringRequired

Unique identifier for the organization

titlestring · min: 2 · max: 255Required

Name of the organization

createdAtstring · date-timeRequired
emailDomainsstring[]Required
hostnamestring · min: 3 · max: 32Optional

Default hostname for the organization's public content, e.g. .gitbook.io

typestring · enumRequiredPossible values:
useCasestring · enumOptionalPossible values:
communityTypestring · enumOptionalPossible values:
defaultRoleone 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:
defaultContentone ofOptional

The default content for the organization

ssobooleanOptional

Whether SSO is enforced organization-wide

aibooleanOptional

If true, the organization is configured to use all our AI features.

inviteLinksbooleanRequired

If true, invite links are enabled for this organization.

planstring · enumRequired

Name of the product

Possible values:
customHostnamestringOptional

Custom hostname linked to this organization

internal_isOnNewTrialboolean · enumOptionalDeprecated

Deprecated. Always true. All organizations are on new trials.

Possible values:

The Organization object

Get the list of organizations for the currently authenticated user

get
Authorizations
Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

Responses
200

OK

application/json
Responseall of
get
200

OK

Get an organization by its ID

get
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

Responses
200

OK

application/json
404

No matching organization found for given id

application/json
get

Update an organization

patch
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

Body
titlestring · min: 2 · max: 255Optional

Name of the organization

emailDomainsstring[]Optional
hostnamestring · min: 3 · max: 32Optional

Default hostname for the organization's public content, e.g. .gitbook.io

defaultRoleone 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:
defaultContentone ofOptional
or
string · enum | nullableOptionalPossible values:
logoone ofOptional
string · uri · max: 2048Optional
or
string · enum | nullableOptionalPossible values:
ssobooleanOptional
aibooleanOptional
inviteLinksbooleanOptional
Responses
200

The organization has been updated

application/json
400

Invalid default content space or collection provided

application/json
patch

Deletes an organization invite.

delete
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

inviteIdstringRequired

The unique id of the invite

Responses
204

Organization invite did not exist

205

The organization invite has been deleted

delete

No content

Search content in an organization

get
Authorizations
Path parameters
organizationIdstringRequired

The unique id of the organization

Query parameters
querystring · max: 512Required
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

Responses
200

OK

application/json
Responseall of
get
200

OK

Get all organizations by email domain

get
Authorizations
Path parameters
emailDomainstringRequired

Email domain

Responses
200

OK

application/json
get
200

OK

The organization has been updated

{
  "object": "organization",
  "id": "text",
  "title": "text",
  "createdAt": "2025-08-26T20:44:16.148Z",
  "emailDomains": [
    "text"
  ],
  "hostname": "text",
  "type": "business",
  "useCase": "internalDocs",
  "communityType": "nonProfit",
  "defaultRole": "admin",
  "defaultContent": {
    "type": "site",
    "site": "text"
  },
  "sso": true,
  "ai": true,
  "inviteLinks": true,
  "plan": "free_2024",
  "billing": {
    "interval": "monthly",
    "endDate": "2025-08-26T20:44:16.148Z",
    "hasPaymentFailed": true,
    "isScheduledToCancel": true,
    "pricing": {
      "members": {
        "plus_2024": {
          "monthly": 1,
          "yearly": 1
        },
        "pro_2024": {
          "monthly": 1,
          "yearly": 1
        }
      },
      "sites": {
        "premium": {
          "monthly": 1,
          "yearly": 1
        },
        "ultimate": {
          "monthly": 1,
          "yearly": 1
        }
      }
    },
    "usageAddons": {
      "ANY_ADDITIONAL_PROPERTY": {
        "enabled": true
      }
    }
  },
  "urls": {
    "location": "https://example.com",
    "app": "https://example.com",
    "logo": "https://example.com"
  },
  "trial": {
    "status": "notapplicable",
    "endDate": "2025-08-26T20:44:16.148Z",
    "decision": "downgrade"
  },
  "customHostname": "text",
  "blocked": {
    "reason": "security"
  },
  "internal_billingMigration": {
    "deadline": "2025-08-26T20:44:16.148Z",
    "discountPercent": 1,
    "discountEndDate": "2025-08-26T20:44:16.148Z"
  },
  "permissions": {
    "view": true,
    "admin": true,
    "ownTeam": true,
    "createContent": true,
    "createOpenAPISpec": true,
    "ingestConversations": true,
    "viewBilling": true,
    "listMembers": true,
    "listTeams": true,
    "listIntegrations": true,
    "listInstallations": true,
    "installIntegration": true
  }
}
{
  "object": "organization",
  "id": "text",
  "title": "text",
  "createdAt": "2025-08-26T20:44:16.148Z",
  "emailDomains": [
    "text"
  ],
  "hostname": "text",
  "type": "business",
  "useCase": "internalDocs",
  "communityType": "nonProfit",
  "defaultRole": "admin",
  "defaultContent": {
    "type": "site",
    "site": "text"
  },
  "sso": true,
  "ai": true,
  "inviteLinks": true,
  "plan": "free_2024",
  "billing": {
    "interval": "monthly",
    "endDate": "2025-08-26T20:44:16.148Z",
    "hasPaymentFailed": true,
    "isScheduledToCancel": true,
    "pricing": {
      "members": {
        "plus_2024": {
          "monthly": 1,
          "yearly": 1
        },
        "pro_2024": {
          "monthly": 1,
          "yearly": 1
        }
      },
      "sites": {
        "premium": {
          "monthly": 1,
          "yearly": 1
        },
        "ultimate": {
          "monthly": 1,
          "yearly": 1
        }
      }
    },
    "usageAddons": {
      "ANY_ADDITIONAL_PROPERTY": {
        "enabled": true
      }
    }
  },
  "urls": {
    "location": "https://example.com",
    "app": "https://example.com",
    "logo": "https://example.com"
  },
  "trial": {
    "status": "notapplicable",
    "endDate": "2025-08-26T20:44:16.148Z",
    "decision": "downgrade"
  },
  "customHostname": "text",
  "blocked": {
    "reason": "security"
  },
  "internal_billingMigration": {
    "deadline": "2025-08-26T20:44:16.148Z",
    "discountPercent": 1,
    "discountEndDate": "2025-08-26T20:44:16.148Z"
  },
  "permissions": {
    "view": true,
    "admin": true,
    "ownTeam": true,
    "createContent": true,
    "createOpenAPISpec": true,
    "ingestConversations": true,
    "viewBilling": true,
    "listMembers": true,
    "listTeams": true,
    "listIntegrations": true,
    "listInstallations": true,
    "installIntegration": true
  }
}
GET /v1/orgs HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "object": "organization",
      "id": "text",
      "title": "text",
      "createdAt": "2025-08-26T20:44:16.148Z",
      "emailDomains": [
        "text"
      ],
      "hostname": "text",
      "type": "business",
      "useCase": "internalDocs",
      "communityType": "nonProfit",
      "defaultRole": "admin",
      "defaultContent": {
        "type": "site",
        "site": "text"
      },
      "sso": true,
      "ai": true,
      "inviteLinks": true,
      "plan": "free_2024",
      "billing": {
        "interval": "monthly",
        "endDate": "2025-08-26T20:44:16.148Z",
        "hasPaymentFailed": true,
        "isScheduledToCancel": true,
        "pricing": {
          "members": {
            "plus_2024": {
              "monthly": 1,
              "yearly": 1
            },
            "pro_2024": {
              "monthly": 1,
              "yearly": 1
            }
          },
          "sites": {
            "premium": {
              "monthly": 1,
              "yearly": 1
            },
            "ultimate": {
              "monthly": 1,
              "yearly": 1
            }
          }
        },
        "usageAddons": {
          "ANY_ADDITIONAL_PROPERTY": {
            "enabled": true
          }
        }
      },
      "urls": {
        "location": "https://example.com",
        "app": "https://example.com",
        "logo": "https://example.com"
      },
      "trial": {
        "status": "notapplicable",
        "endDate": "2025-08-26T20:44:16.148Z",
        "decision": "downgrade"
      },
      "customHostname": "text",
      "blocked": {
        "reason": "security"
      },
      "internal_billingMigration": {
        "deadline": "2025-08-26T20:44:16.148Z",
        "discountPercent": 1,
        "discountEndDate": "2025-08-26T20:44:16.148Z"
      },
      "permissions": {
        "view": true,
        "admin": true,
        "ownTeam": true,
        "createContent": true,
        "createOpenAPISpec": true,
        "ingestConversations": true,
        "viewBilling": true,
        "listMembers": true,
        "listTeams": true,
        "listIntegrations": true,
        "listInstallations": true,
        "installIntegration": true
      }
    }
  ]
}
GET /v1/orgs/{organizationId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "organization",
  "id": "text",
  "title": "text",
  "createdAt": "2025-08-26T20:44:16.148Z",
  "emailDomains": [
    "text"
  ],
  "hostname": "text",
  "type": "business",
  "useCase": "internalDocs",
  "communityType": "nonProfit",
  "defaultRole": "admin",
  "defaultContent": {
    "type": "site",
    "site": "text"
  },
  "sso": true,
  "ai": true,
  "inviteLinks": true,
  "plan": "free_2024",
  "billing": {
    "interval": "monthly",
    "endDate": "2025-08-26T20:44:16.148Z",
    "hasPaymentFailed": true,
    "isScheduledToCancel": true,
    "pricing": {
      "members": {
        "plus_2024": {
          "monthly": 1,
          "yearly": 1
        },
        "pro_2024": {
          "monthly": 1,
          "yearly": 1
        }
      },
      "sites": {
        "premium": {
          "monthly": 1,
          "yearly": 1
        },
        "ultimate": {
          "monthly": 1,
          "yearly": 1
        }
      }
    },
    "usageAddons": {
      "ANY_ADDITIONAL_PROPERTY": {
        "enabled": true
      }
    }
  },
  "urls": {
    "location": "https://example.com",
    "app": "https://example.com",
    "logo": "https://example.com"
  },
  "trial": {
    "status": "notapplicable",
    "endDate": "2025-08-26T20:44:16.148Z",
    "decision": "downgrade"
  },
  "customHostname": "text",
  "blocked": {
    "reason": "security"
  },
  "internal_billingMigration": {
    "deadline": "2025-08-26T20:44:16.148Z",
    "discountPercent": 1,
    "discountEndDate": "2025-08-26T20:44:16.148Z"
  },
  "permissions": {
    "view": true,
    "admin": true,
    "ownTeam": true,
    "createContent": true,
    "createOpenAPISpec": true,
    "ingestConversations": true,
    "viewBilling": true,
    "listMembers": true,
    "listTeams": true,
    "listIntegrations": true,
    "listInstallations": true,
    "installIntegration": true
  }
}
PATCH /v1/orgs/{organizationId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 196

{
  "title": "text",
  "emailDomains": [
    "text"
  ],
  "hostname": "text",
  "defaultRole": "admin",
  "defaultContent": {
    "type": "site",
    "site": "text"
  },
  "logo": "https://example.com",
  "sso": true,
  "ai": true,
  "inviteLinks": true
}
DELETE /v1/orgs/{organizationId}/link-invites/{inviteId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
GET /v1/orgs/{organizationId}/search HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "id": "text",
      "title": "text",
      "pages": [
        {
          "id": "text",
          "title": "text",
          "path": "text",
          "sections": [
            {
              "id": "text",
              "title": "text",
              "path": "text",
              "body": "text",
              "urls": {
                "app": "https://example.com"
              }
            }
          ],
          "urls": {
            "app": "https://example.com"
          }
        }
      ]
    }
  ]
}
GET /v1/email-domains/{emailDomain}/orgs HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "organizations": [
    {
      "object": "organization",
      "id": "text",
      "title": "text",
      "createdAt": "2025-08-26T20:44:16.148Z",
      "emailDomains": [
        "text"
      ],
      "hostname": "text",
      "type": "business",
      "useCase": "internalDocs",
      "communityType": "nonProfit",
      "defaultRole": "admin",
      "defaultContent": {
        "type": "site",
        "site": "text"
      },
      "sso": true,
      "ai": true,
      "inviteLinks": true,
      "plan": "free_2024",
      "billing": {
        "interval": "monthly",
        "endDate": "2025-08-26T20:44:16.148Z",
        "hasPaymentFailed": true,
        "isScheduledToCancel": true,
        "pricing": {
          "members": {
            "plus_2024": {
              "monthly": 1,
              "yearly": 1
            },
            "pro_2024": {
              "monthly": 1,
              "yearly": 1
            }
          },
          "sites": {
            "premium": {
              "monthly": 1,
              "yearly": 1
            },
            "ultimate": {
              "monthly": 1,
              "yearly": 1
            }
          }
        },
        "usageAddons": {
          "ANY_ADDITIONAL_PROPERTY": {
            "enabled": true
          }
        }
      },
      "urls": {
        "location": "https://example.com",
        "app": "https://example.com",
        "logo": "https://example.com"
      },
      "trial": {
        "status": "notapplicable",
        "endDate": "2025-08-26T20:44:16.148Z",
        "decision": "downgrade"
      },
      "customHostname": "text",
      "blocked": {
        "reason": "security"
      },
      "internal_billingMigration": {
        "deadline": "2025-08-26T20:44:16.148Z",
        "discountPercent": 1,
        "discountEndDate": "2025-08-26T20:44:16.148Z"
      },
      "permissions": {
        "view": true,
        "admin": true,
        "ownTeam": true,
        "createContent": true,
        "createOpenAPISpec": true,
        "ingestConversations": true,
        "viewBilling": true,
        "listMembers": true,
        "listTeams": true,
        "listIntegrations": true,
        "listInstallations": true,
        "installIntegration": true
      }
    }
  ]
}