Organizations

An organization in GitBook is the entity of a place that users, spaces, and collections belong to.

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
/orgs
GET /v1/orgs HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "object": "organization",
      "id": "text",
      "title": "text",
      "createdAt": "2025-11-06T14:53:46.887Z",
      "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-11-06T14:53:46.887Z",
        "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
          }
        }
      },
      "mergeRules": {
        "type": "rules",
        "rules": [
          {
            "rule": "require_specific_reviewers",
            "users": [
              "text"
            ]
          }
        ]
      },
      "urls": {
        "location": "https://example.com",
        "app": "https://example.com",
        "logo": "https://example.com"
      },
      "trial": {
        "status": "notapplicable",
        "count": 1,
        "endDate": "2025-11-06T14:53:46.887Z",
        "decision": "downgrade"
      },
      "customHostname": "text",
      "blocked": {
        "source": "backoffice",
        "reason": "text"
      },
      "internal_billingMigration": {
        "deadline": "2025-11-06T14:53:46.887Z",
        "discountPercent": 1,
        "discountEndDate": "2025-11-06T14:53:46.887Z"
      },
      "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
      }
    }
  ]
}

List all collections

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

nestedbooleanOptional

If true, all nested collections will be listed

Default: true
Responses
200

OK

application/json
Responseall of
get
/orgs/{organizationId}/collections
GET /v1/orgs/{organizationId}/collections HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "object": "collection",
      "id": "text",
      "title": "text",
      "description": "text",
      "organization": "text",
      "parent": "text",
      "defaultLevel": "admin",
      "urls": {
        "location": "https://example.com",
        "app": "https://example.com"
      },
      "permissions": {
        "view": true,
        "admin": true,
        "viewInviteLinks": true,
        "create": true
      }
    }
  ]
}

List all spaces

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

Responses
200

OK

application/json
Responseall of
get
/orgs/{organizationId}/spaces
GET /v1/orgs/{organizationId}/spaces HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "object": "space",
      "id": "text",
      "title": "text",
      "emoji": "🎉",
      "visibility": "public",
      "createdAt": "2025-11-06T14:53:46.887Z",
      "updatedAt": "2025-11-06T14:53:46.887Z",
      "deletedAt": "2025-11-06T14:53:46.887Z",
      "editMode": "live",
      "mergeRules": {
        "type": "inherit"
      },
      "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-11-06T14:53:46.887Z"
      },
      "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
      }
    }
  ]
}

Last updated

Was this helpful?