For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update an organization

Available in MCP
patch
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Body
titlestring · min: 2 · max: 255Optional

Name of the organization

Pattern: \S.*\S
emailDomainsstring[]Optional
hostnamestring · min: 3 · max: 32Optional

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

defaultRolestring · enum · nullableOptional

The role of a member in an organization, null for guests

Possible values:
defaultContentone of · nullableOptional

The default content for the organization

logostring · uri · max: 2048 · nullableOptional
ssobooleanOptional
aibooleanOptional
inviteLinksbooleanOptional
mergeRulesone ofOptional
or
Responses
200

The organization has been updated

application/json
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

Pattern: \S.*\S
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:
defaultRolestring · enum · nullableOptional

The role of a member in an organization, null for guests

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.

auditLogsbooleanOptional

Whether audit logs can currently be accessed for this organization.

planstring · enumRequired

Name of the product

Possible values:
mergeRulesone ofRequired
or
customHostnamestringOptional

Custom hostname linked to this organization

patch/orgs/{organizationId}
PATCH /v1/orgs/{organizationId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 291

{
  "title": "text",
  "emailDomains": [
    "text"
  ],
  "hostname": "text",
  "defaultRole": "admin",
  "defaultContent": {
    "type": "site",
    "site": "text"
  },
  "logo": "https://example.com",
  "sso": true,
  "ai": true,
  "inviteLinks": true,
  "mergeRules": {
    "type": "rules",
    "rules": [
      {
        "rule": "require_specific_reviewers",
        "users": [
          "text"
        ]
      }
    ]
  }
}
{
  "object": "organization",
  "id": "text",
  "title": "text",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "emailDomains": [
    "text"
  ],
  "hostname": "text",
  "type": "business",
  "useCase": "internalDocs",
  "communityType": "nonProfit",
  "defaultRole": "admin",
  "defaultContent": {
    "type": "site",
    "site": "text"
  },
  "sso": true,
  "ai": true,
  "inviteLinks": true,
  "auditLogs": true,
  "plan": "free_2024",
  "billing": {
    "interval": "monthly",
    "endDate": "2026-01-01T00:00:00.000Z",
    "hasPaymentFailed": true,
    "canCheckout": 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
      }
    },
    "minUsers": 1,
    "maxUsers": 1,
    "minPremiumSites": 1,
    "maxPremiumSites": 1,
    "minUltimateSites": 1,
    "maxUltimateSites": 1,
    "paidMembers": 1,
    "paidPremiumSites": 1,
    "paidUltimateSites": 1,
    "canChangeInterval": true,
    "canUseSAML": true,
    "creditsBundle": "none",
    "aiCreditAlertThreshold": 1
  },
  "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": "2026-01-01T00:00:00.000Z",
    "decision": "downgrade"
  },
  "customHostname": "text",
  "blocked": {
    "source": "backoffice",
    "reason": "text"
  },
  "internal_billingMigration": {
    "deadline": "2026-01-01T00:00:00.000Z",
    "discountPercent": 1,
    "discountEndDate": "2026-01-01T00:00:00.000Z"
  },
  "permissions": {
    "view": true,
    "access": true,
    "admin": true,
    "ownTeam": true,
    "createContent": true,
    "createOpenAPISpec": true,
    "viewBilling": true,
    "listMembers": true,
    "listTeams": true,
    "listIntegrations": true,
    "listInstallations": true,
    "installIntegration": true
  }
}

Last updated

Was this helpful?

Powered by GitBook