# Integrations

Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.

## GET /integrations

> List all public integrations

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"listPage":{"name":"page","in":"query","description":"Identifier of the page results to fetch.","schema":{"type":"string"}},"listLimit":{"name":"limit","in":"query","description":"The number of results per page","schema":{"type":"number","minimum":0,"maximum":1000}},"integrationSearchQuery":{"name":"search","in":"query","description":"A search string to filter integrations by name\n","schema":{"type":"string"}},"integrationSearchCategory":{"name":"category","in":"query","description":"Filter the integrations by category","schema":{"$ref":"#/components/schemas/IntegrationCategory"}},"integrationSearchBlockDomain":{"name":"blockDomain","in":"query","description":"Filter the integrations by block's domains","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"integrationSearchBlocks":{"name":"blocks","in":"query","description":"If true, returns only integrations with blocks. If false, returns only integrations without blocks.","schema":{"type":"boolean"}},"integrationSearchContentSources":{"name":"contentSources","in":"query","description":"If true, returns only integrations with contentSources. If false, returns only integrations without contentSources.","schema":{"type":"boolean"}},"integrationSearchOwner":{"name":"owner","in":"query","description":"If defined, only list integrations owned by the given organization.","schema":{"type":"string"}},"integrationSearchScope":{"name":"scope","in":"query","description":"Filter the integrations by scope","schema":{"$ref":"#/components/schemas/IntegrationScope"}},"integrationSearchTarget":{"name":"target","in":"query","description":"Filter the integrations by target","schema":{"$ref":"#/components/schemas/IntegrationTarget"}}},"schemas":{"IntegrationCategory":{"type":"string","enum":["analytics","collaboration","content","gitsync","marketing","visitor-auth","other"]},"IntegrationScope":{"type":"string","enum":["space:content:read","space:content:write","space:metadata:read","space:metadata:write","space:git:sync","page:feedback:read","site:metadata:read","site:views:read","site:script:inject","site:script:cookies","site:visitor:auth","site:adaptive:read","site:adaptive:write","conversations:ingest","openapi:read","openapi:write"]},"IntegrationTarget":{"type":"string","description":"The target on which the integration can operate and needs to be configured for","enum":["all","site","space","organization"]},"List":{"type":"object","properties":{"next":{"type":"object","properties":{"page":{"type":"string","description":"Unique identifier to query the next results page"}},"required":["page"]},"count":{"type":"number","description":"Total count of objects in the list"}}},"Integration":{"type":"object","properties":{"object":{"type":"string","enum":["integration"]},"name":{"type":"string","description":"Unique named identifier for the integration"},"version":{"type":"number","description":"Version of the integration"},"title":{"$ref":"#/components/schemas/IntegrationTitle"},"description":{"$ref":"#/components/schemas/IntegrationDescription"},"summary":{"$ref":"#/components/schemas/IntegrationSummary"},"previewImages":{"type":"array","description":"URLs of images to showcase the integration","maxItems":3,"items":{"type":"string"}},"target":{"$ref":"#/components/schemas/IntegrationTarget"},"verified":{"type":"boolean","description":"If true, the integration has been verified by the GitBook team"},"visibility":{"$ref":"#/components/schemas/IntegrationVisibility"},"scopes":{"$ref":"#/components/schemas/IntegrationScopes"},"categories":{"$ref":"#/components/schemas/IntegrationCategories"},"blocks":{"$ref":"#/components/schemas/IntegrationBlocks"},"contentSources":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationContentSource"}},"configurations":{"$ref":"#/components/schemas/IntegrationConfigurations"},"externalLinks":{"$ref":"#/components/schemas/IntegrationExternalLinks"},"owner":{"$ref":"#/components/schemas/Organization"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the integration in the API","format":"uri"},"icon":{"type":"string","description":"URL of the icon associated to the integration","format":"uri"},"app":{"type":"string","description":"URL of the integration in the application","format":"uri"},"assets":{"type":"string","description":"URL of the integration's assets.","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration","format":"uri"}},"required":["location","app","assets","publicEndpoint"]},"permissions":{"type":"object","description":"The set of permissions for the integration","properties":{"admin":{"type":"boolean"}},"required":["admin"]},"contentSecurityPolicy":{"$ref":"#/components/schemas/IntegrationContentSecurityPolicy"}},"required":["object","name","version","title","scopes","categories","visibility","target","verified","previewImages","externalLinks","owner","permissions","urls"]},"IntegrationTitle":{"type":"string","description":"Title of the integration","minLength":2,"maxLength":30},"IntegrationDescription":{"type":"string","description":"Description of the integration","maxLength":100},"IntegrationSummary":{"type":"string","description":"Long form markdown summary of the integration","maxLength":2048},"IntegrationVisibility":{"type":"string","enum":["public","private","unlisted"]},"IntegrationScopes":{"type":"array","description":"Permissions that should be granted to the integration","items":{"$ref":"#/components/schemas/IntegrationScope"}},"IntegrationCategories":{"type":"array","description":"Categories for which the integration is listed in the marketplace","items":{"$ref":"#/components/schemas/IntegrationCategory"}},"IntegrationBlocks":{"type":"array","description":"Custom blocks defined by this integration.","items":{"$ref":"#/components/schemas/IntegrationBlock"}},"IntegrationBlock":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID in the integration for the block. It also represents the UI component used."},"title":{"type":"string","description":"Short descriptive title for the block.","minLength":2,"maxLength":40},"description":{"type":"string","description":"Long descriptive text for the block.","minLength":0,"maxLength":150},"icon":{"type":"string","description":"URL of the icon to represent this block."},"urlUnfurl":{"type":"array","description":"URLs patterns to convert as this block.","items":{"type":"string"}},"markdown":{"$ref":"#/components/schemas/IntegrationBlockMarkdown"}},"required":["id","title"]},"IntegrationBlockMarkdown":{"oneOf":[{"type":"object","description":"Format the custom block as a codeblock","properties":{"codeblock":{"description":"Code block syntax to use to identify the block.","type":"string"},"body":{"description":"Key of the property to use as body of the codeblock.","type":"string"}},"required":["codeblock","body"]}]},"IntegrationContentSource":{"type":"object","description":"Definition of a content source provided by the integration.","properties":{"id":{"type":"string","description":"Unique ID in the integration for the source."},"title":{"type":"string","description":"Short descriptive title for the source.","minLength":2,"maxLength":40},"description":{"type":"string","description":"Long descriptive text for the source.","minLength":0,"maxLength":150},"icon":{"type":"string","description":"URL of the icon to represent this source."},"configuration":{"$ref":"#/components/schemas/IntegrationConfigurationComponent"}},"required":["id","title","configuration"]},"IntegrationConfigurationComponent":{"type":"object","description":"ContentKit component for configuration","properties":{"componentId":{"type":"string","description":"ID of the ContentKit component defined in the integration"}},"required":["componentId"]},"IntegrationConfigurations":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/IntegrationConfiguration"},"space":{"$ref":"#/components/schemas/IntegrationConfiguration"},"site":{"$ref":"#/components/schemas/IntegrationConfiguration"}}},"IntegrationConfiguration":{"oneOf":[{"$ref":"#/components/schemas/IntegrationConfigurationSchema"},{"$ref":"#/components/schemas/IntegrationConfigurationComponent"}]},"IntegrationConfigurationSchema":{"type":"object","description":"Schema for a configuration","properties":{"properties":{"type":"object","additionalProperties":{"allOf":[{"type":"object","properties":{"title":{"$ref":"#/components/schemas/IntegrationPropertyTitle"},"description":{"type":"string","maxLength":100}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["string"]},"default":{"type":"string"},"completion_url":{"description":"If specified, this URL will be called to fetch suggestions for auto-completing the property.","type":"string"},"enum":{"type":"array","description":"If specified, only values from this array are allowed as inputs.","items":{"type":"string"}}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"default":{"type":"number"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["boolean"]},"default":{"type":"boolean"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["button"]},"callback_url":{"type":"string"},"button_text":{"type":"string"}},"required":["type","callback_url","button_text"]}]}]}},"required":{"type":"array","uniqueItems":true,"items":{"type":"string"}}},"required":["properties"]},"IntegrationPropertyTitle":{"type":"string","description":"Property title for an integration configuration property","minLength":2,"maxLength":50},"IntegrationExternalLinks":{"type":"array","description":"External urls configured by the developer of the integration","maxItems":5,"items":{"type":"object","properties":{"url":{"$ref":"#/components/schemas/URL"},"label":{"type":"string"}},"required":["url","label"]}},"URL":{"type":"string","format":"uri","maxLength":2048},"Organization":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"organization\"","enum":["organization"]},"id":{"type":"string","description":"Unique identifier for the organization"},"title":{"$ref":"#/components/schemas/OrganizationTitle"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"emailDomains":{"$ref":"#/components/schemas/OrganizationEmailDomains"},"hostname":{"$ref":"#/components/schemas/OrganizationHostname"},"type":{"$ref":"#/components/schemas/OrganizationType"},"useCase":{"$ref":"#/components/schemas/OrganizationUseCase"},"communityType":{"$ref":"#/components/schemas/OrganizationCommunityType"},"defaultRole":{"$ref":"#/components/schemas/MemberRoleOrGuest"},"defaultContent":{"$ref":"#/components/schemas/OrganizationDefaultContent"},"sso":{"description":"Whether SSO is enforced organization-wide","type":"boolean"},"ai":{"description":"If true, the organization is configured to use all our AI features.","type":"boolean"},"inviteLinks":{"description":"If true, invite links are enabled for this organization.","type":"boolean"},"plan":{"$ref":"#/components/schemas/BillingProduct"},"billing":{"description":"Billing details, only available for org members.","$ref":"#/components/schemas/OrganizationBilling"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the organization in the API","format":"uri"},"app":{"type":"string","description":"URL of the organization in the application","format":"uri"},"logo":{"description":"URL of the logo of this organization, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"trial":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/BillingTrialStatus"},"count":{"type":"integer","description":"Number of trials the organization has consumed."},"endDate":{"description":"The trial's end date, if the organization has or had a trial.","$ref":"#/components/schemas/Timestamp"},"decision":{"type":"string","description":"The decision taken by the user at the end of the trial","enum":["downgrade"]}},"required":["status","count"]},"customHostname":{"description":"Custom hostname linked to this organization","type":"string"},"blocked":{"type":"object","description":"If the organization is blocked, information about the block will appear here","properties":{"source":{"$ref":"#/components/schemas/BlockSource"},"reason":{"$ref":"#/components/schemas/BlockReason"}},"required":["reason"]},"internal_billingMigration":{"type":"object","properties":{"deadline":{"description":"When we will upgrade the organization onto new pricing, if they haven't already.","$ref":"#/components/schemas/Timestamp"},"discountPercent":{"description":"A discount the organization may have received thanks to migrating early.","type":"number"},"discountEndDate":{"description":"The expiration date of the discount, after wich regular pricing resumes.","$ref":"#/components/schemas/Timestamp"}}},"permissions":{"type":"object","description":"The set of permissions for the organization","properties":{"view":{"type":"boolean","description":"Can the user view the organization."},"access":{"type":"boolean","description":"Can the user view the organization in the application."},"admin":{"type":"boolean","description":"Can the user manage the title, members, etc."},"ownTeam":{"type":"boolean","description":"Is the user a team owner."},"createContent":{"type":"boolean","description":"Can the user create new spaces/collections in the organization."},"createOpenAPISpec":{"type":"boolean","description":"Can the user create new OpenAPI specifications."},"viewBilling":{"type":"boolean","description":"Can the user view the billing details of the organization."},"listMembers":{"type":"boolean","description":"Can the user list the members of the organization."},"listTeams":{"type":"boolean","description":"Can the user list the teams in the organization."},"listIntegrations":{"type":"boolean","description":"Can the user list the integrations in the organization."},"listInstallations":{"type":"boolean","description":"Can the user list the integration installations in the organization."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the organization."}},"required":["view","access","admin","ownTeam","createContent","createOpenAPISpec","viewBilling","listMembers","listTeams","listIntegrations","listInstallations","installIntegration"]}},"required":["object","id","plan","title","createdAt","inviteLinks","type","emailDomains","mergeRules","urls","trial","permissions"]},"OrganizationTitle":{"type":"string","description":"Name of the organization","minLength":2,"maxLength":255,"pattern":"\\S.*\\S"},"Timestamp":{"type":"string","format":"date-time"},"OrganizationEmailDomains":{"type":"array","items":{"type":"string"}},"OrganizationHostname":{"type":"string","description":"Default hostname for the organization's public content, e.g. <org-hostname>.gitbook.io","minLength":3,"maxLength":32},"OrganizationType":{"type":"string","enum":["business","community"]},"OrganizationUseCase":{"type":"string","enum":["internalDocs","docsSite","audienceControlledSite","productDocs","teamKnowledgeBase","designSystem","openSourceDocs","notes","other"]},"OrganizationCommunityType":{"type":"string","enum":["nonProfit","openSource","education"]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"OrganizationDefaultContent":{"description":"The default content for the organization","oneOf":[{"$ref":"#/components/schemas/SitePointer"}]},"SitePointer":{"type":"object","properties":{"type":{"type":"string","enum":["site"]},"site":{"type":"string","description":"Unique identifier for the site"}},"required":["type","site"]},"BillingProduct":{"type":"string","description":"Name of the product","enum":["free_2024","plus_2024","pro_2024","enterprise_2024","community_2024","free","plus","pro","internal"]},"OrganizationBilling":{"type":"object","properties":{"interval":{"$ref":"#/components/schemas/BillingInterval"},"endDate":{"oneOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"hasPaymentFailed":{"description":"If true, we were unable to collect the last payment","type":"boolean"},"canCheckout":{"description":"If true, organization can create a checkout session to subscribe/update billing. \nIf false, organization must resolve other billing issues before a checkout can be done.\n","type":"boolean"},"isScheduledToCancel":{"description":"If true, the billing is set to cancel at the end of its current period","type":"boolean"},"pricing":{"description":"Pricing information for the organization","$ref":"#/components/schemas/OrganizationPricing"},"usageAddons":{"description":"Configuration for the usage-based addons","type":"object","additionalProperties":{"$ref":"#/components/schemas/BillingMeterAddon"}},"minUsers":{"description":"The minimum number of members allowed for this organization.","type":"number"},"maxUsers":{"description":"The maximum number of members allowed for this organization","type":"number"},"minPremiumSites":{"description":"The minimum number of premium sites allowed for this organization.","type":"number"},"maxPremiumSites":{"description":"The maximum number of premium sites allowed for this organization.","type":"number"},"minUltimateSites":{"description":"The minimum number of ultimate sites allowed for this organization.","type":"number"},"maxUltimateSites":{"description":"The maximum number of ultimate sites allowed for this organization.","type":"number"},"paidMembers":{"description":"The number of paid members on the current subscription.","type":"number"},"paidPremiumSites":{"description":"The number of paid premium sites on the current subscription.","type":"number"},"paidUltimateSites":{"description":"The number of paid ultimate sites on the current subscription.","type":"number"}},"required":["interval","endDate","hasPaymentFailed","canCheckout","isScheduledToCancel","pricing","usageAddons"]},"BillingInterval":{"type":"string","description":"Interval for a billing subscription","enum":["monthly","yearly"]},"OrganizationPricing":{"type":"object","description":"Pricing information for an organization","properties":{"members":{"type":"object","description":"Pricing for members (organization plan)","properties":{"plus_2024":{"$ref":"#/components/schemas/OrganizationPricePair"},"pro_2024":{"$ref":"#/components/schemas/OrganizationPricePair"}},"required":["plus_2024","pro_2024"],"additionalProperties":false},"sites":{"type":"object","description":"Pricing for site types (site plans)","properties":{"premium":{"$ref":"#/components/schemas/OrganizationPricePair"},"ultimate":{"$ref":"#/components/schemas/OrganizationPricePair"}},"required":["premium","ultimate"],"additionalProperties":false}},"required":["members","sites"]},"OrganizationPricePair":{"type":"object","description":"Pricing pair for monthly and yearly intervals","properties":{"monthly":{"type":"number","description":"Monthly price in USD","minimum":0},"yearly":{"type":"number","description":"Yearly price in USD (per month)","minimum":0}},"required":["monthly","yearly"]},"BillingMeterAddon":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"BillingTrialStatus":{"type":"string","description":"- notapplicable, no trial can be started for this organization. - none, no trial has been started yet. - active, trial is active. - ended, the trial has ended and the user has choosen to stay on the free plan or has upgraded to a paid plan. - expired, the trial has ended but the user hasn't deciced yet what to do.\n","enum":["notapplicable","none","active","ended","expired"]},"BlockSource":{"type":"string","description":"Source for an organization block","enum":["backoffice","external","internal"]},"BlockReason":{"type":"string","description":"A short description giving context on the reason for the block.","minLength":1,"maxLength":255},"IntegrationContentSecurityPolicy":{"description":"Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as \nheaders when processing the script fetch event and the blocks fetch events.\n","oneOf":[{"type":"string"},{"type":"object","properties":{"base-uri":{"type":"string"},"block-all-mixed-content":{"type":"string"},"child-src":{"type":"string"},"connect-src":{"type":"string"},"default-src":{"type":"string"},"font-src":{"type":"string"},"form-action":{"type":"string"},"frame-ancestors":{"type":"string"},"frame-src":{"type":"string"},"img-src":{"type":"string"},"manifest-src":{"type":"string"},"media-src":{"type":"string"},"navigate-to":{"type":"string"},"object-src":{"type":"string"},"plugin-types":{"type":"string"},"prefetch-src":{"type":"string"},"referrer":{"type":"string"},"report-to":{"type":"string"},"report-uri":{"type":"string"},"require-sri-for":{"type":"string"},"require-trusted-types-for":{"type":"string"},"sandbox":{"type":"string"},"script-src":{"type":"string"},"script-src-attr":{"type":"string"},"script-src-elem":{"type":"string"},"style-src":{"type":"string"},"style-src-attr":{"type":"string"},"style-src-elem":{"type":"string"},"trusted-types":{"type":"string"},"upgrade-insecure-requests":{"type":"string"},"worker-src":{"type":"string"}}}]}}},"paths":{"/integrations":{"get":{"operationId":"listIntegrations","summary":"List all public integrations","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/listPage"},{"$ref":"#/components/parameters/listLimit"},{"$ref":"#/components/parameters/integrationSearchQuery"},{"$ref":"#/components/parameters/integrationSearchCategory"},{"$ref":"#/components/parameters/integrationSearchBlockDomain"},{"$ref":"#/components/parameters/integrationSearchBlocks"},{"$ref":"#/components/parameters/integrationSearchContentSources"},{"$ref":"#/components/parameters/integrationSearchOwner"},{"$ref":"#/components/parameters/integrationSearchScope"},{"$ref":"#/components/parameters/integrationSearchTarget"}],"responses":{"200":{"description":"Paginated list of integrations","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Integration"}}}}]}}}}}}}}}
```

## GET /integrations/{integrationName}

> Get an integration by its name

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}}},"schemas":{"Integration":{"type":"object","properties":{"object":{"type":"string","enum":["integration"]},"name":{"type":"string","description":"Unique named identifier for the integration"},"version":{"type":"number","description":"Version of the integration"},"title":{"$ref":"#/components/schemas/IntegrationTitle"},"description":{"$ref":"#/components/schemas/IntegrationDescription"},"summary":{"$ref":"#/components/schemas/IntegrationSummary"},"previewImages":{"type":"array","description":"URLs of images to showcase the integration","maxItems":3,"items":{"type":"string"}},"target":{"$ref":"#/components/schemas/IntegrationTarget"},"verified":{"type":"boolean","description":"If true, the integration has been verified by the GitBook team"},"visibility":{"$ref":"#/components/schemas/IntegrationVisibility"},"scopes":{"$ref":"#/components/schemas/IntegrationScopes"},"categories":{"$ref":"#/components/schemas/IntegrationCategories"},"blocks":{"$ref":"#/components/schemas/IntegrationBlocks"},"contentSources":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationContentSource"}},"configurations":{"$ref":"#/components/schemas/IntegrationConfigurations"},"externalLinks":{"$ref":"#/components/schemas/IntegrationExternalLinks"},"owner":{"$ref":"#/components/schemas/Organization"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the integration in the API","format":"uri"},"icon":{"type":"string","description":"URL of the icon associated to the integration","format":"uri"},"app":{"type":"string","description":"URL of the integration in the application","format":"uri"},"assets":{"type":"string","description":"URL of the integration's assets.","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration","format":"uri"}},"required":["location","app","assets","publicEndpoint"]},"permissions":{"type":"object","description":"The set of permissions for the integration","properties":{"admin":{"type":"boolean"}},"required":["admin"]},"contentSecurityPolicy":{"$ref":"#/components/schemas/IntegrationContentSecurityPolicy"}},"required":["object","name","version","title","scopes","categories","visibility","target","verified","previewImages","externalLinks","owner","permissions","urls"]},"IntegrationTitle":{"type":"string","description":"Title of the integration","minLength":2,"maxLength":30},"IntegrationDescription":{"type":"string","description":"Description of the integration","maxLength":100},"IntegrationSummary":{"type":"string","description":"Long form markdown summary of the integration","maxLength":2048},"IntegrationTarget":{"type":"string","description":"The target on which the integration can operate and needs to be configured for","enum":["all","site","space","organization"]},"IntegrationVisibility":{"type":"string","enum":["public","private","unlisted"]},"IntegrationScopes":{"type":"array","description":"Permissions that should be granted to the integration","items":{"$ref":"#/components/schemas/IntegrationScope"}},"IntegrationScope":{"type":"string","enum":["space:content:read","space:content:write","space:metadata:read","space:metadata:write","space:git:sync","page:feedback:read","site:metadata:read","site:views:read","site:script:inject","site:script:cookies","site:visitor:auth","site:adaptive:read","site:adaptive:write","conversations:ingest","openapi:read","openapi:write"]},"IntegrationCategories":{"type":"array","description":"Categories for which the integration is listed in the marketplace","items":{"$ref":"#/components/schemas/IntegrationCategory"}},"IntegrationCategory":{"type":"string","enum":["analytics","collaboration","content","gitsync","marketing","visitor-auth","other"]},"IntegrationBlocks":{"type":"array","description":"Custom blocks defined by this integration.","items":{"$ref":"#/components/schemas/IntegrationBlock"}},"IntegrationBlock":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID in the integration for the block. It also represents the UI component used."},"title":{"type":"string","description":"Short descriptive title for the block.","minLength":2,"maxLength":40},"description":{"type":"string","description":"Long descriptive text for the block.","minLength":0,"maxLength":150},"icon":{"type":"string","description":"URL of the icon to represent this block."},"urlUnfurl":{"type":"array","description":"URLs patterns to convert as this block.","items":{"type":"string"}},"markdown":{"$ref":"#/components/schemas/IntegrationBlockMarkdown"}},"required":["id","title"]},"IntegrationBlockMarkdown":{"oneOf":[{"type":"object","description":"Format the custom block as a codeblock","properties":{"codeblock":{"description":"Code block syntax to use to identify the block.","type":"string"},"body":{"description":"Key of the property to use as body of the codeblock.","type":"string"}},"required":["codeblock","body"]}]},"IntegrationContentSource":{"type":"object","description":"Definition of a content source provided by the integration.","properties":{"id":{"type":"string","description":"Unique ID in the integration for the source."},"title":{"type":"string","description":"Short descriptive title for the source.","minLength":2,"maxLength":40},"description":{"type":"string","description":"Long descriptive text for the source.","minLength":0,"maxLength":150},"icon":{"type":"string","description":"URL of the icon to represent this source."},"configuration":{"$ref":"#/components/schemas/IntegrationConfigurationComponent"}},"required":["id","title","configuration"]},"IntegrationConfigurationComponent":{"type":"object","description":"ContentKit component for configuration","properties":{"componentId":{"type":"string","description":"ID of the ContentKit component defined in the integration"}},"required":["componentId"]},"IntegrationConfigurations":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/IntegrationConfiguration"},"space":{"$ref":"#/components/schemas/IntegrationConfiguration"},"site":{"$ref":"#/components/schemas/IntegrationConfiguration"}}},"IntegrationConfiguration":{"oneOf":[{"$ref":"#/components/schemas/IntegrationConfigurationSchema"},{"$ref":"#/components/schemas/IntegrationConfigurationComponent"}]},"IntegrationConfigurationSchema":{"type":"object","description":"Schema for a configuration","properties":{"properties":{"type":"object","additionalProperties":{"allOf":[{"type":"object","properties":{"title":{"$ref":"#/components/schemas/IntegrationPropertyTitle"},"description":{"type":"string","maxLength":100}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["string"]},"default":{"type":"string"},"completion_url":{"description":"If specified, this URL will be called to fetch suggestions for auto-completing the property.","type":"string"},"enum":{"type":"array","description":"If specified, only values from this array are allowed as inputs.","items":{"type":"string"}}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"default":{"type":"number"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["boolean"]},"default":{"type":"boolean"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["button"]},"callback_url":{"type":"string"},"button_text":{"type":"string"}},"required":["type","callback_url","button_text"]}]}]}},"required":{"type":"array","uniqueItems":true,"items":{"type":"string"}}},"required":["properties"]},"IntegrationPropertyTitle":{"type":"string","description":"Property title for an integration configuration property","minLength":2,"maxLength":50},"IntegrationExternalLinks":{"type":"array","description":"External urls configured by the developer of the integration","maxItems":5,"items":{"type":"object","properties":{"url":{"$ref":"#/components/schemas/URL"},"label":{"type":"string"}},"required":["url","label"]}},"URL":{"type":"string","format":"uri","maxLength":2048},"Organization":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"organization\"","enum":["organization"]},"id":{"type":"string","description":"Unique identifier for the organization"},"title":{"$ref":"#/components/schemas/OrganizationTitle"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"emailDomains":{"$ref":"#/components/schemas/OrganizationEmailDomains"},"hostname":{"$ref":"#/components/schemas/OrganizationHostname"},"type":{"$ref":"#/components/schemas/OrganizationType"},"useCase":{"$ref":"#/components/schemas/OrganizationUseCase"},"communityType":{"$ref":"#/components/schemas/OrganizationCommunityType"},"defaultRole":{"$ref":"#/components/schemas/MemberRoleOrGuest"},"defaultContent":{"$ref":"#/components/schemas/OrganizationDefaultContent"},"sso":{"description":"Whether SSO is enforced organization-wide","type":"boolean"},"ai":{"description":"If true, the organization is configured to use all our AI features.","type":"boolean"},"inviteLinks":{"description":"If true, invite links are enabled for this organization.","type":"boolean"},"plan":{"$ref":"#/components/schemas/BillingProduct"},"billing":{"description":"Billing details, only available for org members.","$ref":"#/components/schemas/OrganizationBilling"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the organization in the API","format":"uri"},"app":{"type":"string","description":"URL of the organization in the application","format":"uri"},"logo":{"description":"URL of the logo of this organization, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"trial":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/BillingTrialStatus"},"count":{"type":"integer","description":"Number of trials the organization has consumed."},"endDate":{"description":"The trial's end date, if the organization has or had a trial.","$ref":"#/components/schemas/Timestamp"},"decision":{"type":"string","description":"The decision taken by the user at the end of the trial","enum":["downgrade"]}},"required":["status","count"]},"customHostname":{"description":"Custom hostname linked to this organization","type":"string"},"blocked":{"type":"object","description":"If the organization is blocked, information about the block will appear here","properties":{"source":{"$ref":"#/components/schemas/BlockSource"},"reason":{"$ref":"#/components/schemas/BlockReason"}},"required":["reason"]},"internal_billingMigration":{"type":"object","properties":{"deadline":{"description":"When we will upgrade the organization onto new pricing, if they haven't already.","$ref":"#/components/schemas/Timestamp"},"discountPercent":{"description":"A discount the organization may have received thanks to migrating early.","type":"number"},"discountEndDate":{"description":"The expiration date of the discount, after wich regular pricing resumes.","$ref":"#/components/schemas/Timestamp"}}},"permissions":{"type":"object","description":"The set of permissions for the organization","properties":{"view":{"type":"boolean","description":"Can the user view the organization."},"access":{"type":"boolean","description":"Can the user view the organization in the application."},"admin":{"type":"boolean","description":"Can the user manage the title, members, etc."},"ownTeam":{"type":"boolean","description":"Is the user a team owner."},"createContent":{"type":"boolean","description":"Can the user create new spaces/collections in the organization."},"createOpenAPISpec":{"type":"boolean","description":"Can the user create new OpenAPI specifications."},"viewBilling":{"type":"boolean","description":"Can the user view the billing details of the organization."},"listMembers":{"type":"boolean","description":"Can the user list the members of the organization."},"listTeams":{"type":"boolean","description":"Can the user list the teams in the organization."},"listIntegrations":{"type":"boolean","description":"Can the user list the integrations in the organization."},"listInstallations":{"type":"boolean","description":"Can the user list the integration installations in the organization."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the organization."}},"required":["view","access","admin","ownTeam","createContent","createOpenAPISpec","viewBilling","listMembers","listTeams","listIntegrations","listInstallations","installIntegration"]}},"required":["object","id","plan","title","createdAt","inviteLinks","type","emailDomains","mergeRules","urls","trial","permissions"]},"OrganizationTitle":{"type":"string","description":"Name of the organization","minLength":2,"maxLength":255,"pattern":"\\S.*\\S"},"Timestamp":{"type":"string","format":"date-time"},"OrganizationEmailDomains":{"type":"array","items":{"type":"string"}},"OrganizationHostname":{"type":"string","description":"Default hostname for the organization's public content, e.g. <org-hostname>.gitbook.io","minLength":3,"maxLength":32},"OrganizationType":{"type":"string","enum":["business","community"]},"OrganizationUseCase":{"type":"string","enum":["internalDocs","docsSite","audienceControlledSite","productDocs","teamKnowledgeBase","designSystem","openSourceDocs","notes","other"]},"OrganizationCommunityType":{"type":"string","enum":["nonProfit","openSource","education"]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"OrganizationDefaultContent":{"description":"The default content for the organization","oneOf":[{"$ref":"#/components/schemas/SitePointer"}]},"SitePointer":{"type":"object","properties":{"type":{"type":"string","enum":["site"]},"site":{"type":"string","description":"Unique identifier for the site"}},"required":["type","site"]},"BillingProduct":{"type":"string","description":"Name of the product","enum":["free_2024","plus_2024","pro_2024","enterprise_2024","community_2024","free","plus","pro","internal"]},"OrganizationBilling":{"type":"object","properties":{"interval":{"$ref":"#/components/schemas/BillingInterval"},"endDate":{"oneOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"hasPaymentFailed":{"description":"If true, we were unable to collect the last payment","type":"boolean"},"canCheckout":{"description":"If true, organization can create a checkout session to subscribe/update billing. \nIf false, organization must resolve other billing issues before a checkout can be done.\n","type":"boolean"},"isScheduledToCancel":{"description":"If true, the billing is set to cancel at the end of its current period","type":"boolean"},"pricing":{"description":"Pricing information for the organization","$ref":"#/components/schemas/OrganizationPricing"},"usageAddons":{"description":"Configuration for the usage-based addons","type":"object","additionalProperties":{"$ref":"#/components/schemas/BillingMeterAddon"}},"minUsers":{"description":"The minimum number of members allowed for this organization.","type":"number"},"maxUsers":{"description":"The maximum number of members allowed for this organization","type":"number"},"minPremiumSites":{"description":"The minimum number of premium sites allowed for this organization.","type":"number"},"maxPremiumSites":{"description":"The maximum number of premium sites allowed for this organization.","type":"number"},"minUltimateSites":{"description":"The minimum number of ultimate sites allowed for this organization.","type":"number"},"maxUltimateSites":{"description":"The maximum number of ultimate sites allowed for this organization.","type":"number"},"paidMembers":{"description":"The number of paid members on the current subscription.","type":"number"},"paidPremiumSites":{"description":"The number of paid premium sites on the current subscription.","type":"number"},"paidUltimateSites":{"description":"The number of paid ultimate sites on the current subscription.","type":"number"}},"required":["interval","endDate","hasPaymentFailed","canCheckout","isScheduledToCancel","pricing","usageAddons"]},"BillingInterval":{"type":"string","description":"Interval for a billing subscription","enum":["monthly","yearly"]},"OrganizationPricing":{"type":"object","description":"Pricing information for an organization","properties":{"members":{"type":"object","description":"Pricing for members (organization plan)","properties":{"plus_2024":{"$ref":"#/components/schemas/OrganizationPricePair"},"pro_2024":{"$ref":"#/components/schemas/OrganizationPricePair"}},"required":["plus_2024","pro_2024"],"additionalProperties":false},"sites":{"type":"object","description":"Pricing for site types (site plans)","properties":{"premium":{"$ref":"#/components/schemas/OrganizationPricePair"},"ultimate":{"$ref":"#/components/schemas/OrganizationPricePair"}},"required":["premium","ultimate"],"additionalProperties":false}},"required":["members","sites"]},"OrganizationPricePair":{"type":"object","description":"Pricing pair for monthly and yearly intervals","properties":{"monthly":{"type":"number","description":"Monthly price in USD","minimum":0},"yearly":{"type":"number","description":"Yearly price in USD (per month)","minimum":0}},"required":["monthly","yearly"]},"BillingMeterAddon":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"BillingTrialStatus":{"type":"string","description":"- notapplicable, no trial can be started for this organization. - none, no trial has been started yet. - active, trial is active. - ended, the trial has ended and the user has choosen to stay on the free plan or has upgraded to a paid plan. - expired, the trial has ended but the user hasn't deciced yet what to do.\n","enum":["notapplicable","none","active","ended","expired"]},"BlockSource":{"type":"string","description":"Source for an organization block","enum":["backoffice","external","internal"]},"BlockReason":{"type":"string","description":"A short description giving context on the reason for the block.","minLength":1,"maxLength":255},"IntegrationContentSecurityPolicy":{"description":"Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as \nheaders when processing the script fetch event and the blocks fetch events.\n","oneOf":[{"type":"string"},{"type":"object","properties":{"base-uri":{"type":"string"},"block-all-mixed-content":{"type":"string"},"child-src":{"type":"string"},"connect-src":{"type":"string"},"default-src":{"type":"string"},"font-src":{"type":"string"},"form-action":{"type":"string"},"frame-ancestors":{"type":"string"},"frame-src":{"type":"string"},"img-src":{"type":"string"},"manifest-src":{"type":"string"},"media-src":{"type":"string"},"navigate-to":{"type":"string"},"object-src":{"type":"string"},"plugin-types":{"type":"string"},"prefetch-src":{"type":"string"},"referrer":{"type":"string"},"report-to":{"type":"string"},"report-uri":{"type":"string"},"require-sri-for":{"type":"string"},"require-trusted-types-for":{"type":"string"},"sandbox":{"type":"string"},"script-src":{"type":"string"},"script-src-attr":{"type":"string"},"script-src-elem":{"type":"string"},"style-src":{"type":"string"},"style-src-attr":{"type":"string"},"style-src-elem":{"type":"string"},"trusted-types":{"type":"string"},"upgrade-insecure-requests":{"type":"string"},"worker-src":{"type":"string"}}}]}},"responses":{"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[404]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/integrations/{integrationName}":{"get":{"operationId":"getIntegrationByName","summary":"Get an integration by its name","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"}],"responses":{"200":{"description":"Integration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}},"404":{"description":"No matching integration found for given name","$ref":"#/components/responses/NotFoundError"}}}}}}
```

## POST /integrations/{integrationName}

> Publish an integration

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}}},"schemas":{"Integration":{"type":"object","properties":{"object":{"type":"string","enum":["integration"]},"name":{"type":"string","description":"Unique named identifier for the integration"},"version":{"type":"number","description":"Version of the integration"},"title":{"$ref":"#/components/schemas/IntegrationTitle"},"description":{"$ref":"#/components/schemas/IntegrationDescription"},"summary":{"$ref":"#/components/schemas/IntegrationSummary"},"previewImages":{"type":"array","description":"URLs of images to showcase the integration","maxItems":3,"items":{"type":"string"}},"target":{"$ref":"#/components/schemas/IntegrationTarget"},"verified":{"type":"boolean","description":"If true, the integration has been verified by the GitBook team"},"visibility":{"$ref":"#/components/schemas/IntegrationVisibility"},"scopes":{"$ref":"#/components/schemas/IntegrationScopes"},"categories":{"$ref":"#/components/schemas/IntegrationCategories"},"blocks":{"$ref":"#/components/schemas/IntegrationBlocks"},"contentSources":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationContentSource"}},"configurations":{"$ref":"#/components/schemas/IntegrationConfigurations"},"externalLinks":{"$ref":"#/components/schemas/IntegrationExternalLinks"},"owner":{"$ref":"#/components/schemas/Organization"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the integration in the API","format":"uri"},"icon":{"type":"string","description":"URL of the icon associated to the integration","format":"uri"},"app":{"type":"string","description":"URL of the integration in the application","format":"uri"},"assets":{"type":"string","description":"URL of the integration's assets.","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration","format":"uri"}},"required":["location","app","assets","publicEndpoint"]},"permissions":{"type":"object","description":"The set of permissions for the integration","properties":{"admin":{"type":"boolean"}},"required":["admin"]},"contentSecurityPolicy":{"$ref":"#/components/schemas/IntegrationContentSecurityPolicy"}},"required":["object","name","version","title","scopes","categories","visibility","target","verified","previewImages","externalLinks","owner","permissions","urls"]},"IntegrationTitle":{"type":"string","description":"Title of the integration","minLength":2,"maxLength":30},"IntegrationDescription":{"type":"string","description":"Description of the integration","maxLength":100},"IntegrationSummary":{"type":"string","description":"Long form markdown summary of the integration","maxLength":2048},"IntegrationTarget":{"type":"string","description":"The target on which the integration can operate and needs to be configured for","enum":["all","site","space","organization"]},"IntegrationVisibility":{"type":"string","enum":["public","private","unlisted"]},"IntegrationScopes":{"type":"array","description":"Permissions that should be granted to the integration","items":{"$ref":"#/components/schemas/IntegrationScope"}},"IntegrationScope":{"type":"string","enum":["space:content:read","space:content:write","space:metadata:read","space:metadata:write","space:git:sync","page:feedback:read","site:metadata:read","site:views:read","site:script:inject","site:script:cookies","site:visitor:auth","site:adaptive:read","site:adaptive:write","conversations:ingest","openapi:read","openapi:write"]},"IntegrationCategories":{"type":"array","description":"Categories for which the integration is listed in the marketplace","items":{"$ref":"#/components/schemas/IntegrationCategory"}},"IntegrationCategory":{"type":"string","enum":["analytics","collaboration","content","gitsync","marketing","visitor-auth","other"]},"IntegrationBlocks":{"type":"array","description":"Custom blocks defined by this integration.","items":{"$ref":"#/components/schemas/IntegrationBlock"}},"IntegrationBlock":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID in the integration for the block. It also represents the UI component used."},"title":{"type":"string","description":"Short descriptive title for the block.","minLength":2,"maxLength":40},"description":{"type":"string","description":"Long descriptive text for the block.","minLength":0,"maxLength":150},"icon":{"type":"string","description":"URL of the icon to represent this block."},"urlUnfurl":{"type":"array","description":"URLs patterns to convert as this block.","items":{"type":"string"}},"markdown":{"$ref":"#/components/schemas/IntegrationBlockMarkdown"}},"required":["id","title"]},"IntegrationBlockMarkdown":{"oneOf":[{"type":"object","description":"Format the custom block as a codeblock","properties":{"codeblock":{"description":"Code block syntax to use to identify the block.","type":"string"},"body":{"description":"Key of the property to use as body of the codeblock.","type":"string"}},"required":["codeblock","body"]}]},"IntegrationContentSource":{"type":"object","description":"Definition of a content source provided by the integration.","properties":{"id":{"type":"string","description":"Unique ID in the integration for the source."},"title":{"type":"string","description":"Short descriptive title for the source.","minLength":2,"maxLength":40},"description":{"type":"string","description":"Long descriptive text for the source.","minLength":0,"maxLength":150},"icon":{"type":"string","description":"URL of the icon to represent this source."},"configuration":{"$ref":"#/components/schemas/IntegrationConfigurationComponent"}},"required":["id","title","configuration"]},"IntegrationConfigurationComponent":{"type":"object","description":"ContentKit component for configuration","properties":{"componentId":{"type":"string","description":"ID of the ContentKit component defined in the integration"}},"required":["componentId"]},"IntegrationConfigurations":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/IntegrationConfiguration"},"space":{"$ref":"#/components/schemas/IntegrationConfiguration"},"site":{"$ref":"#/components/schemas/IntegrationConfiguration"}}},"IntegrationConfiguration":{"oneOf":[{"$ref":"#/components/schemas/IntegrationConfigurationSchema"},{"$ref":"#/components/schemas/IntegrationConfigurationComponent"}]},"IntegrationConfigurationSchema":{"type":"object","description":"Schema for a configuration","properties":{"properties":{"type":"object","additionalProperties":{"allOf":[{"type":"object","properties":{"title":{"$ref":"#/components/schemas/IntegrationPropertyTitle"},"description":{"type":"string","maxLength":100}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["string"]},"default":{"type":"string"},"completion_url":{"description":"If specified, this URL will be called to fetch suggestions for auto-completing the property.","type":"string"},"enum":{"type":"array","description":"If specified, only values from this array are allowed as inputs.","items":{"type":"string"}}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"default":{"type":"number"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["boolean"]},"default":{"type":"boolean"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["button"]},"callback_url":{"type":"string"},"button_text":{"type":"string"}},"required":["type","callback_url","button_text"]}]}]}},"required":{"type":"array","uniqueItems":true,"items":{"type":"string"}}},"required":["properties"]},"IntegrationPropertyTitle":{"type":"string","description":"Property title for an integration configuration property","minLength":2,"maxLength":50},"IntegrationExternalLinks":{"type":"array","description":"External urls configured by the developer of the integration","maxItems":5,"items":{"type":"object","properties":{"url":{"$ref":"#/components/schemas/URL"},"label":{"type":"string"}},"required":["url","label"]}},"URL":{"type":"string","format":"uri","maxLength":2048},"Organization":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"organization\"","enum":["organization"]},"id":{"type":"string","description":"Unique identifier for the organization"},"title":{"$ref":"#/components/schemas/OrganizationTitle"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"emailDomains":{"$ref":"#/components/schemas/OrganizationEmailDomains"},"hostname":{"$ref":"#/components/schemas/OrganizationHostname"},"type":{"$ref":"#/components/schemas/OrganizationType"},"useCase":{"$ref":"#/components/schemas/OrganizationUseCase"},"communityType":{"$ref":"#/components/schemas/OrganizationCommunityType"},"defaultRole":{"$ref":"#/components/schemas/MemberRoleOrGuest"},"defaultContent":{"$ref":"#/components/schemas/OrganizationDefaultContent"},"sso":{"description":"Whether SSO is enforced organization-wide","type":"boolean"},"ai":{"description":"If true, the organization is configured to use all our AI features.","type":"boolean"},"inviteLinks":{"description":"If true, invite links are enabled for this organization.","type":"boolean"},"plan":{"$ref":"#/components/schemas/BillingProduct"},"billing":{"description":"Billing details, only available for org members.","$ref":"#/components/schemas/OrganizationBilling"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the organization in the API","format":"uri"},"app":{"type":"string","description":"URL of the organization in the application","format":"uri"},"logo":{"description":"URL of the logo of this organization, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"trial":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/BillingTrialStatus"},"count":{"type":"integer","description":"Number of trials the organization has consumed."},"endDate":{"description":"The trial's end date, if the organization has or had a trial.","$ref":"#/components/schemas/Timestamp"},"decision":{"type":"string","description":"The decision taken by the user at the end of the trial","enum":["downgrade"]}},"required":["status","count"]},"customHostname":{"description":"Custom hostname linked to this organization","type":"string"},"blocked":{"type":"object","description":"If the organization is blocked, information about the block will appear here","properties":{"source":{"$ref":"#/components/schemas/BlockSource"},"reason":{"$ref":"#/components/schemas/BlockReason"}},"required":["reason"]},"internal_billingMigration":{"type":"object","properties":{"deadline":{"description":"When we will upgrade the organization onto new pricing, if they haven't already.","$ref":"#/components/schemas/Timestamp"},"discountPercent":{"description":"A discount the organization may have received thanks to migrating early.","type":"number"},"discountEndDate":{"description":"The expiration date of the discount, after wich regular pricing resumes.","$ref":"#/components/schemas/Timestamp"}}},"permissions":{"type":"object","description":"The set of permissions for the organization","properties":{"view":{"type":"boolean","description":"Can the user view the organization."},"access":{"type":"boolean","description":"Can the user view the organization in the application."},"admin":{"type":"boolean","description":"Can the user manage the title, members, etc."},"ownTeam":{"type":"boolean","description":"Is the user a team owner."},"createContent":{"type":"boolean","description":"Can the user create new spaces/collections in the organization."},"createOpenAPISpec":{"type":"boolean","description":"Can the user create new OpenAPI specifications."},"viewBilling":{"type":"boolean","description":"Can the user view the billing details of the organization."},"listMembers":{"type":"boolean","description":"Can the user list the members of the organization."},"listTeams":{"type":"boolean","description":"Can the user list the teams in the organization."},"listIntegrations":{"type":"boolean","description":"Can the user list the integrations in the organization."},"listInstallations":{"type":"boolean","description":"Can the user list the integration installations in the organization."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the organization."}},"required":["view","access","admin","ownTeam","createContent","createOpenAPISpec","viewBilling","listMembers","listTeams","listIntegrations","listInstallations","installIntegration"]}},"required":["object","id","plan","title","createdAt","inviteLinks","type","emailDomains","mergeRules","urls","trial","permissions"]},"OrganizationTitle":{"type":"string","description":"Name of the organization","minLength":2,"maxLength":255,"pattern":"\\S.*\\S"},"Timestamp":{"type":"string","format":"date-time"},"OrganizationEmailDomains":{"type":"array","items":{"type":"string"}},"OrganizationHostname":{"type":"string","description":"Default hostname for the organization's public content, e.g. <org-hostname>.gitbook.io","minLength":3,"maxLength":32},"OrganizationType":{"type":"string","enum":["business","community"]},"OrganizationUseCase":{"type":"string","enum":["internalDocs","docsSite","audienceControlledSite","productDocs","teamKnowledgeBase","designSystem","openSourceDocs","notes","other"]},"OrganizationCommunityType":{"type":"string","enum":["nonProfit","openSource","education"]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"OrganizationDefaultContent":{"description":"The default content for the organization","oneOf":[{"$ref":"#/components/schemas/SitePointer"}]},"SitePointer":{"type":"object","properties":{"type":{"type":"string","enum":["site"]},"site":{"type":"string","description":"Unique identifier for the site"}},"required":["type","site"]},"BillingProduct":{"type":"string","description":"Name of the product","enum":["free_2024","plus_2024","pro_2024","enterprise_2024","community_2024","free","plus","pro","internal"]},"OrganizationBilling":{"type":"object","properties":{"interval":{"$ref":"#/components/schemas/BillingInterval"},"endDate":{"oneOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"hasPaymentFailed":{"description":"If true, we were unable to collect the last payment","type":"boolean"},"canCheckout":{"description":"If true, organization can create a checkout session to subscribe/update billing. \nIf false, organization must resolve other billing issues before a checkout can be done.\n","type":"boolean"},"isScheduledToCancel":{"description":"If true, the billing is set to cancel at the end of its current period","type":"boolean"},"pricing":{"description":"Pricing information for the organization","$ref":"#/components/schemas/OrganizationPricing"},"usageAddons":{"description":"Configuration for the usage-based addons","type":"object","additionalProperties":{"$ref":"#/components/schemas/BillingMeterAddon"}},"minUsers":{"description":"The minimum number of members allowed for this organization.","type":"number"},"maxUsers":{"description":"The maximum number of members allowed for this organization","type":"number"},"minPremiumSites":{"description":"The minimum number of premium sites allowed for this organization.","type":"number"},"maxPremiumSites":{"description":"The maximum number of premium sites allowed for this organization.","type":"number"},"minUltimateSites":{"description":"The minimum number of ultimate sites allowed for this organization.","type":"number"},"maxUltimateSites":{"description":"The maximum number of ultimate sites allowed for this organization.","type":"number"},"paidMembers":{"description":"The number of paid members on the current subscription.","type":"number"},"paidPremiumSites":{"description":"The number of paid premium sites on the current subscription.","type":"number"},"paidUltimateSites":{"description":"The number of paid ultimate sites on the current subscription.","type":"number"}},"required":["interval","endDate","hasPaymentFailed","canCheckout","isScheduledToCancel","pricing","usageAddons"]},"BillingInterval":{"type":"string","description":"Interval for a billing subscription","enum":["monthly","yearly"]},"OrganizationPricing":{"type":"object","description":"Pricing information for an organization","properties":{"members":{"type":"object","description":"Pricing for members (organization plan)","properties":{"plus_2024":{"$ref":"#/components/schemas/OrganizationPricePair"},"pro_2024":{"$ref":"#/components/schemas/OrganizationPricePair"}},"required":["plus_2024","pro_2024"],"additionalProperties":false},"sites":{"type":"object","description":"Pricing for site types (site plans)","properties":{"premium":{"$ref":"#/components/schemas/OrganizationPricePair"},"ultimate":{"$ref":"#/components/schemas/OrganizationPricePair"}},"required":["premium","ultimate"],"additionalProperties":false}},"required":["members","sites"]},"OrganizationPricePair":{"type":"object","description":"Pricing pair for monthly and yearly intervals","properties":{"monthly":{"type":"number","description":"Monthly price in USD","minimum":0},"yearly":{"type":"number","description":"Yearly price in USD (per month)","minimum":0}},"required":["monthly","yearly"]},"BillingMeterAddon":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"BillingTrialStatus":{"type":"string","description":"- notapplicable, no trial can be started for this organization. - none, no trial has been started yet. - active, trial is active. - ended, the trial has ended and the user has choosen to stay on the free plan or has upgraded to a paid plan. - expired, the trial has ended but the user hasn't deciced yet what to do.\n","enum":["notapplicable","none","active","ended","expired"]},"BlockSource":{"type":"string","description":"Source for an organization block","enum":["backoffice","external","internal"]},"BlockReason":{"type":"string","description":"A short description giving context on the reason for the block.","minLength":1,"maxLength":255},"IntegrationContentSecurityPolicy":{"description":"Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as \nheaders when processing the script fetch event and the blocks fetch events.\n","oneOf":[{"type":"string"},{"type":"object","properties":{"base-uri":{"type":"string"},"block-all-mixed-content":{"type":"string"},"child-src":{"type":"string"},"connect-src":{"type":"string"},"default-src":{"type":"string"},"font-src":{"type":"string"},"form-action":{"type":"string"},"frame-ancestors":{"type":"string"},"frame-src":{"type":"string"},"img-src":{"type":"string"},"manifest-src":{"type":"string"},"media-src":{"type":"string"},"navigate-to":{"type":"string"},"object-src":{"type":"string"},"plugin-types":{"type":"string"},"prefetch-src":{"type":"string"},"referrer":{"type":"string"},"report-to":{"type":"string"},"report-uri":{"type":"string"},"require-sri-for":{"type":"string"},"require-trusted-types-for":{"type":"string"},"sandbox":{"type":"string"},"script-src":{"type":"string"},"script-src-attr":{"type":"string"},"script-src-elem":{"type":"string"},"style-src":{"type":"string"},"style-src-attr":{"type":"string"},"style-src-elem":{"type":"string"},"trusted-types":{"type":"string"},"upgrade-insecure-requests":{"type":"string"},"worker-src":{"type":"string"}}}]},"PublishIntegration":{"type":"object","properties":{"runtime":{"type":"string","description":"The runtime version to use for the integration. If not specified, the integration will use the default runtime.","default":"v1","enum":["v1","v2"]},"icon":{"type":"string","format":"byte","description":"Base64 content of the icon"},"title":{"$ref":"#/components/schemas/IntegrationTitle"},"description":{"$ref":"#/components/schemas/IntegrationDescription"},"summary":{"$ref":"#/components/schemas/IntegrationSummary"},"previewImages":{"type":"array","maxItems":3,"items":{"type":"string","format":"byte","description":"Base64 content of the image"}},"visibility":{"$ref":"#/components/schemas/IntegrationVisibility"},"target":{"description":"Allowed installation target for the integration. If not specified, the integration can be installed at `all` targets (org, spaces etc)","$ref":"#/components/schemas/IntegrationTarget"},"scopes":{"$ref":"#/components/schemas/IntegrationScopes"},"categories":{"$ref":"#/components/schemas/IntegrationCategories"},"blocks":{"$ref":"#/components/schemas/IntegrationBlocks"},"contentSources":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationContentSource"}},"externalLinks":{"$ref":"#/components/schemas/IntegrationExternalLinks"},"configurations":{"$ref":"#/components/schemas/IntegrationConfigurations"},"script":{"type":"string","description":"Content of the script to use"},"organization":{"type":"string","description":"The ID or subdomain of the organization under which the integration should be published"},"secrets":{"$ref":"#/components/schemas/IntegrationSecrets"},"contentSecurityPolicy":{"$ref":"#/components/schemas/IntegrationContentSecurityPolicy"}},"required":["organization","title","description","script","scopes"]},"IntegrationSecrets":{"type":"object","description":"Secrets stored on the integration and passed at runtime.","properties":{},"maxProperties":20,"additionalProperties":{"type":"string"}}},"responses":{"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[404]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/integrations/{integrationName}":{"post":{"operationId":"publishIntegration","summary":"Publish an integration","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}},"404":{"description":"Organization could not be found for the given hostname","$ref":"#/components/responses/NotFoundError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishIntegration"}}}}}}}}
```

## DELETE /integrations/{integrationName}

> Unpublish an integration

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}}}},"paths":{"/integrations/{integrationName}":{"delete":{"operationId":"unpublishIntegration","summary":"Unpublish an integration","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"}],"responses":{"204":{"description":"Integration did not exist"},"205":{"description":"Integration has been deleted"}}}}}}
```

## GET /integrations/{integrationName}/installations

> List all integration installations

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"integration":[]}],"components":{"securitySchemes":{"integration":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"listPage":{"name":"page","in":"query","description":"Identifier of the page results to fetch.","schema":{"type":"string"}},"listLimit":{"name":"limit","in":"query","description":"The number of results per page","schema":{"type":"number","minimum":0,"maximum":1000}}},"schemas":{"List":{"type":"object","properties":{"next":{"type":"object","properties":{"page":{"type":"string","description":"Unique identifier to query the next results page"}},"required":["page"]},"count":{"type":"number","description":"Total count of objects in the list"}}},"IntegrationInstallation":{"type":"object","description":"Installation of an integration on an account","properties":{"id":{"type":"string"},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"space_selection":{"$ref":"#/components/schemas/IntegrationInstallationSpaceSelection"},"site_selection":{"$ref":"#/components/schemas/IntegrationInstallationSiteSelection"},"spaces":{"type":"number","description":"Count of spaces, the installation is managing"},"configuration":{"$ref":"#/components/schemas/IntegrationInstallationConfiguration"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the installation in the API","format":"uri"},"app":{"type":"string","description":"URL of the integration's installation in the application","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration's installation","format":"uri"}},"required":["location","app","publicEndpoint"]},"externalIds":{"$ref":"#/components/schemas/IntegrationInstallationExternalIds"},"target":{"$ref":"#/components/schemas/IntegrationInstallationTarget","description":"Target of the integration installation"},"network":{"$ref":"#/components/schemas/IntegrationNetwork","description":"Network configuration for the installation"}},"required":["id","status","space_selection","site_selection","spaces","configuration","urls","externalIds","target","createdAt","updatedAt"]},"IntegrationInstallationStatus":{"type":"string","enum":["active","pending","paused"]},"IntegrationInstallationSpaceSelection":{"type":"string","description":"Describe whether all spaces have been selected or there's a selection involved","enum":["all","selected"]},"IntegrationInstallationSiteSelection":{"type":"string","description":"Describe whether all sites have been selected or there's a selection involved","enum":["all","selected"]},"IntegrationInstallationConfiguration":{"type":"object","description":"Configuration of the integration at the account level","additionalProperties":true},"Timestamp":{"type":"string","format":"date-time"},"IntegrationInstallationExternalIds":{"type":"array","description":"External IDs assigned by the integration.","maxItems":5,"items":{"type":"string"}},"IntegrationInstallationTarget":{"oneOf":[{"$ref":"#/components/schemas/OrganizationTarget"}]},"OrganizationTarget":{"type":"object","required":["organization"],"properties":{"organization":{"type":"string"}}},"IntegrationNetwork":{"type":"object","description":"Network configuration for the installation","properties":{"proxy":{"type":"boolean","description":"Whether the installation is proxied through the backend"}}}}},"paths":{"/integrations/{integrationName}/installations":{"get":{"operationId":"listIntegrationInstallations","summary":"List all integration installations","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"$ref":"#/components/parameters/listPage"},{"$ref":"#/components/parameters/listLimit"},{"name":"externalId","in":"query","description":"External Id to filter by","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationInstallation"}}}}]}}}}}}}}}
```

## POST /integrations/{integrationName}/installations

> Install an integration

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}}},"schemas":{"OrganizationTarget":{"type":"object","required":["organization"],"properties":{"organization":{"type":"string"}}},"IntegrationInstallation":{"type":"object","description":"Installation of an integration on an account","properties":{"id":{"type":"string"},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"space_selection":{"$ref":"#/components/schemas/IntegrationInstallationSpaceSelection"},"site_selection":{"$ref":"#/components/schemas/IntegrationInstallationSiteSelection"},"spaces":{"type":"number","description":"Count of spaces, the installation is managing"},"configuration":{"$ref":"#/components/schemas/IntegrationInstallationConfiguration"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the installation in the API","format":"uri"},"app":{"type":"string","description":"URL of the integration's installation in the application","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration's installation","format":"uri"}},"required":["location","app","publicEndpoint"]},"externalIds":{"$ref":"#/components/schemas/IntegrationInstallationExternalIds"},"target":{"$ref":"#/components/schemas/IntegrationInstallationTarget","description":"Target of the integration installation"},"network":{"$ref":"#/components/schemas/IntegrationNetwork","description":"Network configuration for the installation"}},"required":["id","status","space_selection","site_selection","spaces","configuration","urls","externalIds","target","createdAt","updatedAt"]},"IntegrationInstallationStatus":{"type":"string","enum":["active","pending","paused"]},"IntegrationInstallationSpaceSelection":{"type":"string","description":"Describe whether all spaces have been selected or there's a selection involved","enum":["all","selected"]},"IntegrationInstallationSiteSelection":{"type":"string","description":"Describe whether all sites have been selected or there's a selection involved","enum":["all","selected"]},"IntegrationInstallationConfiguration":{"type":"object","description":"Configuration of the integration at the account level","additionalProperties":true},"Timestamp":{"type":"string","format":"date-time"},"IntegrationInstallationExternalIds":{"type":"array","description":"External IDs assigned by the integration.","maxItems":5,"items":{"type":"string"}},"IntegrationInstallationTarget":{"oneOf":[{"$ref":"#/components/schemas/OrganizationTarget"}]},"IntegrationNetwork":{"type":"object","description":"Network configuration for the installation","properties":{"proxy":{"type":"boolean","description":"Whether the installation is proxied through the backend"}}}},"responses":{"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[404]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/integrations/{integrationName}/installations":{"post":{"operationId":"installIntegration","summary":"Install an integration","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationTarget"}}}},"responses":{"201":{"headers":{"Location":{"description":"URL for the installed integration","schema":{"type":"string"}}},"description":"Integration installed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationInstallation"}}}},"404":{"$ref":"#/components/responses/NotFoundError"}}}}}}
```

## GET /integrations/{integrationName}/events

> List all integration events

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"listPage":{"name":"page","in":"query","description":"Identifier of the page results to fetch.","schema":{"type":"string"}},"listLimit":{"name":"limit","in":"query","description":"The number of results per page","schema":{"type":"number","minimum":0,"maximum":1000}}},"schemas":{"List":{"type":"object","properties":{"next":{"type":"object","properties":{"page":{"type":"string","description":"Unique identifier to query the next results page"}},"required":["page"]},"count":{"type":"number","description":"Total count of objects in the list"}}},"IntegrationEvent":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the event."},"integrationId":{"type":"string","description":"Unique ID of the integration."},"installationId":{"type":"string","description":"Unique ID of the integration installation."},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"payload":{"$ref":"#/components/schemas/Event"},"status":{"type":"string","description":"Status of the event.","enum":["success","failed"]}},"required":["id","integrationId","createdAt","payload","status"]},"Timestamp":{"type":"string","format":"date-time"},"Event":{"description":"Any event that can be received from GitBook.","oneOf":[{"$ref":"#/components/schemas/InstallationSetupEvent"},{"$ref":"#/components/schemas/InstallationDeletedEvent"},{"$ref":"#/components/schemas/SpaceInstallationSetupEvent"},{"$ref":"#/components/schemas/SpaceInstallationDeletedEvent"},{"$ref":"#/components/schemas/SiteInstallationSetupEvent"},{"$ref":"#/components/schemas/SiteInstallationDeletedEvent"},{"$ref":"#/components/schemas/SiteViewEvent"},{"$ref":"#/components/schemas/SpaceContentUpdatedEvent"},{"$ref":"#/components/schemas/SpaceGitSyncCompletedEvent"},{"$ref":"#/components/schemas/SpaceGitSyncStartedEvent"},{"$ref":"#/components/schemas/SpaceVisibilityUpdatedEvent"},{"$ref":"#/components/schemas/TaskEvent"},{"$ref":"#/components/schemas/FetchEvent"},{"$ref":"#/components/schemas/FetchPublishedScriptEvent"},{"$ref":"#/components/schemas/FetchVisitorAuthenticationEvent"},{"$ref":"#/components/schemas/UIRenderEvent"},{"$ref":"#/components/schemas/ContentComputeDocumentEvent"},{"$ref":"#/components/schemas/ContentComputeRevisionEvent"},{"$ref":"#/components/schemas/PageFeedbackEvent"}],"discriminator":{"propertyName":"type"}},"InstallationSetupEvent":{"allOf":[{"$ref":"#/components/schemas/InstallationEvent"},{"type":"object","description":"Event received when integration has been installed or updated.","properties":{"type":{"type":"string","enum":["installation_setup"]},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"previous":{"type":"object","description":"The state of the installation at the account level before it was updated.","properties":{"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"configuration":{"type":"object","description":"The previous configuration of the installation at the account level."}},"required":["status"]}},"required":["type","status"]}]},"InstallationEvent":{"allOf":[{"$ref":"#/components/schemas/BaseEvent"},{"type":"object","description":"Common properties for all events related to an installation","properties":{"installationId":{"type":"string","description":"ID of the integration installation"}},"required":["installationId"]}]},"BaseEvent":{"description":"Common properties for all events.","type":"object","properties":{"eventId":{"description":"Unique identifier for the event.","type":"string"},"type":{"description":"Type of the event.","type":"string"}},"required":["eventId","type"]},"IntegrationInstallationStatus":{"type":"string","enum":["active","pending","paused"]},"InstallationDeletedEvent":{"allOf":[{"$ref":"#/components/schemas/InstallationEvent"},{"type":"object","description":"Event received when integration has been uninstalled from an organization.","properties":{"type":{"type":"string","enum":["installation_deleted"]},"previous":{"type":"object","description":"The state of the installation before it was deleted.","properties":{"configuration":{"type":"object","description":"The previous configuration of the installation."}}}},"required":["type","previous"]}]},"SpaceInstallationSetupEvent":{"allOf":[{"$ref":"#/components/schemas/SpaceEvent"},{"type":"object","description":"Event received when integration has been installed or updated on a space.","properties":{"type":{"type":"string","enum":["space_installation_setup"]},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"previous":{"type":"object","description":"The state of the Space installation before it was updated.","properties":{"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"configuration":{"type":"object","description":"The previous configuration of the Space installation."}},"required":["status"]}},"required":["type","status"]}]},"SpaceEvent":{"allOf":[{"$ref":"#/components/schemas/InstallationEvent"},{"type":"object","description":"Common properties for all events related to a specific space.","properties":{"spaceId":{"type":"string","description":"ID of the space"}},"required":["spaceId"]}]},"SpaceInstallationDeletedEvent":{"allOf":[{"$ref":"#/components/schemas/SpaceEvent"},{"type":"object","description":"Event received when integration has been uninstalled from a space.","properties":{"type":{"type":"string","enum":["space_installation_deleted"]},"previous":{"type":"object","description":"The state of the Space installation before it was deleted.","properties":{"configuration":{"type":"object","description":"The previous configuration of the Space installation."}}}},"required":["type","previous"]}]},"SiteInstallationSetupEvent":{"allOf":[{"$ref":"#/components/schemas/SiteEvent"},{"type":"object","description":"Event received when integration has been installed or updated on a site.","properties":{"type":{"type":"string","enum":["site_installation_setup"]},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"previous":{"type":"object","description":"The state of the site installation before it was updated.","properties":{"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"configuration":{"type":"object","description":"The previous configuration of the site installation."}},"required":["status"]}},"required":["type","status"]}]},"SiteEvent":{"allOf":[{"$ref":"#/components/schemas/InstallationEvent"},{"type":"object","description":"Common properties for all events related to a specific site.","properties":{"siteId":{"type":"string","description":"ID of the site"}},"required":["siteId"]}]},"SiteInstallationDeletedEvent":{"allOf":[{"$ref":"#/components/schemas/SiteEvent"},{"type":"object","description":"Event received when integration has been uninstalled from a site.","properties":{"type":{"type":"string","enum":["site_installation_deleted"]},"previous":{"type":"object","description":"The state of the site installation before it was deleted.","properties":{"configuration":{"type":"object","description":"The previous configuration of the site installation."}}}},"required":["type","previous"]}]},"SiteViewEvent":{"allOf":[{"$ref":"#/components/schemas/SiteEvent"},{"type":"object","description":"Event received when a page has been visited on a site.","properties":{"type":{"type":"string","enum":["site_view"]},"spaceId":{"type":"string","description":"Unique identifier of the visited space in the site.","deprecated":true},"siteSpaceId":{"description":"The site-space that was viewed","type":"string"},"pageId":{"type":"string","description":"Unique identifier of the visited page."},"visitor":{"$ref":"#/components/schemas/EventVisitor"},"url":{"type":"string","description":"The GitBook content's URL visited (including URL params)."},"referrer":{"type":"string","description":"The URL of referrer that linked to the page."}},"required":["type","visitor","url","referrer"]}]},"EventVisitor":{"type":"object","description":"Analytics info on the GitBook's content visitor.","properties":{"anonymousId":{"type":"string","description":"GitBook's unique identifier of the visitor."},"cookies":{"type":"object","description":"The visitors cookies.","additionalProperties":{"type":"string"}},"userAgent":{"type":"string","description":"User-agent of the visitor."},"ip":{"type":"string","description":"IP address of the visitor."},"language":{"type":"string","description":"Language of the visitor."}},"required":["anonymousId","cookies","userAgent","ip"]},"SpaceContentUpdatedEvent":{"allOf":[{"$ref":"#/components/schemas/SpaceEvent"},{"type":"object","description":"Event when the primary content of a space has been updated.","properties":{"type":{"type":"string","enum":["space_content_updated"]},"revisionId":{"type":"string","description":"Unique identifier of the new content revision"}},"required":["type","revisionId"]}]},"SpaceGitSyncCompletedEvent":{"allOf":[{"$ref":"#/components/schemas/SpaceEvent"},{"type":"object","description":"Event when a GitSync operation has been completed.","properties":{"type":{"type":"string","enum":["space_gitsync_completed"]},"state":{"type":"string","enum":["success","failure"]},"revisionId":{"type":"string","description":"Unique identifier of the new content revision"},"commitId":{"type":"string","description":"Unique identifier for the commit (sha)"}},"required":["type","state","revisionId","commitId"]}]},"SpaceGitSyncStartedEvent":{"allOf":[{"$ref":"#/components/schemas/SpaceEvent"},{"type":"object","description":"Event when a GitSync operation has been started.","properties":{"type":{"type":"string","enum":["space_gitsync_started"]},"revisionId":{"type":"string","description":"Unique identifier of the new content revision"},"commitId":{"type":"string","description":"Unique identifier for the commit (sha)"}},"required":["type","revisionId","commitId"]}]},"SpaceVisibilityUpdatedEvent":{"allOf":[{"$ref":"#/components/schemas/SpaceEvent"},{"type":"object","description":"Event when the visibility of the space has been changed.","properties":{"type":{"type":"string","enum":["space_visibility_updated"]},"previousVisibility":{"$ref":"#/components/schemas/ContentVisibility"},"visibility":{"$ref":"#/components/schemas/ContentVisibility"}},"required":["type","previousVisibility","visibility"]}]},"ContentVisibility":{"type":"string","description":"* `public`: Anyone can access the content, and the content is indexed by search engines.\n* `unlisted`: Anyone can access the content, and the content is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the content.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the content.\n* `in-collection`: Anyone who can access the parent collection can access the content.\n  Only available for spaces in a collection.\n* `private`: Authorized members can access the content.\n","enum":["public","unlisted","share-link","visitor-auth","in-collection","private"]},"TaskEvent":{"allOf":[{"$ref":"#/components/schemas/BaseEvent"},{"type":"object","description":"Event representing a background task trigger for an integration.","properties":{"type":{"type":"string","enum":["task"]},"task":{"type":"object","description":"Payload associated with the integration task."}},"required":["type","task"]}]},"FetchEvent":{"allOf":[{"$ref":"#/components/schemas/BaseEvent"},{"type":"object","description":"Event representing an incoming HTTP request.","properties":{"spaceId":{"type":"string","description":"The space ID, if requests are specific to a single space"},"siteId":{"type":"string","description":"The site ID, if requests are specific to a single site"},"installationId":{"type":"string","description":"The installation ID, if requests are specific to a single installation"},"auth":{"type":"object","properties":{"userId":{"type":"string","description":"The user's ID."}},"required":["userId"]},"type":{"type":"string","enum":["fetch"]},"request":{"$ref":"#/components/schemas/FetchRequest"}},"required":["type","request"]}]},"FetchRequest":{"type":"object","properties":{"method":{"type":"string","enum":["post","get","put","delete"]},"url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["method","url","headers"]},"FetchPublishedScriptEvent":{"allOf":[{"$ref":"#/components/schemas/SiteEvent"},{"type":"object","description":"Common properties for all events related to fetching a published script from an installation","properties":{"type":{"type":"string","enum":["fetch_published_script"]}},"required":["type"]}]},"FetchVisitorAuthenticationEvent":{"allOf":[{"$ref":"#/components/schemas/SiteEvent"},{"type":"object","description":"Common properties for all events related to authenticated access from an installation","properties":{"type":{"type":"string","enum":["fetch_visitor_authentication"]},"location":{"type":"string"}},"required":["type"]}]},"UIRenderEvent":{"allOf":[{"oneOf":[{"$ref":"#/components/schemas/SpaceEvent"},{"$ref":"#/components/schemas/SiteEvent"},{"$ref":"#/components/schemas/InstallationEvent"}]},{"type":"object","description":"Event generated when rendering a UI","properties":{"auth":{"type":"object","properties":{"userId":{"type":"string","description":"The user's ID."}},"required":["userId"]},"type":{"type":"string","enum":["ui_render"]},"componentId":{"type":"string"},"props":{"description":"Properties to render the UI.","type":"object"},"state":{"description":"State of the UI.","type":"object"},"context":{"$ref":"#/components/schemas/ContentKitContext"},"action":{"type":"object"}},"required":["type","componentId","props","context"]}]},"ContentKitContext":{"description":"Object representing the context in which a ContentKit component is rendered.","oneOf":[{"$ref":"#/components/schemas/ContentKitContextConfigurationAccount"},{"$ref":"#/components/schemas/ContentKitContextConfigurationSpace"},{"$ref":"#/components/schemas/ContentKitContextConfigurationSite"},{"$ref":"#/components/schemas/ContentKitContextConfigurationContentSource"},{"$ref":"#/components/schemas/ContentKitContextDocument"}]},"ContentKitContextConfigurationAccount":{"allOf":[{"$ref":"#/components/schemas/ContentKitContextBase"},{"type":"object","description":"Context while rendering in an account installation's configuration.","properties":{"type":{"type":"string","enum":["configuration_account"]},"organizationId":{"type":"string","description":"ID of the organization the account installation configuration is in."}},"required":["type","organizationId"]}]},"ContentKitContextBase":{"type":"object","description":"Common properties for ContentKit context.","properties":{"theme":{"type":"string","enum":["dark","light"]}},"required":["theme"]},"ContentKitContextConfigurationSpace":{"allOf":[{"$ref":"#/components/schemas/ContentKitContextBase"},{"type":"object","description":"Context while rendering in a space-installation's configuration.","properties":{"type":{"type":"string","enum":["configuration_space"]},"spaceId":{"type":"string","description":"ID of the space the space-installation configuration is in."}},"required":["type","spaceId"]}]},"ContentKitContextConfigurationSite":{"allOf":[{"$ref":"#/components/schemas/ContentKitContextBase"},{"type":"object","description":"Context while rendering in a site-installation's configuration.","properties":{"type":{"type":"string","enum":["configuration_site"]},"siteId":{"type":"string","description":"ID of the site the site-installation configuration is in."}},"required":["type","siteId"]}]},"ContentKitContextConfigurationContentSource":{"allOf":[{"$ref":"#/components/schemas/ContentKitContextBase"},{"type":"object","description":"Context while rendering the configuration flow of a content source.","properties":{"type":{"type":"string","enum":["configuration_contentsource"]},"organizationId":{"type":"string","description":"ID of the organization the content source installation configuration is in."},"spaceId":{"type":"string","description":"Optional ID of the space the content source installation configuration is in."}},"required":["type","organizationId"]}]},"ContentKitContextDocument":{"allOf":[{"$ref":"#/components/schemas/ContentKitContextBase"},{"type":"object","description":"Context while rendering in a document.","properties":{"type":{"type":"string","enum":["document"]},"spaceId":{"type":"string","description":"ID of the space content the document is in."},"editable":{"type":"boolean"}},"required":["type","spaceId","editable"]}]},"ContentComputeDocumentEvent":{"allOf":[{"$ref":"#/components/schemas/ContentComputeEvent"},{"type":"object","description":"Event generated when computing the document of a pages.\nThe integration should respond with a `Document`.\n","properties":{"type":{"type":"string","enum":["content_compute_document"]}},"required":["type"]}]},"ContentComputeEvent":{"allOf":[{"$ref":"#/components/schemas/SpaceEvent"},{"type":"object","description":"Generic event when computing the content of a space","properties":{"sourceId":{"type":"string"},"props":{"description":"Properties passed to the rendering.","$ref":"#/components/schemas/PlainObject"},"dependencies":{"description":"Dependencies of the computation.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ComputedContentDependencyResolved"}}},"required":["sourceId","props","dependencies"]}]},"PlainObject":{"properties":{},"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/PlainObject"},{"type":"string"},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"number"},{"$ref":"#/components/schemas/PlainObject"}]}}]}},"ComputedContentDependencyResolved":{"description":"Dependency for a computation, with its resolved value.","oneOf":[{"$ref":"#/components/schemas/ComputedContentDependencySpace"},{"$ref":"#/components/schemas/ComputedContentDependencyOpenAPI"},{"$ref":"#/components/schemas/ComputedContentDependencyTranslation"}]},"ComputedContentDependencySpace":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRefSpace"},"value":{"type":["object","null"],"description":"See `Space` schema component.","properties":{"object":{"type":"string","enum":["space"]},"id":{"type":"string"},"revision":{"type":"string"}},"required":["object","id","revision"]}},"required":["ref","value"]},"ContentRefSpace":{"type":"object","properties":{"kind":{"type":"string","enum":["space"]},"space":{"type":"string"}},"required":["kind","space"]},"ComputedContentDependencyOpenAPI":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRefOpenAPI"},"value":{"type":["object","null"],"description":"See `OpenAPI` schema component.","properties":{"object":{"type":"string","enum":["openapi-spec"]},"id":{"type":"string"},"slug":{"type":"string"},"lastVersion":{"type":"string"},"visibility":{"$ref":"#/components/schemas/OpenAPISpecVisibility"}},"required":["object","id","slug"]}},"required":["ref","value"]},"ContentRefOpenAPI":{"type":"object","properties":{"kind":{"type":"string","enum":["openapi"]},"spec":{"type":"string","description":"Slug of the OpenAPI specification"}},"required":["kind","spec"]},"OpenAPISpecVisibility":{"type":"string","description":"The visibility setting of the OpenAPI spec.\n* `private`: The spec is not publicly available.\n* `public`: The spec is available to anyone with a public link.\n","enum":["private","public"]},"ComputedContentDependencyTranslation":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/TranslationRef"},"value":{"oneOf":[{"$ref":"#/components/schemas/TranslationResult"},{"type":"null","description":"Translation has not been run yet"}]}},"required":["ref","value"]},"TranslationRef":{"type":"object","properties":{"kind":{"type":"string","enum":["translation"]},"translation":{"type":"string","description":"ID of the translation sync"}},"required":["kind","translation"]},"TranslationResult":{"type":"object","description":"Result of a translation.","properties":{"space":{"type":"string","description":"ID of the space containing the result of the translation"},"revision":{"type":"string","description":"ID of the revision generated by the translation"}},"required":["space","revision"]},"ContentComputeRevisionEvent":{"allOf":[{"$ref":"#/components/schemas/ContentComputeEvent"},{"type":"object","description":"Event generated when computing revision in a content.\nThe integration should respond with an array of pages and files.\n","properties":{"type":{"type":"string","enum":["content_compute_revision"]}},"required":["type"]}]},"PageFeedbackEvent":{"allOf":[{"$ref":"#/components/schemas/BaseEvent"},{"type":"object","description":"Event received when feedback has been submitted on a page.","properties":{"type":{"type":"string","enum":["page_feedback"]},"installationId":{"type":"string","description":"ID of the integration installation"},"spaceId":{"type":"string","description":"Unique identifier of the space in the site.","deprecated":true},"siteId":{"type":"string","description":"Unique identifier of the site."},"pageId":{"type":"string","description":"Unique identifier of the page where feedback was submitted."},"feedback":{"type":"object","description":"The feedback data submitted by the visitor.","properties":{"rating":{"$ref":"#/components/schemas/PageFeedbackRating"},"comment":{"type":"string","description":"Optional comment provided with the feedback.","minLength":1,"maxLength":512}},"required":["rating"]},"visitor":{"$ref":"#/components/schemas/EventVisitor"},"url":{"type":"string","description":"The GitBook content's URL where feedback was submitted."},"referrer":{"type":"string","description":"The URL of referrer that linked to the page."}},"required":["type","installationId","siteId","feedback","visitor","url","referrer"]}]},"PageFeedbackRating":{"type":"string","enum":["bad","ok","good"]}}},"paths":{"/integrations/{integrationName}/events":{"get":{"operationId":"listIntegrationEvents","summary":"List all integration events","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"$ref":"#/components/parameters/listPage"},{"$ref":"#/components/parameters/listLimit"}],"responses":{"200":{"description":"Paginated list of integration events","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationEvent"}}}}]}}}}}}}}}
```

## GET /integrations/{integrationName}/events/{eventId}

> Get an integration event by its ID

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"integrationEventId":{"name":"eventId","in":"path","required":true,"description":"ID of the integration event","schema":{"type":"string"}}},"schemas":{"IntegrationEvent":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the event."},"integrationId":{"type":"string","description":"Unique ID of the integration."},"installationId":{"type":"string","description":"Unique ID of the integration installation."},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"payload":{"$ref":"#/components/schemas/Event"},"status":{"type":"string","description":"Status of the event.","enum":["success","failed"]}},"required":["id","integrationId","createdAt","payload","status"]},"Timestamp":{"type":"string","format":"date-time"},"Event":{"description":"Any event that can be received from GitBook.","oneOf":[{"$ref":"#/components/schemas/InstallationSetupEvent"},{"$ref":"#/components/schemas/InstallationDeletedEvent"},{"$ref":"#/components/schemas/SpaceInstallationSetupEvent"},{"$ref":"#/components/schemas/SpaceInstallationDeletedEvent"},{"$ref":"#/components/schemas/SiteInstallationSetupEvent"},{"$ref":"#/components/schemas/SiteInstallationDeletedEvent"},{"$ref":"#/components/schemas/SiteViewEvent"},{"$ref":"#/components/schemas/SpaceContentUpdatedEvent"},{"$ref":"#/components/schemas/SpaceGitSyncCompletedEvent"},{"$ref":"#/components/schemas/SpaceGitSyncStartedEvent"},{"$ref":"#/components/schemas/SpaceVisibilityUpdatedEvent"},{"$ref":"#/components/schemas/TaskEvent"},{"$ref":"#/components/schemas/FetchEvent"},{"$ref":"#/components/schemas/FetchPublishedScriptEvent"},{"$ref":"#/components/schemas/FetchVisitorAuthenticationEvent"},{"$ref":"#/components/schemas/UIRenderEvent"},{"$ref":"#/components/schemas/ContentComputeDocumentEvent"},{"$ref":"#/components/schemas/ContentComputeRevisionEvent"},{"$ref":"#/components/schemas/PageFeedbackEvent"}],"discriminator":{"propertyName":"type"}},"InstallationSetupEvent":{"allOf":[{"$ref":"#/components/schemas/InstallationEvent"},{"type":"object","description":"Event received when integration has been installed or updated.","properties":{"type":{"type":"string","enum":["installation_setup"]},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"previous":{"type":"object","description":"The state of the installation at the account level before it was updated.","properties":{"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"configuration":{"type":"object","description":"The previous configuration of the installation at the account level."}},"required":["status"]}},"required":["type","status"]}]},"InstallationEvent":{"allOf":[{"$ref":"#/components/schemas/BaseEvent"},{"type":"object","description":"Common properties for all events related to an installation","properties":{"installationId":{"type":"string","description":"ID of the integration installation"}},"required":["installationId"]}]},"BaseEvent":{"description":"Common properties for all events.","type":"object","properties":{"eventId":{"description":"Unique identifier for the event.","type":"string"},"type":{"description":"Type of the event.","type":"string"}},"required":["eventId","type"]},"IntegrationInstallationStatus":{"type":"string","enum":["active","pending","paused"]},"InstallationDeletedEvent":{"allOf":[{"$ref":"#/components/schemas/InstallationEvent"},{"type":"object","description":"Event received when integration has been uninstalled from an organization.","properties":{"type":{"type":"string","enum":["installation_deleted"]},"previous":{"type":"object","description":"The state of the installation before it was deleted.","properties":{"configuration":{"type":"object","description":"The previous configuration of the installation."}}}},"required":["type","previous"]}]},"SpaceInstallationSetupEvent":{"allOf":[{"$ref":"#/components/schemas/SpaceEvent"},{"type":"object","description":"Event received when integration has been installed or updated on a space.","properties":{"type":{"type":"string","enum":["space_installation_setup"]},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"previous":{"type":"object","description":"The state of the Space installation before it was updated.","properties":{"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"configuration":{"type":"object","description":"The previous configuration of the Space installation."}},"required":["status"]}},"required":["type","status"]}]},"SpaceEvent":{"allOf":[{"$ref":"#/components/schemas/InstallationEvent"},{"type":"object","description":"Common properties for all events related to a specific space.","properties":{"spaceId":{"type":"string","description":"ID of the space"}},"required":["spaceId"]}]},"SpaceInstallationDeletedEvent":{"allOf":[{"$ref":"#/components/schemas/SpaceEvent"},{"type":"object","description":"Event received when integration has been uninstalled from a space.","properties":{"type":{"type":"string","enum":["space_installation_deleted"]},"previous":{"type":"object","description":"The state of the Space installation before it was deleted.","properties":{"configuration":{"type":"object","description":"The previous configuration of the Space installation."}}}},"required":["type","previous"]}]},"SiteInstallationSetupEvent":{"allOf":[{"$ref":"#/components/schemas/SiteEvent"},{"type":"object","description":"Event received when integration has been installed or updated on a site.","properties":{"type":{"type":"string","enum":["site_installation_setup"]},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"previous":{"type":"object","description":"The state of the site installation before it was updated.","properties":{"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"configuration":{"type":"object","description":"The previous configuration of the site installation."}},"required":["status"]}},"required":["type","status"]}]},"SiteEvent":{"allOf":[{"$ref":"#/components/schemas/InstallationEvent"},{"type":"object","description":"Common properties for all events related to a specific site.","properties":{"siteId":{"type":"string","description":"ID of the site"}},"required":["siteId"]}]},"SiteInstallationDeletedEvent":{"allOf":[{"$ref":"#/components/schemas/SiteEvent"},{"type":"object","description":"Event received when integration has been uninstalled from a site.","properties":{"type":{"type":"string","enum":["site_installation_deleted"]},"previous":{"type":"object","description":"The state of the site installation before it was deleted.","properties":{"configuration":{"type":"object","description":"The previous configuration of the site installation."}}}},"required":["type","previous"]}]},"SiteViewEvent":{"allOf":[{"$ref":"#/components/schemas/SiteEvent"},{"type":"object","description":"Event received when a page has been visited on a site.","properties":{"type":{"type":"string","enum":["site_view"]},"spaceId":{"type":"string","description":"Unique identifier of the visited space in the site.","deprecated":true},"siteSpaceId":{"description":"The site-space that was viewed","type":"string"},"pageId":{"type":"string","description":"Unique identifier of the visited page."},"visitor":{"$ref":"#/components/schemas/EventVisitor"},"url":{"type":"string","description":"The GitBook content's URL visited (including URL params)."},"referrer":{"type":"string","description":"The URL of referrer that linked to the page."}},"required":["type","visitor","url","referrer"]}]},"EventVisitor":{"type":"object","description":"Analytics info on the GitBook's content visitor.","properties":{"anonymousId":{"type":"string","description":"GitBook's unique identifier of the visitor."},"cookies":{"type":"object","description":"The visitors cookies.","additionalProperties":{"type":"string"}},"userAgent":{"type":"string","description":"User-agent of the visitor."},"ip":{"type":"string","description":"IP address of the visitor."},"language":{"type":"string","description":"Language of the visitor."}},"required":["anonymousId","cookies","userAgent","ip"]},"SpaceContentUpdatedEvent":{"allOf":[{"$ref":"#/components/schemas/SpaceEvent"},{"type":"object","description":"Event when the primary content of a space has been updated.","properties":{"type":{"type":"string","enum":["space_content_updated"]},"revisionId":{"type":"string","description":"Unique identifier of the new content revision"}},"required":["type","revisionId"]}]},"SpaceGitSyncCompletedEvent":{"allOf":[{"$ref":"#/components/schemas/SpaceEvent"},{"type":"object","description":"Event when a GitSync operation has been completed.","properties":{"type":{"type":"string","enum":["space_gitsync_completed"]},"state":{"type":"string","enum":["success","failure"]},"revisionId":{"type":"string","description":"Unique identifier of the new content revision"},"commitId":{"type":"string","description":"Unique identifier for the commit (sha)"}},"required":["type","state","revisionId","commitId"]}]},"SpaceGitSyncStartedEvent":{"allOf":[{"$ref":"#/components/schemas/SpaceEvent"},{"type":"object","description":"Event when a GitSync operation has been started.","properties":{"type":{"type":"string","enum":["space_gitsync_started"]},"revisionId":{"type":"string","description":"Unique identifier of the new content revision"},"commitId":{"type":"string","description":"Unique identifier for the commit (sha)"}},"required":["type","revisionId","commitId"]}]},"SpaceVisibilityUpdatedEvent":{"allOf":[{"$ref":"#/components/schemas/SpaceEvent"},{"type":"object","description":"Event when the visibility of the space has been changed.","properties":{"type":{"type":"string","enum":["space_visibility_updated"]},"previousVisibility":{"$ref":"#/components/schemas/ContentVisibility"},"visibility":{"$ref":"#/components/schemas/ContentVisibility"}},"required":["type","previousVisibility","visibility"]}]},"ContentVisibility":{"type":"string","description":"* `public`: Anyone can access the content, and the content is indexed by search engines.\n* `unlisted`: Anyone can access the content, and the content is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the content.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the content.\n* `in-collection`: Anyone who can access the parent collection can access the content.\n  Only available for spaces in a collection.\n* `private`: Authorized members can access the content.\n","enum":["public","unlisted","share-link","visitor-auth","in-collection","private"]},"TaskEvent":{"allOf":[{"$ref":"#/components/schemas/BaseEvent"},{"type":"object","description":"Event representing a background task trigger for an integration.","properties":{"type":{"type":"string","enum":["task"]},"task":{"type":"object","description":"Payload associated with the integration task."}},"required":["type","task"]}]},"FetchEvent":{"allOf":[{"$ref":"#/components/schemas/BaseEvent"},{"type":"object","description":"Event representing an incoming HTTP request.","properties":{"spaceId":{"type":"string","description":"The space ID, if requests are specific to a single space"},"siteId":{"type":"string","description":"The site ID, if requests are specific to a single site"},"installationId":{"type":"string","description":"The installation ID, if requests are specific to a single installation"},"auth":{"type":"object","properties":{"userId":{"type":"string","description":"The user's ID."}},"required":["userId"]},"type":{"type":"string","enum":["fetch"]},"request":{"$ref":"#/components/schemas/FetchRequest"}},"required":["type","request"]}]},"FetchRequest":{"type":"object","properties":{"method":{"type":"string","enum":["post","get","put","delete"]},"url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["method","url","headers"]},"FetchPublishedScriptEvent":{"allOf":[{"$ref":"#/components/schemas/SiteEvent"},{"type":"object","description":"Common properties for all events related to fetching a published script from an installation","properties":{"type":{"type":"string","enum":["fetch_published_script"]}},"required":["type"]}]},"FetchVisitorAuthenticationEvent":{"allOf":[{"$ref":"#/components/schemas/SiteEvent"},{"type":"object","description":"Common properties for all events related to authenticated access from an installation","properties":{"type":{"type":"string","enum":["fetch_visitor_authentication"]},"location":{"type":"string"}},"required":["type"]}]},"UIRenderEvent":{"allOf":[{"oneOf":[{"$ref":"#/components/schemas/SpaceEvent"},{"$ref":"#/components/schemas/SiteEvent"},{"$ref":"#/components/schemas/InstallationEvent"}]},{"type":"object","description":"Event generated when rendering a UI","properties":{"auth":{"type":"object","properties":{"userId":{"type":"string","description":"The user's ID."}},"required":["userId"]},"type":{"type":"string","enum":["ui_render"]},"componentId":{"type":"string"},"props":{"description":"Properties to render the UI.","type":"object"},"state":{"description":"State of the UI.","type":"object"},"context":{"$ref":"#/components/schemas/ContentKitContext"},"action":{"type":"object"}},"required":["type","componentId","props","context"]}]},"ContentKitContext":{"description":"Object representing the context in which a ContentKit component is rendered.","oneOf":[{"$ref":"#/components/schemas/ContentKitContextConfigurationAccount"},{"$ref":"#/components/schemas/ContentKitContextConfigurationSpace"},{"$ref":"#/components/schemas/ContentKitContextConfigurationSite"},{"$ref":"#/components/schemas/ContentKitContextConfigurationContentSource"},{"$ref":"#/components/schemas/ContentKitContextDocument"}]},"ContentKitContextConfigurationAccount":{"allOf":[{"$ref":"#/components/schemas/ContentKitContextBase"},{"type":"object","description":"Context while rendering in an account installation's configuration.","properties":{"type":{"type":"string","enum":["configuration_account"]},"organizationId":{"type":"string","description":"ID of the organization the account installation configuration is in."}},"required":["type","organizationId"]}]},"ContentKitContextBase":{"type":"object","description":"Common properties for ContentKit context.","properties":{"theme":{"type":"string","enum":["dark","light"]}},"required":["theme"]},"ContentKitContextConfigurationSpace":{"allOf":[{"$ref":"#/components/schemas/ContentKitContextBase"},{"type":"object","description":"Context while rendering in a space-installation's configuration.","properties":{"type":{"type":"string","enum":["configuration_space"]},"spaceId":{"type":"string","description":"ID of the space the space-installation configuration is in."}},"required":["type","spaceId"]}]},"ContentKitContextConfigurationSite":{"allOf":[{"$ref":"#/components/schemas/ContentKitContextBase"},{"type":"object","description":"Context while rendering in a site-installation's configuration.","properties":{"type":{"type":"string","enum":["configuration_site"]},"siteId":{"type":"string","description":"ID of the site the site-installation configuration is in."}},"required":["type","siteId"]}]},"ContentKitContextConfigurationContentSource":{"allOf":[{"$ref":"#/components/schemas/ContentKitContextBase"},{"type":"object","description":"Context while rendering the configuration flow of a content source.","properties":{"type":{"type":"string","enum":["configuration_contentsource"]},"organizationId":{"type":"string","description":"ID of the organization the content source installation configuration is in."},"spaceId":{"type":"string","description":"Optional ID of the space the content source installation configuration is in."}},"required":["type","organizationId"]}]},"ContentKitContextDocument":{"allOf":[{"$ref":"#/components/schemas/ContentKitContextBase"},{"type":"object","description":"Context while rendering in a document.","properties":{"type":{"type":"string","enum":["document"]},"spaceId":{"type":"string","description":"ID of the space content the document is in."},"editable":{"type":"boolean"}},"required":["type","spaceId","editable"]}]},"ContentComputeDocumentEvent":{"allOf":[{"$ref":"#/components/schemas/ContentComputeEvent"},{"type":"object","description":"Event generated when computing the document of a pages.\nThe integration should respond with a `Document`.\n","properties":{"type":{"type":"string","enum":["content_compute_document"]}},"required":["type"]}]},"ContentComputeEvent":{"allOf":[{"$ref":"#/components/schemas/SpaceEvent"},{"type":"object","description":"Generic event when computing the content of a space","properties":{"sourceId":{"type":"string"},"props":{"description":"Properties passed to the rendering.","$ref":"#/components/schemas/PlainObject"},"dependencies":{"description":"Dependencies of the computation.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ComputedContentDependencyResolved"}}},"required":["sourceId","props","dependencies"]}]},"PlainObject":{"properties":{},"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/PlainObject"},{"type":"string"},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"number"},{"$ref":"#/components/schemas/PlainObject"}]}}]}},"ComputedContentDependencyResolved":{"description":"Dependency for a computation, with its resolved value.","oneOf":[{"$ref":"#/components/schemas/ComputedContentDependencySpace"},{"$ref":"#/components/schemas/ComputedContentDependencyOpenAPI"},{"$ref":"#/components/schemas/ComputedContentDependencyTranslation"}]},"ComputedContentDependencySpace":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRefSpace"},"value":{"type":["object","null"],"description":"See `Space` schema component.","properties":{"object":{"type":"string","enum":["space"]},"id":{"type":"string"},"revision":{"type":"string"}},"required":["object","id","revision"]}},"required":["ref","value"]},"ContentRefSpace":{"type":"object","properties":{"kind":{"type":"string","enum":["space"]},"space":{"type":"string"}},"required":["kind","space"]},"ComputedContentDependencyOpenAPI":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRefOpenAPI"},"value":{"type":["object","null"],"description":"See `OpenAPI` schema component.","properties":{"object":{"type":"string","enum":["openapi-spec"]},"id":{"type":"string"},"slug":{"type":"string"},"lastVersion":{"type":"string"},"visibility":{"$ref":"#/components/schemas/OpenAPISpecVisibility"}},"required":["object","id","slug"]}},"required":["ref","value"]},"ContentRefOpenAPI":{"type":"object","properties":{"kind":{"type":"string","enum":["openapi"]},"spec":{"type":"string","description":"Slug of the OpenAPI specification"}},"required":["kind","spec"]},"OpenAPISpecVisibility":{"type":"string","description":"The visibility setting of the OpenAPI spec.\n* `private`: The spec is not publicly available.\n* `public`: The spec is available to anyone with a public link.\n","enum":["private","public"]},"ComputedContentDependencyTranslation":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/TranslationRef"},"value":{"oneOf":[{"$ref":"#/components/schemas/TranslationResult"},{"type":"null","description":"Translation has not been run yet"}]}},"required":["ref","value"]},"TranslationRef":{"type":"object","properties":{"kind":{"type":"string","enum":["translation"]},"translation":{"type":"string","description":"ID of the translation sync"}},"required":["kind","translation"]},"TranslationResult":{"type":"object","description":"Result of a translation.","properties":{"space":{"type":"string","description":"ID of the space containing the result of the translation"},"revision":{"type":"string","description":"ID of the revision generated by the translation"}},"required":["space","revision"]},"ContentComputeRevisionEvent":{"allOf":[{"$ref":"#/components/schemas/ContentComputeEvent"},{"type":"object","description":"Event generated when computing revision in a content.\nThe integration should respond with an array of pages and files.\n","properties":{"type":{"type":"string","enum":["content_compute_revision"]}},"required":["type"]}]},"PageFeedbackEvent":{"allOf":[{"$ref":"#/components/schemas/BaseEvent"},{"type":"object","description":"Event received when feedback has been submitted on a page.","properties":{"type":{"type":"string","enum":["page_feedback"]},"installationId":{"type":"string","description":"ID of the integration installation"},"spaceId":{"type":"string","description":"Unique identifier of the space in the site.","deprecated":true},"siteId":{"type":"string","description":"Unique identifier of the site."},"pageId":{"type":"string","description":"Unique identifier of the page where feedback was submitted."},"feedback":{"type":"object","description":"The feedback data submitted by the visitor.","properties":{"rating":{"$ref":"#/components/schemas/PageFeedbackRating"},"comment":{"type":"string","description":"Optional comment provided with the feedback.","minLength":1,"maxLength":512}},"required":["rating"]},"visitor":{"$ref":"#/components/schemas/EventVisitor"},"url":{"type":"string","description":"The GitBook content's URL where feedback was submitted."},"referrer":{"type":"string","description":"The URL of referrer that linked to the page."}},"required":["type","installationId","siteId","feedback","visitor","url","referrer"]}]},"PageFeedbackRating":{"type":"string","enum":["bad","ok","good"]},"IntegrationEventTrace":{"type":"object","required":["logs"],"properties":{"logs":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationEventLog"}}}},"IntegrationEventLog":{"type":"object","properties":{"message":{"description":"The message of the log entry.","type":"string"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"level":{"description":"The level of the log entry.","type":"string","enum":["debug","info","warn","error"]}}}},"responses":{"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[404]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/integrations/{integrationName}/events/{eventId}":{"get":{"operationId":"getIntegrationEvent","summary":"Get an integration event by its ID","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"$ref":"#/components/parameters/integrationEventId"}],"responses":{"200":{"description":"Integration event","content":{"application/json":{"schema":{"type":"object","required":["event"],"properties":{"event":{"$ref":"#/components/schemas/IntegrationEvent"},"trace":{"$ref":"#/components/schemas/IntegrationEventTrace"}}}}}},"404":{"$ref":"#/components/responses/NotFoundError"}}}}}}
```

## GET /integrations/{integrationName}/spaces

> List all integration space installations

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"integration":[]}],"components":{"securitySchemes":{"integration":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"listPage":{"name":"page","in":"query","description":"Identifier of the page results to fetch.","schema":{"type":"string"}},"listLimit":{"name":"limit","in":"query","description":"The number of results per page","schema":{"type":"number","minimum":0,"maximum":1000}}},"schemas":{"List":{"type":"object","properties":{"next":{"type":"object","properties":{"page":{"type":"string","description":"Unique identifier to query the next results page"}},"required":["page"]},"count":{"type":"number","description":"Total count of objects in the list"}}},"IntegrationSpaceInstallation":{"allOf":[{"$ref":"#/components/schemas/IntegrationContentInstallationBase"},{"type":"object","properties":{"space":{"description":"The space the integration is installed on. Using the string value is deprecated in favor of space.id","oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Space"}]}},"required":["space"]}]},"IntegrationContentInstallationBase":{"type":"object","description":"Base properties of an installation of an integration on a site or space.","properties":{"integration":{"description":"Unique name identifier of the integration","type":"string"},"installation":{"description":"ID of the integration installation","type":"string"},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"configuration":{"description":"Configuration of the integration for this site","type":"object"},"externalIds":{"$ref":"#/components/schemas/IntegrationInstallationExternalIds"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the integration's installation in the API","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration's installation","format":"uri"}},"required":["location","publicEndpoint"]}},"required":["integration","installation","status","configuration","externalIds","urls"]},"IntegrationInstallationStatus":{"type":"string","enum":["active","pending","paused"]},"IntegrationInstallationExternalIds":{"type":"array","description":"External IDs assigned by the integration.","maxItems":5,"items":{"type":"string"}},"Space":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"space\"","enum":["space"]},"id":{"type":"string","description":"Unique identifier for the space"},"title":{"$ref":"#/components/schemas/SpaceTitle"},"emoji":{"description":"An emoji for this space. It'll match the emoji shown in the GitBook app.","$ref":"#/components/schemas/Emoji"},"visibility":{"$ref":"#/components/schemas/ContentVisibility"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"deletedAt":{"$ref":"#/components/schemas/Timestamp"},"editMode":{"$ref":"#/components/schemas/SpaceEditMode"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesSpaceConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the space in the API","format":"uri"},"app":{"type":"string","description":"URL of the space in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the space. Only defined when visibility is not \"private.\"","format":"uri"},"public":{"type":"string","description":"URL of the public version of the space. Only defined when visibility is \"public\".","format":"uri"},"icon":{"description":"URL of the icon of this space, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"organization":{"type":"string","description":"ID of the organization owning this space"},"parent":{"type":"string","description":"ID of the parent collection."},"language":{"$ref":"#/components/schemas/TranslationLanguage"},"gitSync":{"$ref":"#/components/schemas/GitSyncState"},"visitorAuth":{"$ref":"#/components/schemas/VisitorAuth"},"revision":{"type":"string","description":"ID of the active revision in the space."},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"comments":{"type":"number","description":"Count of opened comments on the space."},"changeRequests":{"type":"number","description":"Total count of change requests on the space."},"changeRequestsOpen":{"type":"number","description":"Count of open change requests on the space."},"changeRequestsDraft":{"type":"number","description":"Count of draft change requests on the space."},"internal_poweredByV2":{"type":"boolean","description":"Whether the space is powered by V2 of the content system."},"internal_singleWebsocket":{"type":"boolean","description":"Whether the space uses a single websocket connection for all real-time communication."},"permissions":{"type":"object","description":"The set of permissions for the space","properties":{"view":{"type":"boolean","description":"Can the user view the space content."},"access":{"type":"boolean","description":"Can the user access the space in the application."},"admin":{"type":"boolean","description":"Can the user edit the title, install integrations, and manage the space."},"viewInviteLinks":{"type":"boolean","description":"Can the user view the invite links of the space."},"edit":{"type":"boolean","description":"Can the user edit the content of the space by creating a change request."},"triggerGitSync":{"type":"boolean","description":"Can the user trigger a git sync."},"comment":{"type":"boolean","description":"Can the user comment on the content."},"merge":{"type":"boolean","description":"Can the user merge change requests."},"review":{"type":"boolean","description":"Can the user review change requests."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the space."}},"required":["view","access","admin","viewInviteLinks","edit","triggerGitSync","comment","merge","review","installIntegration"]}},"required":["object","id","title","emoji","organization","visibility","revision","createdAt","updatedAt","comments","changeRequests","changeRequestsOpen","changeRequestsDraft","mergeRules","urls","defaultLevel","permissions"]},"SpaceTitle":{"type":"string","description":"Title of the space","maxLength":50},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"ContentVisibility":{"type":"string","description":"* `public`: Anyone can access the content, and the content is indexed by search engines.\n* `unlisted`: Anyone can access the content, and the content is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the content.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the content.\n* `in-collection`: Anyone who can access the parent collection can access the content.\n  Only available for spaces in a collection.\n* `private`: Authorized members can access the content.\n","enum":["public","unlisted","share-link","visitor-auth","in-collection","private"]},"Timestamp":{"type":"string","format":"date-time"},"SpaceEditMode":{"type":"string","description":"Determines how a Space can be edited.\n* `live`: Users can directly edit the space\n* `locked`: All edits are locked for this space.\n","enum":["live","locked"]},"MergeRulesSpaceConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationInherit"},{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"}]},"MergeRulesConfigurationInherit":{"type":"object","description":"The merge rules inherits from the organization configuration.","properties":{"type":{"type":"string","enum":["inherit"]}},"required":["type"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"URL":{"type":"string","format":"uri","maxLength":2048},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","zh-tw","yue","ko","ar","hi","nl","pl","tr","sv","no","da","fi","el","cs","hu","ro","th","vi","id","ms","he","uk","sk","bg","hr","lt","lv","et","sl"]},"GitSyncState":{"type":"object","properties":{"repoName":{"type":"string","description":"Repository name."},"installationStatus":{"$ref":"#/components/schemas/GitSyncInstallationStatus"},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","deprecated":true,"description":"The integration name providing the Git Sync."},"installationId":{"type":"string","description":"The ID of the Git Sync installation."},"url":{"type":"string","description":"The URL to the repository tree, used when rendering public content."},"updatedAt":{"description":"When the Git provider details were last updated","$ref":"#/components/schemas/Timestamp"}}},"GitSyncInstallationStatus":{"type":"string","enum":["unauthenticated","active","pending"]},"GitSyncProvider":{"type":"string","description":"The provider of the Git Sync installation.","enum":["github","gitlab","github-legacy"]},"VisitorAuth":{"oneOf":[{"$ref":"#/components/schemas/VisitorAuthCustomBackend"},{"allOf":[{"$ref":"#/components/schemas/VisitorAuthIntegrationBackend"},{"type":"object","properties":{"integration":{"type":"string","description":"Name of integration being used as the backend for authenticated access"}},"required":["integration"]}]}]},"VisitorAuthCustomBackend":{"type":"object","title":"Custom backend for authenticated access","properties":{"backend":{"type":"string","description":"Custom backend for authenticated access","enum":["custom"]}},"required":["backend"]},"VisitorAuthIntegrationBackend":{"type":"object","title":"Integration backend for authenticated access","properties":{"backend":{"type":"string","description":"Integration as backend for authenticated access","enum":["integration"]}},"required":["backend"]},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]}}},"paths":{"/integrations/{integrationName}/spaces":{"get":{"operationId":"listIntegrationSpaceInstallations","summary":"List all integration space installations","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"$ref":"#/components/parameters/listPage"},{"$ref":"#/components/parameters/listLimit"},{"name":"externalId","in":"query","description":"External Id to filter by","schema":{"type":"string"}},{"name":"extended","in":"query","description":"If true, returns the space object in each items. If false, returns the space ID in each items.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationSpaceInstallation"}}}}]}}}}}}}}}
```

## GET /integrations/{integrationName}/sites

> List all integration site installations

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"integration":[]}],"components":{"securitySchemes":{"integration":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"listPage":{"name":"page","in":"query","description":"Identifier of the page results to fetch.","schema":{"type":"string"}},"listLimit":{"name":"limit","in":"query","description":"The number of results per page","schema":{"type":"number","minimum":0,"maximum":1000}}},"schemas":{"List":{"type":"object","properties":{"next":{"type":"object","properties":{"page":{"type":"string","description":"Unique identifier to query the next results page"}},"required":["page"]},"count":{"type":"number","description":"Total count of objects in the list"}}},"IntegrationSiteInstallation":{"allOf":[{"$ref":"#/components/schemas/IntegrationContentInstallationBase"},{"type":"object","properties":{"site":{"description":"The site the integration is installed on. Using the string value is deprecated in favor of site.id","oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Site"}]}},"required":["site"]}]},"IntegrationContentInstallationBase":{"type":"object","description":"Base properties of an installation of an integration on a site or space.","properties":{"integration":{"description":"Unique name identifier of the integration","type":"string"},"installation":{"description":"ID of the integration installation","type":"string"},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"configuration":{"description":"Configuration of the integration for this site","type":"object"},"externalIds":{"$ref":"#/components/schemas/IntegrationInstallationExternalIds"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the integration's installation in the API","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration's installation","format":"uri"}},"required":["location","publicEndpoint"]}},"required":["integration","installation","status","configuration","externalIds","urls"]},"IntegrationInstallationStatus":{"type":"string","enum":["active","pending","paused"]},"IntegrationInstallationExternalIds":{"type":"array","description":"External IDs assigned by the integration.","maxItems":5,"items":{"type":"string"}},"Site":{"type":"object","properties":{"object":{"type":"string","enum":["site"]},"id":{"type":"string","description":"Unique identifier of the site"},"type":{"$ref":"#/components/schemas/SiteType"},"appliedType":{"$ref":"#/components/schemas/SiteType","description":"The currently applied type of the site. For example, frozen sites will have this set to Basic."},"title":{"$ref":"#/components/schemas/SiteTitle"},"icon":{"oneOf":[{"$ref":"#/components/schemas/CustomizationFavicon"},{"type":"null"}]},"hostname":{"$ref":"#/components/schemas/SiteHostname"},"basename":{"$ref":"#/components/schemas/SiteBasename"},"proxy":{"$ref":"#/components/schemas/SiteProxy"},"visibility":{"$ref":"#/components/schemas/SiteVisibility"},"permissionsModel":{"$ref":"#/components/schemas/SitePermissionsModel"},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"published":{"type":"boolean","description":"Whether the site is live or not. If true, the site is accessible to the audience defined by the visibility setting."},"siteSpaces":{"type":"number"},"createdAt":{"type":"string","format":"date-time"},"adaptiveContent":{"$ref":"#/components/schemas/SiteAdaptiveContent"},"ads":{"$ref":"#/components/schemas/SiteAds"},"features":{"description":"A list of all premium features enabled on this site. For each feature we list the plan they belong to and whether the feature is frozen. A frozen feature is still enabled but cannot be changed or modified.\n","type":"array","items":{"$ref":"#/components/schemas/SiteFeature"}},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the site in the API","format":"uri"},"app":{"type":"string","description":"URL of the site in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the site. Only defined when site is published.","format":"uri"},"preview":{"type":"string","description":"URL of the preview version of the site.","format":"uri"},"login":{"type":"string","description":"URL of the login endpoint for visitors to authenticate with the site auth backend.\n","format":"uri"}},"required":["app","location","preview"]}},"required":["object","id","type","appliedType","title","visibility","permissionsModel","defaultLevel","published","createdAt","siteSpaces","features","urls"]},"SiteType":{"type":"string","description":"The type of the site","enum":["basic","premium","ultimate","sponsored","legacy-basic","legacy-premium"]},"SiteTitle":{"type":"string","description":"Title of the site","minLength":2,"maxLength":128},"CustomizationFavicon":{"oneOf":[{"type":"object","properties":{"icon":{"$ref":"#/components/schemas/CustomizationThemedURL"}},"required":["icon"]},{"type":"object","properties":{"emoji":{"$ref":"#/components/schemas/Emoji"}},"required":["emoji"]},{"type":"object","properties":{},"additionalProperties":false}]},"CustomizationThemedURL":{"type":"object","properties":{"light":{"$ref":"#/components/schemas/URL"},"dark":{"$ref":"#/components/schemas/URL"}},"required":["light","dark"]},"URL":{"type":"string","format":"uri","maxLength":2048},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"SiteHostname":{"type":"string","description":"Custom hostname for the site, for e.g. docs.mycompany.com","pattern":"^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?[.]){2,}[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$","maxLength":512},"SiteBasename":{"type":"string","description":"Basename for the site. For e.g. api","minLength":1,"maxLength":100},"SiteProxy":{"type":"object","properties":{"origin":{"$ref":"#/components/schemas/SiteProxyOrigin"},"target":{"type":"string","description":"The target URL to which the requests at the origin URL should be proxied to."}},"required":["origin","target"]},"SiteProxyOrigin":{"type":"string","description":"Proxy URL for the site, for e.g. company.com/docs or www.company.com/developer/docs etc.","pattern":"^([\\w-]+\\.)*[\\w-]+\\.[a-zA-Z]{2,}(\\/[\\w-]+)+$","maxLength":512},"SiteVisibility":{"type":"string","description":"The visibility setting of the site determines the audience of the site.\n* `public`: Anyone can access the site, and the site is indexed by search engines.\n* `unlisted`: Anyone can access the site, and the site is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the site.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the site.\n","enum":["public","unlisted","share-link","visitor-auth"]},"SitePermissionsModel":{"type":"string","description":"Permissions resolution mode for the site.","enum":["legacy","site"]},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"SiteAdaptiveContent":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether adaptive content should be enabled on the site."}},"required":["enabled"]},"SiteAds":{"oneOf":[{"type":"object","required":["status","submittable"],"properties":{"status":{"type":"string","enum":["pending"]},"submittable":{"type":"boolean","description":"True if the user can submit the site for review."}}},{"type":"object","required":["status","topic"],"properties":{"status":{"type":"string","enum":["in-review"]},"topic":{"$ref":"#/components/schemas/SiteAdsTopic"}}},{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["rejected"]},"reason":{"type":"string","description":"Reason for the rejection"}}},{"type":"object","required":["status","topic","zoneId"],"properties":{"status":{"type":"string","enum":["live","disabled"]},"topic":{"$ref":"#/components/schemas/SiteAdsTopic"},"zoneId":{"type":"string","description":"The ad network zone ID"}}}]},"SiteAdsTopic":{"type":"string","description":"Topic of the content","enum":["webdev","crypto"]},"SiteFeature":{"type":"object","description":"A site feature and the plan it is available on.","properties":{"id":{"$ref":"#/components/schemas/SiteFeatureKey"},"plan":{"$ref":"#/components/schemas/SiteType"},"frozen":{"description":"A frozen feature is still enabled but cannot be changed or modified.","type":"boolean"},"customizations":{"description":"A list of the actual advanced customizations used (only applicable for sites-advanced-customization)","type":"array","items":{"$ref":"#/components/schemas/SiteCustomizationFeature"}}},"required":["id","plan","frozen"]},"SiteFeatureKey":{"type":"string","description":"The site feature identifier","enum":["sites-adaptive-content","sites-advanced-customization","sites-advanced-insights","sites-ads","sites-ai-search","sites-ai-assistant","sites-connections","sites-channels","sites-embed","sites-api-playground","sites-basic-customization","sites-custom-domain","sites-custom-fonts","sites-custom-subdirectory","sites-full-text-search","sites-multivariant-site","sites-no-custom-domain","sites-page-feedback","sites-page-traffic-insights","sites-pdf-export","sites-preview-deployments","sites-public-visibility","sites-redirects","sites-search-insights","sites-sections","sites-seo","sites-share-links","sites-unlisted-visibility","sites-user-contribution","sites-visitor-authentication","sites-visitors"]},"SiteCustomizationFeature":{"type":"string","description":"A list of all premium customizations.","enum":["header-logo","header-primary-link","theme-preset","premium-fonts","custom-icons","footer-logo","footer-links","footer-copyright","semantic-colors"]}}},"paths":{"/integrations/{integrationName}/sites":{"get":{"operationId":"listIntegrationSiteInstallations","summary":"List all integration site installations","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"$ref":"#/components/parameters/listPage"},{"$ref":"#/components/parameters/listLimit"},{"name":"externalId","in":"query","description":"External ID to filter by","schema":{"type":"string"}},{"name":"extended","in":"query","description":"If true, returns the site object in each items. If false, returns the site ID in each items.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationSiteInstallation"}}}}]}}}}}}}}}
```

## PUT /integrations/{integrationName}/dev

> Enable integration dev mode

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}}},"responses":{"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[404]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/integrations/{integrationName}/dev":{"put":{"operationId":"setIntegrationDevelopmentMode","summary":"Enable integration dev mode","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tunnelUrl":{"type":"string","description":"URL of the tunnel to dispatch integration events to","minLength":1,"maxLength":256},"all":{"type":"boolean","default":false,"description":"If set to true, all requests will be forwarded to the tunnel, not just from the owning organization.\n"}},"required":["tunnelUrl"]}}}},"responses":{"204":{"description":"Updated development mode successfully"},"404":{"$ref":"#/components/responses/NotFoundError"}}}}}}
```

## DELETE /integrations/{integrationName}/dev

> Disable integration dev mode

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}}}},"paths":{"/integrations/{integrationName}/dev":{"delete":{"operationId":"disableIntegrationDevelopmentMode","summary":"Disable integration dev mode","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"}],"responses":{"205":{"description":"Disabled development mode successfully"}}}}}}
```

## GET /integrations/{integrationName}/render

> Render an integration UI with GET method

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}}},"schemas":{"ContentKitRenderOutput":{"type":"object","description":"Output of the integration when rendering a UI.","oneOf":[{"$ref":"#/components/schemas/ContentKitRenderOutputElement"},{"$ref":"#/components/schemas/ContentKitRenderOutputComplete"}]},"ContentKitRenderOutputElement":{"type":"object","description":"Output of type element in the lifecycle of the component.","properties":{"type":{"type":"string","enum":["element"]},"element":{"$ref":"#/components/schemas/ContentKitRootElement"},"state":{"type":"object"},"props":{"$ref":"#/components/schemas/PlainObject"}},"required":["element","state","props"]},"ContentKitRootElement":{"description":"Element used as root","oneOf":[{"$ref":"#/components/schemas/ContentKitBlock"},{"$ref":"#/components/schemas/ContentKitModal"},{"$ref":"#/components/schemas/ContentKitConfiguration"}],"discriminator":{"propertyName":"type"}},"ContentKitBlock":{"type":"object","description":"Higher level element to represent a custom block.","properties":{"type":{"type":"string","enum":["block"]},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"}},"controls":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/ContentKitBlockControl"},{"type":"array","items":{"$ref":"#/components/schemas/ContentKitBlockControl"}}]}}},"required":["type","children"]},"ContentKitDescendantElement":{"description":"Any element that can be used as children.","oneOf":[{"$ref":"#/components/schemas/ContentKitButton"},{"$ref":"#/components/schemas/ContentKitTextInput"},{"$ref":"#/components/schemas/ContentKitHStack"},{"$ref":"#/components/schemas/ContentKitVStack"},{"$ref":"#/components/schemas/ContentKitBox"},{"$ref":"#/components/schemas/ContentKitDivider"},{"$ref":"#/components/schemas/ContentKitWebFrame"},{"$ref":"#/components/schemas/ContentKitCodeBlock"},{"$ref":"#/components/schemas/ContentKitMarkdown"},{"$ref":"#/components/schemas/ContentKitCard"},{"$ref":"#/components/schemas/ContentKitImage"},{"$ref":"#/components/schemas/ContentKitInput"},{"$ref":"#/components/schemas/ContentKitSelect"},{"$ref":"#/components/schemas/ContentKitSwitch"},{"$ref":"#/components/schemas/ContentKitCheckbox"},{"$ref":"#/components/schemas/ContentKitRadio"},{"$ref":"#/components/schemas/ContentKitText"},{"$ref":"#/components/schemas/ContentKitHint"},{"$ref":"#/components/schemas/ContentKitLink"},{"$ref":"#/components/schemas/ContentKitStepperStep"}],"discriminator":{"propertyName":"type"}},"ContentKitButton":{"type":"object","description":"Pressable button triggering an action.","properties":{"type":{"type":"string","enum":["button"]},"style":{"type":"string","enum":["primary","secondary","danger"]},"onPress":{"$ref":"#/components/schemas/ContentKitAction"},"icon":{"$ref":"#/components/schemas/ContentKitIcon"},"trailingIcon":{"$ref":"#/components/schemas/ContentKitIcon"},"label":{"type":"string"},"tooltip":{"type":"string"},"confirm":{"$ref":"#/components/schemas/ContentKitConfirm"},"disabled":{"type":"boolean"}},"required":["type","onPress"]},"ContentKitAction":{"anyOf":[{"type":"object","description":"Custom action to re-render the block.","properties":{"action":{"type":"string"}},"additionalProperties":true,"required":["action"]},{"$ref":"#/components/schemas/ContentKitDefaultAction"}]},"ContentKitDefaultAction":{"oneOf":[{"type":"object","description":"Action to open an overlay modal defined by \"componentId\".","properties":{"action":{"type":"string","enum":["@ui.modal.open"]},"componentId":{"type":"string"},"props":{"$ref":"#/components/schemas/PlainObject"}},"required":["action","componentId","props"]},{"type":"object","description":"Action when a modal overlay is closed, with a return value to the higher level component in the stack. This action will be triggered on the parent component instance.","properties":{"action":{"type":"string","enum":["@ui.modal.close"]},"returnValue":{"$ref":"#/components/schemas/PlainObject"}},"required":["action","returnValue"]},{"type":"object","description":"Action to open an url.","properties":{"action":{"type":"string","enum":["@ui.url.open"]},"url":{"type":"string"}},"required":["action","url"]},{"type":"object","description":"Action when a link is being unfurled into a block.","properties":{"action":{"type":"string","enum":["@link.unfurl"]},"url":{"type":"string"}},"required":["action","url"]},{"type":"object","description":"Action to update the properties stored in the related node.","properties":{"action":{"type":"string","enum":["@editor.node.updateProps"]},"props":{"$ref":"#/components/schemas/PlainObject"}},"required":["action","props"]}]},"PlainObject":{"properties":{},"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/PlainObject"},{"type":"string"},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"number"},{"$ref":"#/components/schemas/PlainObject"}]}}]}},"ContentKitIcon":{"type":"string","enum":["close","edit","github","gitlab","maximize","email","settings","search","delete","star","warning","link","link-external","eye","eye-off","lock","check","check-circle"]},"ContentKitConfirm":{"type":"object","description":"A confirm object that defines an optional confirmation dialog after the input is clicked.","properties":{"title":{"type":"string","description":"A text value that defines the dialog's title.","maxLength":100},"text":{"type":"string","description":"A text value that defines the explanatory text that appears in the confirm dialog.","maxLength":300},"confirm":{"type":"string","description":"A text value to define the text of the button that confirms the action.","maxLength":30},"style":{"type":"string","enum":["primary","danger"]}},"required":["title","text","confirm"]},"ContentKitTextInput":{"type":"object","description":"Text input to prompt the user.","properties":{"type":{"type":"string","enum":["textinput"]},"disabled":{"type":"boolean"},"state":{"description":"State binding. The value of the input will be stored as a property in the state named after this ID.","type":"string"},"initialValue":{"description":"Text value to initialize the input with.","type":"string"},"placeholder":{"description":"Text that appears in the form control when it has no value set","type":"string"},"multiline":{"type":"boolean"},"inputType":{"type":"string","enum":["text","password","email"],"default":"text"}},"required":["type","state"]},"ContentKitHStack":{"type":"object","description":"Horizontal stack of boxes.","properties":{"type":{"type":"string","enum":["hstack"]},"align":{"type":"string","default":"start","enum":["start","center","end"]},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"}}},"required":["type","children"]},"ContentKitVStack":{"type":"object","description":"Vertical stack of boxes.","properties":{"type":{"type":"string","enum":["vstack"]},"align":{"type":"string","default":"start","enum":["start","center","end"]},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"}}},"required":["type","children"]},"ContentKitBox":{"type":"object","properties":{"type":{"type":"string","enum":["box"]},"grow":{"description":"specifies how much of the remaining space in the container should be assigned to the element","type":"number"},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"}}},"required":["type","children"]},"ContentKitDivider":{"type":"object","description":"Divider between 2 boxes in a stack.","properties":{"type":{"type":"string","enum":["divider"]},"size":{"type":"string","enum":["small","medium","large"]}},"required":["type"]},"ContentKitWebFrame":{"type":"object","description":"Frame for a webpage","properties":{"type":{"type":"string","enum":["webframe"]},"aspectRatio":{"type":"number","description":"Ratio between width and height. Used to size the webframe."},"source":{"type":"object","description":"Content to load in the frame.","properties":{"url":{"type":"string"}},"required":["url"]},"buttons":{"type":"array","description":"Controls button shown as an overlay in a corner of the frame.","items":{"$ref":"#/components/schemas/ContentKitButton"}},"data":{"type":"object","description":"Data to communicated to the webframe's content. Each state update will cause the webframe to receive a message.","additionalProperties":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentKitDynamicBinding"}]}}},"required":["type","source"]},"ContentKitDynamicBinding":{"type":"object","description":"Binding between a property and a state value.","properties":{"$state":{"type":"string","description":"Key in the state"}},"required":["$state"]},"ContentKitCodeBlock":{"type":"object","description":"Code block with syntax highlighting","properties":{"type":{"type":"string","enum":["codeblock"]},"content":{"oneOf":[{"$ref":"#/components/schemas/ContentKitDynamicBinding"},{"type":"string","description":"Code content to display"}]},"syntax":{"description":"Syntax to use for highlighting (ex: javascript, python)","type":"string"},"lineNumbers":{"oneOf":[{"type":"boolean"},{"type":"number","description":"Line number to start at."}]},"buttons":{"type":"array","description":"Controls button shown as an overlay in a corner of the code block.","items":{"$ref":"#/components/schemas/ContentKitButton"}},"state":{"description":"State binding when editable. The value of the input will be stored as a property in the state named after this ID.","type":"string"},"onContentChange":{"$ref":"#/components/schemas/ContentKitAction"},"header":{"type":"array","description":"Header displayed before the code lines","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"}},"footer":{"type":"array","description":"Footer displayed after the code lines","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"}}},"required":["type","content"]},"ContentKitMarkdown":{"type":"object","description":"Block with rich text formatting of a markdown content.","properties":{"type":{"type":"string","enum":["markdown"]},"content":{"oneOf":[{"$ref":"#/components/schemas/ContentKitDynamicBinding"},{"type":"string","description":"Markdown content to display"}]}},"required":["type","content"]},"ContentKitCard":{"type":"object","properties":{"type":{"type":"string","enum":["card"]},"title":{"type":"string"},"hint":{"oneOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/ContentKitInlineElement"}}]},"icon":{"oneOf":[{"$ref":"#/components/schemas/ContentKitIcon"},{"$ref":"#/components/schemas/ContentKitImage"}]},"onPress":{"$ref":"#/components/schemas/ContentKitAction"},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"}},"buttons":{"type":"array","description":"Buttons displayed in the top right corner of the card.","items":{"$ref":"#/components/schemas/ContentKitButton"}}},"required":["type"]},"ContentKitInlineElement":{"description":"Any element that is inline.","oneOf":[{"$ref":"#/components/schemas/ContentKitText"},{"$ref":"#/components/schemas/ContentKitImage"},{"$ref":"#/components/schemas/ContentKitLink"}],"discriminator":{"propertyName":"type"}},"ContentKitText":{"type":"object","description":"Low level text element.","properties":{"type":{"type":"string","enum":["text"]},"style":{"type":"string","enum":["bold","italic","code","strikethrough"]},"children":{"oneOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentKitText"},{"$ref":"#/components/schemas/ContentKitLink"}]}}]}},"required":["type","children"]},"ContentKitLink":{"type":"object","properties":{"type":{"type":"string","enum":["link"]},"target":{"type":"object","properties":{"url":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentKitURL"}]}},"required":["url"]},"children":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["type","target","children"]},"ContentKitURL":{"type":"object","description":"Specification for an URL in ContentKit.","properties":{"host":{"type":"string","description":"Hostname of the URL along with the port number if required."},"pathname":{"type":"string","description":"Path of the URL prefixed with a `/`."},"query":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentKitDynamicBinding"}]}}},"required":["host","pathname"]},"ContentKitImage":{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]},"aspectRatio":{"type":"number"}},"required":["type","source","aspectRatio"]},"ContentKitInput":{"type":"object","description":"Field for an input.","properties":{"type":{"type":"string","enum":["input"]},"label":{"type":"string","description":"Text label displayed next to the input."},"hint":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentKitInlineElement"}]},"element":{"oneOf":[{"$ref":"#/components/schemas/ContentKitTextInput"},{"$ref":"#/components/schemas/ContentKitSelect"},{"$ref":"#/components/schemas/ContentKitSwitch"},{"$ref":"#/components/schemas/ContentKitRadio"},{"$ref":"#/components/schemas/ContentKitCheckbox"},{"$ref":"#/components/schemas/ContentKitButton"},{"$ref":"#/components/schemas/ContentKitCodeBlock"}]}},"required":["type","label","element"]},"ContentKitSelect":{"type":"object","description":"Creates a drop down menu with a list of options for a user to choose.","properties":{"type":{"type":"string","enum":["select"]},"disabled":{"type":"boolean"},"state":{"description":"State binding. The value of the input will be stored as a property in the state named after this ID.","type":"string"},"initialValue":{"description":"Value to initialize the select with.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"onValueChange":{"$ref":"#/components/schemas/ContentKitAction"},"placeholder":{"description":"Text that appears in the form control when it has no value set","type":"string"},"multiple":{"description":"Should the select accept the selection of multiple options. If true, the state will be an array.","type":"boolean"},"acceptInput":{"description":"Should the filter input be allowed to be selected as an option.","type":"boolean"},"options":{"description":"Options to be displayed in the select.","oneOf":[{"$ref":"#/components/schemas/ContentKitBuiltInSource"},{"type":"array","description":"Static list of options","items":{"$ref":"#/components/schemas/ContentKitSelectOption"}},{"type":"object","properties":{"url":{"oneOf":[{"type":"string","description":"External source of options. The URL should respond with an array of options."},{"$ref":"#/components/schemas/ContentKitURL"}]}},"required":["url"]}]}},"required":["type","state","options"]},"ContentKitBuiltInSource":{"type":"object","description":"Built-in sources that can be used to provide a ContentKitSelect.","properties":{"source":{"type":"string","enum":["openapi"]}},"required":["source"]},"ContentKitSelectOption":{"type":"object","description":"An individual option in a select element","properties":{"id":{"type":"string"},"label":{"type":"string"},"icon":{"oneOf":[{"$ref":"#/components/schemas/ContentKitIcon"},{"$ref":"#/components/schemas/ContentKitImage"}]}},"required":["id","label"]},"ContentKitSwitch":{"type":"object","description":"Renders a boolean input.","properties":{"type":{"type":"string","enum":["switch"]},"disabled":{"type":"boolean"},"state":{"description":"State binding. The value of the input will be stored as a property in the state named after this ID.","type":"string"},"initialValue":{"description":"Value to initialize the switch with.","type":"boolean"},"onValueChange":{"$ref":"#/components/schemas/ContentKitAction"},"confirm":{"$ref":"#/components/schemas/ContentKitConfirm"}},"required":["type","state"]},"ContentKitRadio":{"type":"object","properties":{"type":{"type":"string","enum":["radio"]},"disabled":{"type":"boolean"},"state":{"description":"State binding. The value of the input will be stored as a property in the state named after this ID.","type":"string"},"value":{"description":"Value to store in th state when the checkbox is selected.","oneOf":[{"type":"string"},{"type":"number"}]},"confirm":{"$ref":"#/components/schemas/ContentKitConfirm"}},"required":["type","state","value"]},"ContentKitCheckbox":{"type":"object","properties":{"type":{"type":"string","enum":["checkbox"]},"state":{"description":"State binding. The value of the input will be stored as a property in the state named after this ID.","type":"string"},"value":{"description":"Value to store in a state array when the checkbox is selected.","oneOf":[{"type":"string"},{"type":"number"}]},"confirm":{"$ref":"#/components/schemas/ContentKitConfirm"}},"required":["type","state","value"]},"ContentKitHint":{"type":"object","description":"Element used to contextualize other elements or info.","properties":{"type":{"type":"string","enum":["hint"]},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitInlineElement"}}},"required":["type","children"]},"ContentKitStepperStep":{"type":"object","properties":{"type":{"type":"string","enum":["step"]},"id":{"description":"unique identifier for the step","type":"string"},"title":{"description":"title of the step","type":"string","maxLength":50},"next":{"description":"indicates if the user can progress to the next step based on some internal validation or condition","type":"boolean","default":false},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"},"minItems":1}},"required":["type","id","children"]},"ContentKitBlockControl":{"type":"object","description":"Control menu item displayed for the block.","properties":{"icon":{"$ref":"#/components/schemas/ContentKitIcon"},"label":{"type":"string"},"onPress":{"$ref":"#/components/schemas/ContentKitAction"},"confirm":{"$ref":"#/components/schemas/ContentKitConfirm"}},"required":["label","onPress"]},"ContentKitModal":{"type":"object","description":"Overlay modal.","properties":{"type":{"type":"string","enum":["modal"]},"title":{"type":"string"},"subtitle":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitInlineElement"}},"size":{"type":"string","enum":["medium","xlarge","fullscreen"]},"returnValue":{"description":"Data passed back to the parent view when the modal is closed. These data are accessible in the \"@ui.modal.close\"","type":"object"},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"}},"submit":{"$ref":"#/components/schemas/ContentKitButton"}},"required":["type","children"]},"ContentKitConfiguration":{"type":"object","description":"Higher level element to define a configuration block. Does not add any UI elements or wrappers. Must be used as a top level element for any configuration component.","properties":{"type":{"type":"string","enum":["configuration"]},"children":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/ContentKitStepper"},"minItems":1,"maxItems":1},{"type":"array","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"},"minItems":1}]}},"required":["type","children"]},"ContentKitStepper":{"type":"object","properties":{"type":{"type":"string","enum":["stepper"]},"activeStep":{"type":"string","description":"id of the currently active step"},"onStepChange":{"$ref":"#/components/schemas/ContentKitAction"},"onComplete":{"$ref":"#/components/schemas/ContentKitAction"},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitStepperStep"},"minItems":1}},"required":["type","activeStep","onStepChange","onComplete","children"]},"ContentKitRenderOutputComplete":{"type":"object","description":"Output of completed lifecycle of the component.","properties":{"type":{"type":"string","enum":["complete"]},"returnValue":{"type":"object"}},"required":["type"]}}},"paths":{"/integrations/{integrationName}/render":{"get":{"operationId":"renderIntegrationUIWithGet","summary":"Render an integration UI with GET method","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"name":"request","in":"query","required":true,"description":"LZ-string compressed JSON request","schema":{"type":"string"}}],"responses":{"200":{"description":"ContentKit element to render","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentKitRenderOutput"}}},"headers":{"Cache-Control":{"schema":{"type":"string"}}}}}}}}}
```

## POST /integrations/{integrationName}/render

> Render an integration UI with POST method

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}}},"schemas":{"ContentKitRenderOutput":{"type":"object","description":"Output of the integration when rendering a UI.","oneOf":[{"$ref":"#/components/schemas/ContentKitRenderOutputElement"},{"$ref":"#/components/schemas/ContentKitRenderOutputComplete"}]},"ContentKitRenderOutputElement":{"type":"object","description":"Output of type element in the lifecycle of the component.","properties":{"type":{"type":"string","enum":["element"]},"element":{"$ref":"#/components/schemas/ContentKitRootElement"},"state":{"type":"object"},"props":{"$ref":"#/components/schemas/PlainObject"}},"required":["element","state","props"]},"ContentKitRootElement":{"description":"Element used as root","oneOf":[{"$ref":"#/components/schemas/ContentKitBlock"},{"$ref":"#/components/schemas/ContentKitModal"},{"$ref":"#/components/schemas/ContentKitConfiguration"}],"discriminator":{"propertyName":"type"}},"ContentKitBlock":{"type":"object","description":"Higher level element to represent a custom block.","properties":{"type":{"type":"string","enum":["block"]},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"}},"controls":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/ContentKitBlockControl"},{"type":"array","items":{"$ref":"#/components/schemas/ContentKitBlockControl"}}]}}},"required":["type","children"]},"ContentKitDescendantElement":{"description":"Any element that can be used as children.","oneOf":[{"$ref":"#/components/schemas/ContentKitButton"},{"$ref":"#/components/schemas/ContentKitTextInput"},{"$ref":"#/components/schemas/ContentKitHStack"},{"$ref":"#/components/schemas/ContentKitVStack"},{"$ref":"#/components/schemas/ContentKitBox"},{"$ref":"#/components/schemas/ContentKitDivider"},{"$ref":"#/components/schemas/ContentKitWebFrame"},{"$ref":"#/components/schemas/ContentKitCodeBlock"},{"$ref":"#/components/schemas/ContentKitMarkdown"},{"$ref":"#/components/schemas/ContentKitCard"},{"$ref":"#/components/schemas/ContentKitImage"},{"$ref":"#/components/schemas/ContentKitInput"},{"$ref":"#/components/schemas/ContentKitSelect"},{"$ref":"#/components/schemas/ContentKitSwitch"},{"$ref":"#/components/schemas/ContentKitCheckbox"},{"$ref":"#/components/schemas/ContentKitRadio"},{"$ref":"#/components/schemas/ContentKitText"},{"$ref":"#/components/schemas/ContentKitHint"},{"$ref":"#/components/schemas/ContentKitLink"},{"$ref":"#/components/schemas/ContentKitStepperStep"}],"discriminator":{"propertyName":"type"}},"ContentKitButton":{"type":"object","description":"Pressable button triggering an action.","properties":{"type":{"type":"string","enum":["button"]},"style":{"type":"string","enum":["primary","secondary","danger"]},"onPress":{"$ref":"#/components/schemas/ContentKitAction"},"icon":{"$ref":"#/components/schemas/ContentKitIcon"},"trailingIcon":{"$ref":"#/components/schemas/ContentKitIcon"},"label":{"type":"string"},"tooltip":{"type":"string"},"confirm":{"$ref":"#/components/schemas/ContentKitConfirm"},"disabled":{"type":"boolean"}},"required":["type","onPress"]},"ContentKitAction":{"anyOf":[{"type":"object","description":"Custom action to re-render the block.","properties":{"action":{"type":"string"}},"additionalProperties":true,"required":["action"]},{"$ref":"#/components/schemas/ContentKitDefaultAction"}]},"ContentKitDefaultAction":{"oneOf":[{"type":"object","description":"Action to open an overlay modal defined by \"componentId\".","properties":{"action":{"type":"string","enum":["@ui.modal.open"]},"componentId":{"type":"string"},"props":{"$ref":"#/components/schemas/PlainObject"}},"required":["action","componentId","props"]},{"type":"object","description":"Action when a modal overlay is closed, with a return value to the higher level component in the stack. This action will be triggered on the parent component instance.","properties":{"action":{"type":"string","enum":["@ui.modal.close"]},"returnValue":{"$ref":"#/components/schemas/PlainObject"}},"required":["action","returnValue"]},{"type":"object","description":"Action to open an url.","properties":{"action":{"type":"string","enum":["@ui.url.open"]},"url":{"type":"string"}},"required":["action","url"]},{"type":"object","description":"Action when a link is being unfurled into a block.","properties":{"action":{"type":"string","enum":["@link.unfurl"]},"url":{"type":"string"}},"required":["action","url"]},{"type":"object","description":"Action to update the properties stored in the related node.","properties":{"action":{"type":"string","enum":["@editor.node.updateProps"]},"props":{"$ref":"#/components/schemas/PlainObject"}},"required":["action","props"]}]},"PlainObject":{"properties":{},"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/PlainObject"},{"type":"string"},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"number"},{"$ref":"#/components/schemas/PlainObject"}]}}]}},"ContentKitIcon":{"type":"string","enum":["close","edit","github","gitlab","maximize","email","settings","search","delete","star","warning","link","link-external","eye","eye-off","lock","check","check-circle"]},"ContentKitConfirm":{"type":"object","description":"A confirm object that defines an optional confirmation dialog after the input is clicked.","properties":{"title":{"type":"string","description":"A text value that defines the dialog's title.","maxLength":100},"text":{"type":"string","description":"A text value that defines the explanatory text that appears in the confirm dialog.","maxLength":300},"confirm":{"type":"string","description":"A text value to define the text of the button that confirms the action.","maxLength":30},"style":{"type":"string","enum":["primary","danger"]}},"required":["title","text","confirm"]},"ContentKitTextInput":{"type":"object","description":"Text input to prompt the user.","properties":{"type":{"type":"string","enum":["textinput"]},"disabled":{"type":"boolean"},"state":{"description":"State binding. The value of the input will be stored as a property in the state named after this ID.","type":"string"},"initialValue":{"description":"Text value to initialize the input with.","type":"string"},"placeholder":{"description":"Text that appears in the form control when it has no value set","type":"string"},"multiline":{"type":"boolean"},"inputType":{"type":"string","enum":["text","password","email"],"default":"text"}},"required":["type","state"]},"ContentKitHStack":{"type":"object","description":"Horizontal stack of boxes.","properties":{"type":{"type":"string","enum":["hstack"]},"align":{"type":"string","default":"start","enum":["start","center","end"]},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"}}},"required":["type","children"]},"ContentKitVStack":{"type":"object","description":"Vertical stack of boxes.","properties":{"type":{"type":"string","enum":["vstack"]},"align":{"type":"string","default":"start","enum":["start","center","end"]},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"}}},"required":["type","children"]},"ContentKitBox":{"type":"object","properties":{"type":{"type":"string","enum":["box"]},"grow":{"description":"specifies how much of the remaining space in the container should be assigned to the element","type":"number"},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"}}},"required":["type","children"]},"ContentKitDivider":{"type":"object","description":"Divider between 2 boxes in a stack.","properties":{"type":{"type":"string","enum":["divider"]},"size":{"type":"string","enum":["small","medium","large"]}},"required":["type"]},"ContentKitWebFrame":{"type":"object","description":"Frame for a webpage","properties":{"type":{"type":"string","enum":["webframe"]},"aspectRatio":{"type":"number","description":"Ratio between width and height. Used to size the webframe."},"source":{"type":"object","description":"Content to load in the frame.","properties":{"url":{"type":"string"}},"required":["url"]},"buttons":{"type":"array","description":"Controls button shown as an overlay in a corner of the frame.","items":{"$ref":"#/components/schemas/ContentKitButton"}},"data":{"type":"object","description":"Data to communicated to the webframe's content. Each state update will cause the webframe to receive a message.","additionalProperties":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentKitDynamicBinding"}]}}},"required":["type","source"]},"ContentKitDynamicBinding":{"type":"object","description":"Binding between a property and a state value.","properties":{"$state":{"type":"string","description":"Key in the state"}},"required":["$state"]},"ContentKitCodeBlock":{"type":"object","description":"Code block with syntax highlighting","properties":{"type":{"type":"string","enum":["codeblock"]},"content":{"oneOf":[{"$ref":"#/components/schemas/ContentKitDynamicBinding"},{"type":"string","description":"Code content to display"}]},"syntax":{"description":"Syntax to use for highlighting (ex: javascript, python)","type":"string"},"lineNumbers":{"oneOf":[{"type":"boolean"},{"type":"number","description":"Line number to start at."}]},"buttons":{"type":"array","description":"Controls button shown as an overlay in a corner of the code block.","items":{"$ref":"#/components/schemas/ContentKitButton"}},"state":{"description":"State binding when editable. The value of the input will be stored as a property in the state named after this ID.","type":"string"},"onContentChange":{"$ref":"#/components/schemas/ContentKitAction"},"header":{"type":"array","description":"Header displayed before the code lines","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"}},"footer":{"type":"array","description":"Footer displayed after the code lines","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"}}},"required":["type","content"]},"ContentKitMarkdown":{"type":"object","description":"Block with rich text formatting of a markdown content.","properties":{"type":{"type":"string","enum":["markdown"]},"content":{"oneOf":[{"$ref":"#/components/schemas/ContentKitDynamicBinding"},{"type":"string","description":"Markdown content to display"}]}},"required":["type","content"]},"ContentKitCard":{"type":"object","properties":{"type":{"type":"string","enum":["card"]},"title":{"type":"string"},"hint":{"oneOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/ContentKitInlineElement"}}]},"icon":{"oneOf":[{"$ref":"#/components/schemas/ContentKitIcon"},{"$ref":"#/components/schemas/ContentKitImage"}]},"onPress":{"$ref":"#/components/schemas/ContentKitAction"},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"}},"buttons":{"type":"array","description":"Buttons displayed in the top right corner of the card.","items":{"$ref":"#/components/schemas/ContentKitButton"}}},"required":["type"]},"ContentKitInlineElement":{"description":"Any element that is inline.","oneOf":[{"$ref":"#/components/schemas/ContentKitText"},{"$ref":"#/components/schemas/ContentKitImage"},{"$ref":"#/components/schemas/ContentKitLink"}],"discriminator":{"propertyName":"type"}},"ContentKitText":{"type":"object","description":"Low level text element.","properties":{"type":{"type":"string","enum":["text"]},"style":{"type":"string","enum":["bold","italic","code","strikethrough"]},"children":{"oneOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentKitText"},{"$ref":"#/components/schemas/ContentKitLink"}]}}]}},"required":["type","children"]},"ContentKitLink":{"type":"object","properties":{"type":{"type":"string","enum":["link"]},"target":{"type":"object","properties":{"url":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentKitURL"}]}},"required":["url"]},"children":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["type","target","children"]},"ContentKitURL":{"type":"object","description":"Specification for an URL in ContentKit.","properties":{"host":{"type":"string","description":"Hostname of the URL along with the port number if required."},"pathname":{"type":"string","description":"Path of the URL prefixed with a `/`."},"query":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentKitDynamicBinding"}]}}},"required":["host","pathname"]},"ContentKitImage":{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]},"aspectRatio":{"type":"number"}},"required":["type","source","aspectRatio"]},"ContentKitInput":{"type":"object","description":"Field for an input.","properties":{"type":{"type":"string","enum":["input"]},"label":{"type":"string","description":"Text label displayed next to the input."},"hint":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentKitInlineElement"}]},"element":{"oneOf":[{"$ref":"#/components/schemas/ContentKitTextInput"},{"$ref":"#/components/schemas/ContentKitSelect"},{"$ref":"#/components/schemas/ContentKitSwitch"},{"$ref":"#/components/schemas/ContentKitRadio"},{"$ref":"#/components/schemas/ContentKitCheckbox"},{"$ref":"#/components/schemas/ContentKitButton"},{"$ref":"#/components/schemas/ContentKitCodeBlock"}]}},"required":["type","label","element"]},"ContentKitSelect":{"type":"object","description":"Creates a drop down menu with a list of options for a user to choose.","properties":{"type":{"type":"string","enum":["select"]},"disabled":{"type":"boolean"},"state":{"description":"State binding. The value of the input will be stored as a property in the state named after this ID.","type":"string"},"initialValue":{"description":"Value to initialize the select with.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"onValueChange":{"$ref":"#/components/schemas/ContentKitAction"},"placeholder":{"description":"Text that appears in the form control when it has no value set","type":"string"},"multiple":{"description":"Should the select accept the selection of multiple options. If true, the state will be an array.","type":"boolean"},"acceptInput":{"description":"Should the filter input be allowed to be selected as an option.","type":"boolean"},"options":{"description":"Options to be displayed in the select.","oneOf":[{"$ref":"#/components/schemas/ContentKitBuiltInSource"},{"type":"array","description":"Static list of options","items":{"$ref":"#/components/schemas/ContentKitSelectOption"}},{"type":"object","properties":{"url":{"oneOf":[{"type":"string","description":"External source of options. The URL should respond with an array of options."},{"$ref":"#/components/schemas/ContentKitURL"}]}},"required":["url"]}]}},"required":["type","state","options"]},"ContentKitBuiltInSource":{"type":"object","description":"Built-in sources that can be used to provide a ContentKitSelect.","properties":{"source":{"type":"string","enum":["openapi"]}},"required":["source"]},"ContentKitSelectOption":{"type":"object","description":"An individual option in a select element","properties":{"id":{"type":"string"},"label":{"type":"string"},"icon":{"oneOf":[{"$ref":"#/components/schemas/ContentKitIcon"},{"$ref":"#/components/schemas/ContentKitImage"}]}},"required":["id","label"]},"ContentKitSwitch":{"type":"object","description":"Renders a boolean input.","properties":{"type":{"type":"string","enum":["switch"]},"disabled":{"type":"boolean"},"state":{"description":"State binding. The value of the input will be stored as a property in the state named after this ID.","type":"string"},"initialValue":{"description":"Value to initialize the switch with.","type":"boolean"},"onValueChange":{"$ref":"#/components/schemas/ContentKitAction"},"confirm":{"$ref":"#/components/schemas/ContentKitConfirm"}},"required":["type","state"]},"ContentKitRadio":{"type":"object","properties":{"type":{"type":"string","enum":["radio"]},"disabled":{"type":"boolean"},"state":{"description":"State binding. The value of the input will be stored as a property in the state named after this ID.","type":"string"},"value":{"description":"Value to store in th state when the checkbox is selected.","oneOf":[{"type":"string"},{"type":"number"}]},"confirm":{"$ref":"#/components/schemas/ContentKitConfirm"}},"required":["type","state","value"]},"ContentKitCheckbox":{"type":"object","properties":{"type":{"type":"string","enum":["checkbox"]},"state":{"description":"State binding. The value of the input will be stored as a property in the state named after this ID.","type":"string"},"value":{"description":"Value to store in a state array when the checkbox is selected.","oneOf":[{"type":"string"},{"type":"number"}]},"confirm":{"$ref":"#/components/schemas/ContentKitConfirm"}},"required":["type","state","value"]},"ContentKitHint":{"type":"object","description":"Element used to contextualize other elements or info.","properties":{"type":{"type":"string","enum":["hint"]},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitInlineElement"}}},"required":["type","children"]},"ContentKitStepperStep":{"type":"object","properties":{"type":{"type":"string","enum":["step"]},"id":{"description":"unique identifier for the step","type":"string"},"title":{"description":"title of the step","type":"string","maxLength":50},"next":{"description":"indicates if the user can progress to the next step based on some internal validation or condition","type":"boolean","default":false},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"},"minItems":1}},"required":["type","id","children"]},"ContentKitBlockControl":{"type":"object","description":"Control menu item displayed for the block.","properties":{"icon":{"$ref":"#/components/schemas/ContentKitIcon"},"label":{"type":"string"},"onPress":{"$ref":"#/components/schemas/ContentKitAction"},"confirm":{"$ref":"#/components/schemas/ContentKitConfirm"}},"required":["label","onPress"]},"ContentKitModal":{"type":"object","description":"Overlay modal.","properties":{"type":{"type":"string","enum":["modal"]},"title":{"type":"string"},"subtitle":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitInlineElement"}},"size":{"type":"string","enum":["medium","xlarge","fullscreen"]},"returnValue":{"description":"Data passed back to the parent view when the modal is closed. These data are accessible in the \"@ui.modal.close\"","type":"object"},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"}},"submit":{"$ref":"#/components/schemas/ContentKitButton"}},"required":["type","children"]},"ContentKitConfiguration":{"type":"object","description":"Higher level element to define a configuration block. Does not add any UI elements or wrappers. Must be used as a top level element for any configuration component.","properties":{"type":{"type":"string","enum":["configuration"]},"children":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/ContentKitStepper"},"minItems":1,"maxItems":1},{"type":"array","items":{"$ref":"#/components/schemas/ContentKitDescendantElement"},"minItems":1}]}},"required":["type","children"]},"ContentKitStepper":{"type":"object","properties":{"type":{"type":"string","enum":["stepper"]},"activeStep":{"type":"string","description":"id of the currently active step"},"onStepChange":{"$ref":"#/components/schemas/ContentKitAction"},"onComplete":{"$ref":"#/components/schemas/ContentKitAction"},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentKitStepperStep"},"minItems":1}},"required":["type","activeStep","onStepChange","onComplete","children"]},"ContentKitRenderOutputComplete":{"type":"object","description":"Output of completed lifecycle of the component.","properties":{"type":{"type":"string","enum":["complete"]},"returnValue":{"type":"object"}},"required":["type"]},"RenderIntegrationUI":{"type":"object","properties":{"componentId":{"type":"string","description":"ID of the component to render in the integration."},"props":{"description":"Current properties of the UI.","$ref":"#/components/schemas/PlainObject"},"state":{"type":"object","description":"Current local state of the UI."},"context":{"$ref":"#/components/schemas/ContentKitContext"},"action":{"$ref":"#/components/schemas/ContentKitAction"}},"required":["componentId","props","context"]},"ContentKitContext":{"description":"Object representing the context in which a ContentKit component is rendered.","oneOf":[{"$ref":"#/components/schemas/ContentKitContextConfigurationAccount"},{"$ref":"#/components/schemas/ContentKitContextConfigurationSpace"},{"$ref":"#/components/schemas/ContentKitContextConfigurationSite"},{"$ref":"#/components/schemas/ContentKitContextConfigurationContentSource"},{"$ref":"#/components/schemas/ContentKitContextDocument"}]},"ContentKitContextConfigurationAccount":{"allOf":[{"$ref":"#/components/schemas/ContentKitContextBase"},{"type":"object","description":"Context while rendering in an account installation's configuration.","properties":{"type":{"type":"string","enum":["configuration_account"]},"organizationId":{"type":"string","description":"ID of the organization the account installation configuration is in."}},"required":["type","organizationId"]}]},"ContentKitContextBase":{"type":"object","description":"Common properties for ContentKit context.","properties":{"theme":{"type":"string","enum":["dark","light"]}},"required":["theme"]},"ContentKitContextConfigurationSpace":{"allOf":[{"$ref":"#/components/schemas/ContentKitContextBase"},{"type":"object","description":"Context while rendering in a space-installation's configuration.","properties":{"type":{"type":"string","enum":["configuration_space"]},"spaceId":{"type":"string","description":"ID of the space the space-installation configuration is in."}},"required":["type","spaceId"]}]},"ContentKitContextConfigurationSite":{"allOf":[{"$ref":"#/components/schemas/ContentKitContextBase"},{"type":"object","description":"Context while rendering in a site-installation's configuration.","properties":{"type":{"type":"string","enum":["configuration_site"]},"siteId":{"type":"string","description":"ID of the site the site-installation configuration is in."}},"required":["type","siteId"]}]},"ContentKitContextConfigurationContentSource":{"allOf":[{"$ref":"#/components/schemas/ContentKitContextBase"},{"type":"object","description":"Context while rendering the configuration flow of a content source.","properties":{"type":{"type":"string","enum":["configuration_contentsource"]},"organizationId":{"type":"string","description":"ID of the organization the content source installation configuration is in."},"spaceId":{"type":"string","description":"Optional ID of the space the content source installation configuration is in."}},"required":["type","organizationId"]}]},"ContentKitContextDocument":{"allOf":[{"$ref":"#/components/schemas/ContentKitContextBase"},{"type":"object","description":"Context while rendering in a document.","properties":{"type":{"type":"string","enum":["document"]},"spaceId":{"type":"string","description":"ID of the space content the document is in."},"editable":{"type":"boolean"}},"required":["type","spaceId","editable"]}]}}},"paths":{"/integrations/{integrationName}/render":{"post":{"operationId":"renderIntegrationUIWithPost","summary":"Render an integration UI with POST method","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"}],"responses":{"200":{"description":"ContentKit element to render","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentKitRenderOutput"}}},"headers":{"Cache-Control":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderIntegrationUI"}}}}}}}}
```

## POST /integrations/{integrationName}/tasks

> Queue an integration task

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"integration":[]}],"components":{"securitySchemes":{"integration":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}}},"responses":{"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[404]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/integrations/{integrationName}/tasks":{"post":{"operationId":"queueIntegrationTask","summary":"Queue an integration task","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"object","description":"Payload for the integration task"},"schedule":{"type":"number","description":"Number of seconds to wait before executing the task, defaults to 0","minimum":0,"maximum":86400}},"required":["task"]}}}},"responses":{"204":{"description":"Integration task created successfully"},"404":{"$ref":"#/components/responses/NotFoundError"}}}}}}
```

## GET /integrations/{integrationName}/installations/{installationId}

> Get an integration installation by its ID

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"installationId":{"name":"installationId","in":"path","required":true,"description":"Identifier of the installation","schema":{"type":"string"}}},"schemas":{"IntegrationInstallation":{"type":"object","description":"Installation of an integration on an account","properties":{"id":{"type":"string"},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"space_selection":{"$ref":"#/components/schemas/IntegrationInstallationSpaceSelection"},"site_selection":{"$ref":"#/components/schemas/IntegrationInstallationSiteSelection"},"spaces":{"type":"number","description":"Count of spaces, the installation is managing"},"configuration":{"$ref":"#/components/schemas/IntegrationInstallationConfiguration"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the installation in the API","format":"uri"},"app":{"type":"string","description":"URL of the integration's installation in the application","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration's installation","format":"uri"}},"required":["location","app","publicEndpoint"]},"externalIds":{"$ref":"#/components/schemas/IntegrationInstallationExternalIds"},"target":{"$ref":"#/components/schemas/IntegrationInstallationTarget","description":"Target of the integration installation"},"network":{"$ref":"#/components/schemas/IntegrationNetwork","description":"Network configuration for the installation"}},"required":["id","status","space_selection","site_selection","spaces","configuration","urls","externalIds","target","createdAt","updatedAt"]},"IntegrationInstallationStatus":{"type":"string","enum":["active","pending","paused"]},"IntegrationInstallationSpaceSelection":{"type":"string","description":"Describe whether all spaces have been selected or there's a selection involved","enum":["all","selected"]},"IntegrationInstallationSiteSelection":{"type":"string","description":"Describe whether all sites have been selected or there's a selection involved","enum":["all","selected"]},"IntegrationInstallationConfiguration":{"type":"object","description":"Configuration of the integration at the account level","additionalProperties":true},"Timestamp":{"type":"string","format":"date-time"},"IntegrationInstallationExternalIds":{"type":"array","description":"External IDs assigned by the integration.","maxItems":5,"items":{"type":"string"}},"IntegrationInstallationTarget":{"oneOf":[{"$ref":"#/components/schemas/OrganizationTarget"}]},"OrganizationTarget":{"type":"object","required":["organization"],"properties":{"organization":{"type":"string"}}},"IntegrationNetwork":{"type":"object","description":"Network configuration for the installation","properties":{"proxy":{"type":"boolean","description":"Whether the installation is proxied through the backend"}}}},"responses":{"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[404]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/integrations/{integrationName}/installations/{installationId}":{"get":{"operationId":"getIntegrationInstallationById","summary":"Get an integration installation by its ID","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"$ref":"#/components/parameters/installationId"}],"responses":{"200":{"description":"Integration installation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationInstallation"}}}},"404":{"$ref":"#/components/responses/NotFoundError"}}}}}}
```

## DELETE /integrations/{integrationName}/installations/{installationId}

> Uninstall an integration

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"installationId":{"name":"installationId","in":"path","required":true,"description":"Identifier of the installation","schema":{"type":"string"}}}},"paths":{"/integrations/{integrationName}/installations/{installationId}":{"delete":{"operationId":"uninstallIntegration","summary":"Uninstall an integration","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"$ref":"#/components/parameters/installationId"}],"responses":{"204":{"description":"Integration installation did not exist"},"205":{"description":"Integration uninstalled successfully"}}}}}}
```

## PATCH /integrations/{integrationName}/installations/{installationId}

> Update an integration installation

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"installationId":{"name":"installationId","in":"path","required":true,"description":"Identifier of the installation","schema":{"type":"string"}}},"schemas":{"IntegrationInstallation":{"type":"object","description":"Installation of an integration on an account","properties":{"id":{"type":"string"},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"space_selection":{"$ref":"#/components/schemas/IntegrationInstallationSpaceSelection"},"site_selection":{"$ref":"#/components/schemas/IntegrationInstallationSiteSelection"},"spaces":{"type":"number","description":"Count of spaces, the installation is managing"},"configuration":{"$ref":"#/components/schemas/IntegrationInstallationConfiguration"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the installation in the API","format":"uri"},"app":{"type":"string","description":"URL of the integration's installation in the application","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration's installation","format":"uri"}},"required":["location","app","publicEndpoint"]},"externalIds":{"$ref":"#/components/schemas/IntegrationInstallationExternalIds"},"target":{"$ref":"#/components/schemas/IntegrationInstallationTarget","description":"Target of the integration installation"},"network":{"$ref":"#/components/schemas/IntegrationNetwork","description":"Network configuration for the installation"}},"required":["id","status","space_selection","site_selection","spaces","configuration","urls","externalIds","target","createdAt","updatedAt"]},"IntegrationInstallationStatus":{"type":"string","enum":["active","pending","paused"]},"IntegrationInstallationSpaceSelection":{"type":"string","description":"Describe whether all spaces have been selected or there's a selection involved","enum":["all","selected"]},"IntegrationInstallationSiteSelection":{"type":"string","description":"Describe whether all sites have been selected or there's a selection involved","enum":["all","selected"]},"IntegrationInstallationConfiguration":{"type":"object","description":"Configuration of the integration at the account level","additionalProperties":true},"Timestamp":{"type":"string","format":"date-time"},"IntegrationInstallationExternalIds":{"type":"array","description":"External IDs assigned by the integration.","maxItems":5,"items":{"type":"string"}},"IntegrationInstallationTarget":{"oneOf":[{"$ref":"#/components/schemas/OrganizationTarget"}]},"OrganizationTarget":{"type":"object","required":["organization"],"properties":{"organization":{"type":"string"}}},"IntegrationNetwork":{"type":"object","description":"Network configuration for the installation","properties":{"proxy":{"type":"boolean","description":"Whether the installation is proxied through the backend"}}},"UpdateIntegrationInstallation":{"type":"object","properties":{"externalIds":{"$ref":"#/components/schemas/IntegrationInstallationExternalIds"},"configuration":{"$ref":"#/components/schemas/IntegrationInstallationConfiguration"},"space_selection":{"$ref":"#/components/schemas/IntegrationInstallationSpaceSelection"},"site_selection":{"$ref":"#/components/schemas/IntegrationInstallationSiteSelection"}}}}},"paths":{"/integrations/{integrationName}/installations/{installationId}":{"patch":{"operationId":"updateIntegrationInstallation","summary":"Update an integration installation","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"$ref":"#/components/parameters/installationId"}],"responses":{"200":{"description":"The installation has been updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationInstallation"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIntegrationInstallation"}}}}}}}}
```

## Create an integration installation API token

> Creates a temporary API token of an integration's installation that has access to the installation and it's scopes. You must be authenticated as the integration to obtain this token.<br>

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"integration":[]}],"components":{"securitySchemes":{"integration":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"installationId":{"name":"installationId","in":"path","required":true,"description":"Identifier of the installation","schema":{"type":"string"}}},"schemas":{"APITemporaryToken":{"type":"object","properties":{"token":{"type":"string","description":"Temporary access token to authenticate with the API"}},"required":["token"]}},"responses":{"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[404]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/integrations/{integrationName}/installations/{installationId}/tokens":{"post":{"operationId":"createIntegrationInstallationToken","summary":"Create an integration installation API token","description":"Creates a temporary API token of an integration's installation that has access to the installation and it's scopes. You must be authenticated as the integration to obtain this token.\n","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"$ref":"#/components/parameters/installationId"}],"responses":{"200":{"description":"The API token for the installation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APITemporaryToken"}}}},"404":{"description":"Installation could not be found","$ref":"#/components/responses/NotFoundError"}}}}}}
```

## GET /integrations/{integrationName}/installations/{installationId}/spaces

> List all space integration installations

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"installationId":{"name":"installationId","in":"path","required":true,"description":"Identifier of the installation","schema":{"type":"string"}},"listPage":{"name":"page","in":"query","description":"Identifier of the page results to fetch.","schema":{"type":"string"}},"listLimit":{"name":"limit","in":"query","description":"The number of results per page","schema":{"type":"number","minimum":0,"maximum":1000}}},"schemas":{"List":{"type":"object","properties":{"next":{"type":"object","properties":{"page":{"type":"string","description":"Unique identifier to query the next results page"}},"required":["page"]},"count":{"type":"number","description":"Total count of objects in the list"}}},"IntegrationSpaceInstallation":{"allOf":[{"$ref":"#/components/schemas/IntegrationContentInstallationBase"},{"type":"object","properties":{"space":{"description":"The space the integration is installed on. Using the string value is deprecated in favor of space.id","oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Space"}]}},"required":["space"]}]},"IntegrationContentInstallationBase":{"type":"object","description":"Base properties of an installation of an integration on a site or space.","properties":{"integration":{"description":"Unique name identifier of the integration","type":"string"},"installation":{"description":"ID of the integration installation","type":"string"},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"configuration":{"description":"Configuration of the integration for this site","type":"object"},"externalIds":{"$ref":"#/components/schemas/IntegrationInstallationExternalIds"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the integration's installation in the API","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration's installation","format":"uri"}},"required":["location","publicEndpoint"]}},"required":["integration","installation","status","configuration","externalIds","urls"]},"IntegrationInstallationStatus":{"type":"string","enum":["active","pending","paused"]},"IntegrationInstallationExternalIds":{"type":"array","description":"External IDs assigned by the integration.","maxItems":5,"items":{"type":"string"}},"Space":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"space\"","enum":["space"]},"id":{"type":"string","description":"Unique identifier for the space"},"title":{"$ref":"#/components/schemas/SpaceTitle"},"emoji":{"description":"An emoji for this space. It'll match the emoji shown in the GitBook app.","$ref":"#/components/schemas/Emoji"},"visibility":{"$ref":"#/components/schemas/ContentVisibility"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"deletedAt":{"$ref":"#/components/schemas/Timestamp"},"editMode":{"$ref":"#/components/schemas/SpaceEditMode"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesSpaceConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the space in the API","format":"uri"},"app":{"type":"string","description":"URL of the space in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the space. Only defined when visibility is not \"private.\"","format":"uri"},"public":{"type":"string","description":"URL of the public version of the space. Only defined when visibility is \"public\".","format":"uri"},"icon":{"description":"URL of the icon of this space, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"organization":{"type":"string","description":"ID of the organization owning this space"},"parent":{"type":"string","description":"ID of the parent collection."},"language":{"$ref":"#/components/schemas/TranslationLanguage"},"gitSync":{"$ref":"#/components/schemas/GitSyncState"},"visitorAuth":{"$ref":"#/components/schemas/VisitorAuth"},"revision":{"type":"string","description":"ID of the active revision in the space."},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"comments":{"type":"number","description":"Count of opened comments on the space."},"changeRequests":{"type":"number","description":"Total count of change requests on the space."},"changeRequestsOpen":{"type":"number","description":"Count of open change requests on the space."},"changeRequestsDraft":{"type":"number","description":"Count of draft change requests on the space."},"internal_poweredByV2":{"type":"boolean","description":"Whether the space is powered by V2 of the content system."},"internal_singleWebsocket":{"type":"boolean","description":"Whether the space uses a single websocket connection for all real-time communication."},"permissions":{"type":"object","description":"The set of permissions for the space","properties":{"view":{"type":"boolean","description":"Can the user view the space content."},"access":{"type":"boolean","description":"Can the user access the space in the application."},"admin":{"type":"boolean","description":"Can the user edit the title, install integrations, and manage the space."},"viewInviteLinks":{"type":"boolean","description":"Can the user view the invite links of the space."},"edit":{"type":"boolean","description":"Can the user edit the content of the space by creating a change request."},"triggerGitSync":{"type":"boolean","description":"Can the user trigger a git sync."},"comment":{"type":"boolean","description":"Can the user comment on the content."},"merge":{"type":"boolean","description":"Can the user merge change requests."},"review":{"type":"boolean","description":"Can the user review change requests."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the space."}},"required":["view","access","admin","viewInviteLinks","edit","triggerGitSync","comment","merge","review","installIntegration"]}},"required":["object","id","title","emoji","organization","visibility","revision","createdAt","updatedAt","comments","changeRequests","changeRequestsOpen","changeRequestsDraft","mergeRules","urls","defaultLevel","permissions"]},"SpaceTitle":{"type":"string","description":"Title of the space","maxLength":50},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"ContentVisibility":{"type":"string","description":"* `public`: Anyone can access the content, and the content is indexed by search engines.\n* `unlisted`: Anyone can access the content, and the content is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the content.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the content.\n* `in-collection`: Anyone who can access the parent collection can access the content.\n  Only available for spaces in a collection.\n* `private`: Authorized members can access the content.\n","enum":["public","unlisted","share-link","visitor-auth","in-collection","private"]},"Timestamp":{"type":"string","format":"date-time"},"SpaceEditMode":{"type":"string","description":"Determines how a Space can be edited.\n* `live`: Users can directly edit the space\n* `locked`: All edits are locked for this space.\n","enum":["live","locked"]},"MergeRulesSpaceConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationInherit"},{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"}]},"MergeRulesConfigurationInherit":{"type":"object","description":"The merge rules inherits from the organization configuration.","properties":{"type":{"type":"string","enum":["inherit"]}},"required":["type"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"URL":{"type":"string","format":"uri","maxLength":2048},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","zh-tw","yue","ko","ar","hi","nl","pl","tr","sv","no","da","fi","el","cs","hu","ro","th","vi","id","ms","he","uk","sk","bg","hr","lt","lv","et","sl"]},"GitSyncState":{"type":"object","properties":{"repoName":{"type":"string","description":"Repository name."},"installationStatus":{"$ref":"#/components/schemas/GitSyncInstallationStatus"},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","deprecated":true,"description":"The integration name providing the Git Sync."},"installationId":{"type":"string","description":"The ID of the Git Sync installation."},"url":{"type":"string","description":"The URL to the repository tree, used when rendering public content."},"updatedAt":{"description":"When the Git provider details were last updated","$ref":"#/components/schemas/Timestamp"}}},"GitSyncInstallationStatus":{"type":"string","enum":["unauthenticated","active","pending"]},"GitSyncProvider":{"type":"string","description":"The provider of the Git Sync installation.","enum":["github","gitlab","github-legacy"]},"VisitorAuth":{"oneOf":[{"$ref":"#/components/schemas/VisitorAuthCustomBackend"},{"allOf":[{"$ref":"#/components/schemas/VisitorAuthIntegrationBackend"},{"type":"object","properties":{"integration":{"type":"string","description":"Name of integration being used as the backend for authenticated access"}},"required":["integration"]}]}]},"VisitorAuthCustomBackend":{"type":"object","title":"Custom backend for authenticated access","properties":{"backend":{"type":"string","description":"Custom backend for authenticated access","enum":["custom"]}},"required":["backend"]},"VisitorAuthIntegrationBackend":{"type":"object","title":"Integration backend for authenticated access","properties":{"backend":{"type":"string","description":"Integration as backend for authenticated access","enum":["integration"]}},"required":["backend"]},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]}}},"paths":{"/integrations/{integrationName}/installations/{installationId}/spaces":{"get":{"operationId":"listIntegrationInstallationSpaces","summary":"List all space integration installations","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"$ref":"#/components/parameters/installationId"},{"$ref":"#/components/parameters/listPage"},{"$ref":"#/components/parameters/listLimit"},{"name":"extended","in":"query","description":"If true, returns the space object in each items. If false, returns the space ID in each items.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationSpaceInstallation"}}}}]}}}}}}}}}
```

## GET /integrations/{integrationName}/installations/{installationId}/spaces/{spaceId}

> Get an integration space installation

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"installationId":{"name":"installationId","in":"path","required":true,"description":"Identifier of the installation","schema":{"type":"string"}},"spaceId":{"name":"spaceId","in":"path","required":true,"description":"The unique id of the space","schema":{"$ref":"#/components/schemas/EntityId"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"IntegrationSpaceInstallation":{"allOf":[{"$ref":"#/components/schemas/IntegrationContentInstallationBase"},{"type":"object","properties":{"space":{"description":"The space the integration is installed on. Using the string value is deprecated in favor of space.id","oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Space"}]}},"required":["space"]}]},"IntegrationContentInstallationBase":{"type":"object","description":"Base properties of an installation of an integration on a site or space.","properties":{"integration":{"description":"Unique name identifier of the integration","type":"string"},"installation":{"description":"ID of the integration installation","type":"string"},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"configuration":{"description":"Configuration of the integration for this site","type":"object"},"externalIds":{"$ref":"#/components/schemas/IntegrationInstallationExternalIds"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the integration's installation in the API","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration's installation","format":"uri"}},"required":["location","publicEndpoint"]}},"required":["integration","installation","status","configuration","externalIds","urls"]},"IntegrationInstallationStatus":{"type":"string","enum":["active","pending","paused"]},"IntegrationInstallationExternalIds":{"type":"array","description":"External IDs assigned by the integration.","maxItems":5,"items":{"type":"string"}},"Space":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"space\"","enum":["space"]},"id":{"type":"string","description":"Unique identifier for the space"},"title":{"$ref":"#/components/schemas/SpaceTitle"},"emoji":{"description":"An emoji for this space. It'll match the emoji shown in the GitBook app.","$ref":"#/components/schemas/Emoji"},"visibility":{"$ref":"#/components/schemas/ContentVisibility"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"deletedAt":{"$ref":"#/components/schemas/Timestamp"},"editMode":{"$ref":"#/components/schemas/SpaceEditMode"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesSpaceConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the space in the API","format":"uri"},"app":{"type":"string","description":"URL of the space in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the space. Only defined when visibility is not \"private.\"","format":"uri"},"public":{"type":"string","description":"URL of the public version of the space. Only defined when visibility is \"public\".","format":"uri"},"icon":{"description":"URL of the icon of this space, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"organization":{"type":"string","description":"ID of the organization owning this space"},"parent":{"type":"string","description":"ID of the parent collection."},"language":{"$ref":"#/components/schemas/TranslationLanguage"},"gitSync":{"$ref":"#/components/schemas/GitSyncState"},"visitorAuth":{"$ref":"#/components/schemas/VisitorAuth"},"revision":{"type":"string","description":"ID of the active revision in the space."},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"comments":{"type":"number","description":"Count of opened comments on the space."},"changeRequests":{"type":"number","description":"Total count of change requests on the space."},"changeRequestsOpen":{"type":"number","description":"Count of open change requests on the space."},"changeRequestsDraft":{"type":"number","description":"Count of draft change requests on the space."},"internal_poweredByV2":{"type":"boolean","description":"Whether the space is powered by V2 of the content system."},"internal_singleWebsocket":{"type":"boolean","description":"Whether the space uses a single websocket connection for all real-time communication."},"permissions":{"type":"object","description":"The set of permissions for the space","properties":{"view":{"type":"boolean","description":"Can the user view the space content."},"access":{"type":"boolean","description":"Can the user access the space in the application."},"admin":{"type":"boolean","description":"Can the user edit the title, install integrations, and manage the space."},"viewInviteLinks":{"type":"boolean","description":"Can the user view the invite links of the space."},"edit":{"type":"boolean","description":"Can the user edit the content of the space by creating a change request."},"triggerGitSync":{"type":"boolean","description":"Can the user trigger a git sync."},"comment":{"type":"boolean","description":"Can the user comment on the content."},"merge":{"type":"boolean","description":"Can the user merge change requests."},"review":{"type":"boolean","description":"Can the user review change requests."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the space."}},"required":["view","access","admin","viewInviteLinks","edit","triggerGitSync","comment","merge","review","installIntegration"]}},"required":["object","id","title","emoji","organization","visibility","revision","createdAt","updatedAt","comments","changeRequests","changeRequestsOpen","changeRequestsDraft","mergeRules","urls","defaultLevel","permissions"]},"SpaceTitle":{"type":"string","description":"Title of the space","maxLength":50},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"ContentVisibility":{"type":"string","description":"* `public`: Anyone can access the content, and the content is indexed by search engines.\n* `unlisted`: Anyone can access the content, and the content is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the content.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the content.\n* `in-collection`: Anyone who can access the parent collection can access the content.\n  Only available for spaces in a collection.\n* `private`: Authorized members can access the content.\n","enum":["public","unlisted","share-link","visitor-auth","in-collection","private"]},"Timestamp":{"type":"string","format":"date-time"},"SpaceEditMode":{"type":"string","description":"Determines how a Space can be edited.\n* `live`: Users can directly edit the space\n* `locked`: All edits are locked for this space.\n","enum":["live","locked"]},"MergeRulesSpaceConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationInherit"},{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"}]},"MergeRulesConfigurationInherit":{"type":"object","description":"The merge rules inherits from the organization configuration.","properties":{"type":{"type":"string","enum":["inherit"]}},"required":["type"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"URL":{"type":"string","format":"uri","maxLength":2048},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","zh-tw","yue","ko","ar","hi","nl","pl","tr","sv","no","da","fi","el","cs","hu","ro","th","vi","id","ms","he","uk","sk","bg","hr","lt","lv","et","sl"]},"GitSyncState":{"type":"object","properties":{"repoName":{"type":"string","description":"Repository name."},"installationStatus":{"$ref":"#/components/schemas/GitSyncInstallationStatus"},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","deprecated":true,"description":"The integration name providing the Git Sync."},"installationId":{"type":"string","description":"The ID of the Git Sync installation."},"url":{"type":"string","description":"The URL to the repository tree, used when rendering public content."},"updatedAt":{"description":"When the Git provider details were last updated","$ref":"#/components/schemas/Timestamp"}}},"GitSyncInstallationStatus":{"type":"string","enum":["unauthenticated","active","pending"]},"GitSyncProvider":{"type":"string","description":"The provider of the Git Sync installation.","enum":["github","gitlab","github-legacy"]},"VisitorAuth":{"oneOf":[{"$ref":"#/components/schemas/VisitorAuthCustomBackend"},{"allOf":[{"$ref":"#/components/schemas/VisitorAuthIntegrationBackend"},{"type":"object","properties":{"integration":{"type":"string","description":"Name of integration being used as the backend for authenticated access"}},"required":["integration"]}]}]},"VisitorAuthCustomBackend":{"type":"object","title":"Custom backend for authenticated access","properties":{"backend":{"type":"string","description":"Custom backend for authenticated access","enum":["custom"]}},"required":["backend"]},"VisitorAuthIntegrationBackend":{"type":"object","title":"Integration backend for authenticated access","properties":{"backend":{"type":"string","description":"Integration as backend for authenticated access","enum":["integration"]}},"required":["backend"]},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]}},"responses":{"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[404]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/integrations/{integrationName}/installations/{installationId}/spaces/{spaceId}":{"get":{"operationId":"getIntegrationSpaceInstallation","summary":"Get an integration space installation","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"$ref":"#/components/parameters/installationId"},{"$ref":"#/components/parameters/spaceId"},{"name":"extended","in":"query","description":"If true, returns the space object in each items. If false, returns the space ID in each items.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Integration space installation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationSpaceInstallation"}}}},"404":{"$ref":"#/components/responses/NotFoundError"}}}}}}
```

## DELETE /integrations/{integrationName}/installations/{installationId}/spaces/{spaceId}

> Uninstall an integration from a space

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"installationId":{"name":"installationId","in":"path","required":true,"description":"Identifier of the installation","schema":{"type":"string"}},"spaceId":{"name":"spaceId","in":"path","required":true,"description":"The unique id of the space","schema":{"$ref":"#/components/schemas/EntityId"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"}}},"paths":{"/integrations/{integrationName}/installations/{installationId}/spaces/{spaceId}":{"delete":{"operationId":"uninstallIntegrationFromSpace","summary":"Uninstall an integration from a space","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"$ref":"#/components/parameters/installationId"},{"$ref":"#/components/parameters/spaceId"}],"responses":{"204":{"description":"The space installation did not exist."},"205":{"description":"The space installation has been deleted."}}}}}}
```

## PATCH /integrations/{integrationName}/installations/{installationId}/spaces/{spaceId}

> Update an integration space installation

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"installationId":{"name":"installationId","in":"path","required":true,"description":"Identifier of the installation","schema":{"type":"string"}},"spaceId":{"name":"spaceId","in":"path","required":true,"description":"The unique id of the space","schema":{"$ref":"#/components/schemas/EntityId"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"IntegrationSpaceInstallation":{"allOf":[{"$ref":"#/components/schemas/IntegrationContentInstallationBase"},{"type":"object","properties":{"space":{"description":"The space the integration is installed on. Using the string value is deprecated in favor of space.id","oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Space"}]}},"required":["space"]}]},"IntegrationContentInstallationBase":{"type":"object","description":"Base properties of an installation of an integration on a site or space.","properties":{"integration":{"description":"Unique name identifier of the integration","type":"string"},"installation":{"description":"ID of the integration installation","type":"string"},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"configuration":{"description":"Configuration of the integration for this site","type":"object"},"externalIds":{"$ref":"#/components/schemas/IntegrationInstallationExternalIds"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the integration's installation in the API","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration's installation","format":"uri"}},"required":["location","publicEndpoint"]}},"required":["integration","installation","status","configuration","externalIds","urls"]},"IntegrationInstallationStatus":{"type":"string","enum":["active","pending","paused"]},"IntegrationInstallationExternalIds":{"type":"array","description":"External IDs assigned by the integration.","maxItems":5,"items":{"type":"string"}},"Space":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"space\"","enum":["space"]},"id":{"type":"string","description":"Unique identifier for the space"},"title":{"$ref":"#/components/schemas/SpaceTitle"},"emoji":{"description":"An emoji for this space. It'll match the emoji shown in the GitBook app.","$ref":"#/components/schemas/Emoji"},"visibility":{"$ref":"#/components/schemas/ContentVisibility"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"deletedAt":{"$ref":"#/components/schemas/Timestamp"},"editMode":{"$ref":"#/components/schemas/SpaceEditMode"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesSpaceConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the space in the API","format":"uri"},"app":{"type":"string","description":"URL of the space in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the space. Only defined when visibility is not \"private.\"","format":"uri"},"public":{"type":"string","description":"URL of the public version of the space. Only defined when visibility is \"public\".","format":"uri"},"icon":{"description":"URL of the icon of this space, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"organization":{"type":"string","description":"ID of the organization owning this space"},"parent":{"type":"string","description":"ID of the parent collection."},"language":{"$ref":"#/components/schemas/TranslationLanguage"},"gitSync":{"$ref":"#/components/schemas/GitSyncState"},"visitorAuth":{"$ref":"#/components/schemas/VisitorAuth"},"revision":{"type":"string","description":"ID of the active revision in the space."},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"comments":{"type":"number","description":"Count of opened comments on the space."},"changeRequests":{"type":"number","description":"Total count of change requests on the space."},"changeRequestsOpen":{"type":"number","description":"Count of open change requests on the space."},"changeRequestsDraft":{"type":"number","description":"Count of draft change requests on the space."},"internal_poweredByV2":{"type":"boolean","description":"Whether the space is powered by V2 of the content system."},"internal_singleWebsocket":{"type":"boolean","description":"Whether the space uses a single websocket connection for all real-time communication."},"permissions":{"type":"object","description":"The set of permissions for the space","properties":{"view":{"type":"boolean","description":"Can the user view the space content."},"access":{"type":"boolean","description":"Can the user access the space in the application."},"admin":{"type":"boolean","description":"Can the user edit the title, install integrations, and manage the space."},"viewInviteLinks":{"type":"boolean","description":"Can the user view the invite links of the space."},"edit":{"type":"boolean","description":"Can the user edit the content of the space by creating a change request."},"triggerGitSync":{"type":"boolean","description":"Can the user trigger a git sync."},"comment":{"type":"boolean","description":"Can the user comment on the content."},"merge":{"type":"boolean","description":"Can the user merge change requests."},"review":{"type":"boolean","description":"Can the user review change requests."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the space."}},"required":["view","access","admin","viewInviteLinks","edit","triggerGitSync","comment","merge","review","installIntegration"]}},"required":["object","id","title","emoji","organization","visibility","revision","createdAt","updatedAt","comments","changeRequests","changeRequestsOpen","changeRequestsDraft","mergeRules","urls","defaultLevel","permissions"]},"SpaceTitle":{"type":"string","description":"Title of the space","maxLength":50},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"ContentVisibility":{"type":"string","description":"* `public`: Anyone can access the content, and the content is indexed by search engines.\n* `unlisted`: Anyone can access the content, and the content is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the content.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the content.\n* `in-collection`: Anyone who can access the parent collection can access the content.\n  Only available for spaces in a collection.\n* `private`: Authorized members can access the content.\n","enum":["public","unlisted","share-link","visitor-auth","in-collection","private"]},"Timestamp":{"type":"string","format":"date-time"},"SpaceEditMode":{"type":"string","description":"Determines how a Space can be edited.\n* `live`: Users can directly edit the space\n* `locked`: All edits are locked for this space.\n","enum":["live","locked"]},"MergeRulesSpaceConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationInherit"},{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"}]},"MergeRulesConfigurationInherit":{"type":"object","description":"The merge rules inherits from the organization configuration.","properties":{"type":{"type":"string","enum":["inherit"]}},"required":["type"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"URL":{"type":"string","format":"uri","maxLength":2048},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","zh-tw","yue","ko","ar","hi","nl","pl","tr","sv","no","da","fi","el","cs","hu","ro","th","vi","id","ms","he","uk","sk","bg","hr","lt","lv","et","sl"]},"GitSyncState":{"type":"object","properties":{"repoName":{"type":"string","description":"Repository name."},"installationStatus":{"$ref":"#/components/schemas/GitSyncInstallationStatus"},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","deprecated":true,"description":"The integration name providing the Git Sync."},"installationId":{"type":"string","description":"The ID of the Git Sync installation."},"url":{"type":"string","description":"The URL to the repository tree, used when rendering public content."},"updatedAt":{"description":"When the Git provider details were last updated","$ref":"#/components/schemas/Timestamp"}}},"GitSyncInstallationStatus":{"type":"string","enum":["unauthenticated","active","pending"]},"GitSyncProvider":{"type":"string","description":"The provider of the Git Sync installation.","enum":["github","gitlab","github-legacy"]},"VisitorAuth":{"oneOf":[{"$ref":"#/components/schemas/VisitorAuthCustomBackend"},{"allOf":[{"$ref":"#/components/schemas/VisitorAuthIntegrationBackend"},{"type":"object","properties":{"integration":{"type":"string","description":"Name of integration being used as the backend for authenticated access"}},"required":["integration"]}]}]},"VisitorAuthCustomBackend":{"type":"object","title":"Custom backend for authenticated access","properties":{"backend":{"type":"string","description":"Custom backend for authenticated access","enum":["custom"]}},"required":["backend"]},"VisitorAuthIntegrationBackend":{"type":"object","title":"Integration backend for authenticated access","properties":{"backend":{"type":"string","description":"Integration as backend for authenticated access","enum":["integration"]}},"required":["backend"]},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"UpdateIntegrationSpaceInstallation":{"type":"object","properties":{"externalIds":{"$ref":"#/components/schemas/IntegrationInstallationExternalIds"},"configuration":{"$ref":"#/components/schemas/IntegrationInstallationConfiguration"}}},"IntegrationInstallationConfiguration":{"type":"object","description":"Configuration of the integration at the account level","additionalProperties":true}}},"paths":{"/integrations/{integrationName}/installations/{installationId}/spaces/{spaceId}":{"patch":{"operationId":"updateIntegrationSpaceInstallation","summary":"Update an integration space installation","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"$ref":"#/components/parameters/installationId"},{"$ref":"#/components/parameters/spaceId"},{"name":"extended","in":"query","description":"If true, returns the space object in each items. If false, returns the space ID in each items.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"The space installation has been updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationSpaceInstallation"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIntegrationSpaceInstallation"}}}}}}}}
```

## GET /integrations/{integrationName}/installations/{installationId}/sites

> List all site integration installations

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"installationId":{"name":"installationId","in":"path","required":true,"description":"Identifier of the installation","schema":{"type":"string"}},"listPage":{"name":"page","in":"query","description":"Identifier of the page results to fetch.","schema":{"type":"string"}},"listLimit":{"name":"limit","in":"query","description":"The number of results per page","schema":{"type":"number","minimum":0,"maximum":1000}}},"schemas":{"List":{"type":"object","properties":{"next":{"type":"object","properties":{"page":{"type":"string","description":"Unique identifier to query the next results page"}},"required":["page"]},"count":{"type":"number","description":"Total count of objects in the list"}}},"IntegrationSiteInstallation":{"allOf":[{"$ref":"#/components/schemas/IntegrationContentInstallationBase"},{"type":"object","properties":{"site":{"description":"The site the integration is installed on. Using the string value is deprecated in favor of site.id","oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Site"}]}},"required":["site"]}]},"IntegrationContentInstallationBase":{"type":"object","description":"Base properties of an installation of an integration on a site or space.","properties":{"integration":{"description":"Unique name identifier of the integration","type":"string"},"installation":{"description":"ID of the integration installation","type":"string"},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"configuration":{"description":"Configuration of the integration for this site","type":"object"},"externalIds":{"$ref":"#/components/schemas/IntegrationInstallationExternalIds"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the integration's installation in the API","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration's installation","format":"uri"}},"required":["location","publicEndpoint"]}},"required":["integration","installation","status","configuration","externalIds","urls"]},"IntegrationInstallationStatus":{"type":"string","enum":["active","pending","paused"]},"IntegrationInstallationExternalIds":{"type":"array","description":"External IDs assigned by the integration.","maxItems":5,"items":{"type":"string"}},"Site":{"type":"object","properties":{"object":{"type":"string","enum":["site"]},"id":{"type":"string","description":"Unique identifier of the site"},"type":{"$ref":"#/components/schemas/SiteType"},"appliedType":{"$ref":"#/components/schemas/SiteType","description":"The currently applied type of the site. For example, frozen sites will have this set to Basic."},"title":{"$ref":"#/components/schemas/SiteTitle"},"icon":{"oneOf":[{"$ref":"#/components/schemas/CustomizationFavicon"},{"type":"null"}]},"hostname":{"$ref":"#/components/schemas/SiteHostname"},"basename":{"$ref":"#/components/schemas/SiteBasename"},"proxy":{"$ref":"#/components/schemas/SiteProxy"},"visibility":{"$ref":"#/components/schemas/SiteVisibility"},"permissionsModel":{"$ref":"#/components/schemas/SitePermissionsModel"},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"published":{"type":"boolean","description":"Whether the site is live or not. If true, the site is accessible to the audience defined by the visibility setting."},"siteSpaces":{"type":"number"},"createdAt":{"type":"string","format":"date-time"},"adaptiveContent":{"$ref":"#/components/schemas/SiteAdaptiveContent"},"ads":{"$ref":"#/components/schemas/SiteAds"},"features":{"description":"A list of all premium features enabled on this site. For each feature we list the plan they belong to and whether the feature is frozen. A frozen feature is still enabled but cannot be changed or modified.\n","type":"array","items":{"$ref":"#/components/schemas/SiteFeature"}},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the site in the API","format":"uri"},"app":{"type":"string","description":"URL of the site in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the site. Only defined when site is published.","format":"uri"},"preview":{"type":"string","description":"URL of the preview version of the site.","format":"uri"},"login":{"type":"string","description":"URL of the login endpoint for visitors to authenticate with the site auth backend.\n","format":"uri"}},"required":["app","location","preview"]}},"required":["object","id","type","appliedType","title","visibility","permissionsModel","defaultLevel","published","createdAt","siteSpaces","features","urls"]},"SiteType":{"type":"string","description":"The type of the site","enum":["basic","premium","ultimate","sponsored","legacy-basic","legacy-premium"]},"SiteTitle":{"type":"string","description":"Title of the site","minLength":2,"maxLength":128},"CustomizationFavicon":{"oneOf":[{"type":"object","properties":{"icon":{"$ref":"#/components/schemas/CustomizationThemedURL"}},"required":["icon"]},{"type":"object","properties":{"emoji":{"$ref":"#/components/schemas/Emoji"}},"required":["emoji"]},{"type":"object","properties":{},"additionalProperties":false}]},"CustomizationThemedURL":{"type":"object","properties":{"light":{"$ref":"#/components/schemas/URL"},"dark":{"$ref":"#/components/schemas/URL"}},"required":["light","dark"]},"URL":{"type":"string","format":"uri","maxLength":2048},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"SiteHostname":{"type":"string","description":"Custom hostname for the site, for e.g. docs.mycompany.com","pattern":"^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?[.]){2,}[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$","maxLength":512},"SiteBasename":{"type":"string","description":"Basename for the site. For e.g. api","minLength":1,"maxLength":100},"SiteProxy":{"type":"object","properties":{"origin":{"$ref":"#/components/schemas/SiteProxyOrigin"},"target":{"type":"string","description":"The target URL to which the requests at the origin URL should be proxied to."}},"required":["origin","target"]},"SiteProxyOrigin":{"type":"string","description":"Proxy URL for the site, for e.g. company.com/docs or www.company.com/developer/docs etc.","pattern":"^([\\w-]+\\.)*[\\w-]+\\.[a-zA-Z]{2,}(\\/[\\w-]+)+$","maxLength":512},"SiteVisibility":{"type":"string","description":"The visibility setting of the site determines the audience of the site.\n* `public`: Anyone can access the site, and the site is indexed by search engines.\n* `unlisted`: Anyone can access the site, and the site is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the site.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the site.\n","enum":["public","unlisted","share-link","visitor-auth"]},"SitePermissionsModel":{"type":"string","description":"Permissions resolution mode for the site.","enum":["legacy","site"]},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"SiteAdaptiveContent":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether adaptive content should be enabled on the site."}},"required":["enabled"]},"SiteAds":{"oneOf":[{"type":"object","required":["status","submittable"],"properties":{"status":{"type":"string","enum":["pending"]},"submittable":{"type":"boolean","description":"True if the user can submit the site for review."}}},{"type":"object","required":["status","topic"],"properties":{"status":{"type":"string","enum":["in-review"]},"topic":{"$ref":"#/components/schemas/SiteAdsTopic"}}},{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["rejected"]},"reason":{"type":"string","description":"Reason for the rejection"}}},{"type":"object","required":["status","topic","zoneId"],"properties":{"status":{"type":"string","enum":["live","disabled"]},"topic":{"$ref":"#/components/schemas/SiteAdsTopic"},"zoneId":{"type":"string","description":"The ad network zone ID"}}}]},"SiteAdsTopic":{"type":"string","description":"Topic of the content","enum":["webdev","crypto"]},"SiteFeature":{"type":"object","description":"A site feature and the plan it is available on.","properties":{"id":{"$ref":"#/components/schemas/SiteFeatureKey"},"plan":{"$ref":"#/components/schemas/SiteType"},"frozen":{"description":"A frozen feature is still enabled but cannot be changed or modified.","type":"boolean"},"customizations":{"description":"A list of the actual advanced customizations used (only applicable for sites-advanced-customization)","type":"array","items":{"$ref":"#/components/schemas/SiteCustomizationFeature"}}},"required":["id","plan","frozen"]},"SiteFeatureKey":{"type":"string","description":"The site feature identifier","enum":["sites-adaptive-content","sites-advanced-customization","sites-advanced-insights","sites-ads","sites-ai-search","sites-ai-assistant","sites-connections","sites-channels","sites-embed","sites-api-playground","sites-basic-customization","sites-custom-domain","sites-custom-fonts","sites-custom-subdirectory","sites-full-text-search","sites-multivariant-site","sites-no-custom-domain","sites-page-feedback","sites-page-traffic-insights","sites-pdf-export","sites-preview-deployments","sites-public-visibility","sites-redirects","sites-search-insights","sites-sections","sites-seo","sites-share-links","sites-unlisted-visibility","sites-user-contribution","sites-visitor-authentication","sites-visitors"]},"SiteCustomizationFeature":{"type":"string","description":"A list of all premium customizations.","enum":["header-logo","header-primary-link","theme-preset","premium-fonts","custom-icons","footer-logo","footer-links","footer-copyright","semantic-colors"]}}},"paths":{"/integrations/{integrationName}/installations/{installationId}/sites":{"get":{"operationId":"listIntegrationInstallationSites","summary":"List all site integration installations","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"$ref":"#/components/parameters/installationId"},{"$ref":"#/components/parameters/listPage"},{"$ref":"#/components/parameters/listLimit"},{"name":"extended","in":"query","description":"If true, returns the site object in each items. If false, returns the site ID in each items.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationSiteInstallation"}}}}]}}}}}}}}}
```

## POST /integrations/{integrationName}/installations/{installationId}/sites

> Install an integration on a site

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"installationId":{"name":"installationId","in":"path","required":true,"description":"Identifier of the installation","schema":{"type":"string"}}},"schemas":{"IntegrationSiteInstallation":{"allOf":[{"$ref":"#/components/schemas/IntegrationContentInstallationBase"},{"type":"object","properties":{"site":{"description":"The site the integration is installed on. Using the string value is deprecated in favor of site.id","oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Site"}]}},"required":["site"]}]},"IntegrationContentInstallationBase":{"type":"object","description":"Base properties of an installation of an integration on a site or space.","properties":{"integration":{"description":"Unique name identifier of the integration","type":"string"},"installation":{"description":"ID of the integration installation","type":"string"},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"configuration":{"description":"Configuration of the integration for this site","type":"object"},"externalIds":{"$ref":"#/components/schemas/IntegrationInstallationExternalIds"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the integration's installation in the API","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration's installation","format":"uri"}},"required":["location","publicEndpoint"]}},"required":["integration","installation","status","configuration","externalIds","urls"]},"IntegrationInstallationStatus":{"type":"string","enum":["active","pending","paused"]},"IntegrationInstallationExternalIds":{"type":"array","description":"External IDs assigned by the integration.","maxItems":5,"items":{"type":"string"}},"Site":{"type":"object","properties":{"object":{"type":"string","enum":["site"]},"id":{"type":"string","description":"Unique identifier of the site"},"type":{"$ref":"#/components/schemas/SiteType"},"appliedType":{"$ref":"#/components/schemas/SiteType","description":"The currently applied type of the site. For example, frozen sites will have this set to Basic."},"title":{"$ref":"#/components/schemas/SiteTitle"},"icon":{"oneOf":[{"$ref":"#/components/schemas/CustomizationFavicon"},{"type":"null"}]},"hostname":{"$ref":"#/components/schemas/SiteHostname"},"basename":{"$ref":"#/components/schemas/SiteBasename"},"proxy":{"$ref":"#/components/schemas/SiteProxy"},"visibility":{"$ref":"#/components/schemas/SiteVisibility"},"permissionsModel":{"$ref":"#/components/schemas/SitePermissionsModel"},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"published":{"type":"boolean","description":"Whether the site is live or not. If true, the site is accessible to the audience defined by the visibility setting."},"siteSpaces":{"type":"number"},"createdAt":{"type":"string","format":"date-time"},"adaptiveContent":{"$ref":"#/components/schemas/SiteAdaptiveContent"},"ads":{"$ref":"#/components/schemas/SiteAds"},"features":{"description":"A list of all premium features enabled on this site. For each feature we list the plan they belong to and whether the feature is frozen. A frozen feature is still enabled but cannot be changed or modified.\n","type":"array","items":{"$ref":"#/components/schemas/SiteFeature"}},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the site in the API","format":"uri"},"app":{"type":"string","description":"URL of the site in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the site. Only defined when site is published.","format":"uri"},"preview":{"type":"string","description":"URL of the preview version of the site.","format":"uri"},"login":{"type":"string","description":"URL of the login endpoint for visitors to authenticate with the site auth backend.\n","format":"uri"}},"required":["app","location","preview"]}},"required":["object","id","type","appliedType","title","visibility","permissionsModel","defaultLevel","published","createdAt","siteSpaces","features","urls"]},"SiteType":{"type":"string","description":"The type of the site","enum":["basic","premium","ultimate","sponsored","legacy-basic","legacy-premium"]},"SiteTitle":{"type":"string","description":"Title of the site","minLength":2,"maxLength":128},"CustomizationFavicon":{"oneOf":[{"type":"object","properties":{"icon":{"$ref":"#/components/schemas/CustomizationThemedURL"}},"required":["icon"]},{"type":"object","properties":{"emoji":{"$ref":"#/components/schemas/Emoji"}},"required":["emoji"]},{"type":"object","properties":{},"additionalProperties":false}]},"CustomizationThemedURL":{"type":"object","properties":{"light":{"$ref":"#/components/schemas/URL"},"dark":{"$ref":"#/components/schemas/URL"}},"required":["light","dark"]},"URL":{"type":"string","format":"uri","maxLength":2048},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"SiteHostname":{"type":"string","description":"Custom hostname for the site, for e.g. docs.mycompany.com","pattern":"^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?[.]){2,}[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$","maxLength":512},"SiteBasename":{"type":"string","description":"Basename for the site. For e.g. api","minLength":1,"maxLength":100},"SiteProxy":{"type":"object","properties":{"origin":{"$ref":"#/components/schemas/SiteProxyOrigin"},"target":{"type":"string","description":"The target URL to which the requests at the origin URL should be proxied to."}},"required":["origin","target"]},"SiteProxyOrigin":{"type":"string","description":"Proxy URL for the site, for e.g. company.com/docs or www.company.com/developer/docs etc.","pattern":"^([\\w-]+\\.)*[\\w-]+\\.[a-zA-Z]{2,}(\\/[\\w-]+)+$","maxLength":512},"SiteVisibility":{"type":"string","description":"The visibility setting of the site determines the audience of the site.\n* `public`: Anyone can access the site, and the site is indexed by search engines.\n* `unlisted`: Anyone can access the site, and the site is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the site.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the site.\n","enum":["public","unlisted","share-link","visitor-auth"]},"SitePermissionsModel":{"type":"string","description":"Permissions resolution mode for the site.","enum":["legacy","site"]},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"SiteAdaptiveContent":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether adaptive content should be enabled on the site."}},"required":["enabled"]},"SiteAds":{"oneOf":[{"type":"object","required":["status","submittable"],"properties":{"status":{"type":"string","enum":["pending"]},"submittable":{"type":"boolean","description":"True if the user can submit the site for review."}}},{"type":"object","required":["status","topic"],"properties":{"status":{"type":"string","enum":["in-review"]},"topic":{"$ref":"#/components/schemas/SiteAdsTopic"}}},{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["rejected"]},"reason":{"type":"string","description":"Reason for the rejection"}}},{"type":"object","required":["status","topic","zoneId"],"properties":{"status":{"type":"string","enum":["live","disabled"]},"topic":{"$ref":"#/components/schemas/SiteAdsTopic"},"zoneId":{"type":"string","description":"The ad network zone ID"}}}]},"SiteAdsTopic":{"type":"string","description":"Topic of the content","enum":["webdev","crypto"]},"SiteFeature":{"type":"object","description":"A site feature and the plan it is available on.","properties":{"id":{"$ref":"#/components/schemas/SiteFeatureKey"},"plan":{"$ref":"#/components/schemas/SiteType"},"frozen":{"description":"A frozen feature is still enabled but cannot be changed or modified.","type":"boolean"},"customizations":{"description":"A list of the actual advanced customizations used (only applicable for sites-advanced-customization)","type":"array","items":{"$ref":"#/components/schemas/SiteCustomizationFeature"}}},"required":["id","plan","frozen"]},"SiteFeatureKey":{"type":"string","description":"The site feature identifier","enum":["sites-adaptive-content","sites-advanced-customization","sites-advanced-insights","sites-ads","sites-ai-search","sites-ai-assistant","sites-connections","sites-channels","sites-embed","sites-api-playground","sites-basic-customization","sites-custom-domain","sites-custom-fonts","sites-custom-subdirectory","sites-full-text-search","sites-multivariant-site","sites-no-custom-domain","sites-page-feedback","sites-page-traffic-insights","sites-pdf-export","sites-preview-deployments","sites-public-visibility","sites-redirects","sites-search-insights","sites-sections","sites-seo","sites-share-links","sites-unlisted-visibility","sites-user-contribution","sites-visitor-authentication","sites-visitors"]},"SiteCustomizationFeature":{"type":"string","description":"A list of all premium customizations.","enum":["header-logo","header-primary-link","theme-preset","premium-fonts","custom-icons","footer-logo","footer-links","footer-copyright","semantic-colors"]}},"responses":{"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[404]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/integrations/{integrationName}/installations/{installationId}/sites":{"post":{"operationId":"installIntegrationOnSite","summary":"Install an integration on a site","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"$ref":"#/components/parameters/installationId"},{"name":"extended","in":"query","description":"If true, returns the site object in each items. If false, returns the site ID in each items.","schema":{"type":"boolean","default":false}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["siteId"],"properties":{"siteId":{"type":"string","description":"ID of the site to install the integration on"}}}}}},"responses":{"201":{"headers":{"Location":{"description":"URL for the installed integration on the site","schema":{"type":"string"}}},"description":"Integration installed successfully on site","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationSiteInstallation"}}}},"404":{"$ref":"#/components/responses/NotFoundError"}}}}}}
```

## GET /integrations/{integrationName}/installations/{installationId}/sites/{siteId}

> Get an integration site installation

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"installationId":{"name":"installationId","in":"path","required":true,"description":"Identifier of the installation","schema":{"type":"string"}},"siteId":{"name":"siteId","in":"path","required":true,"description":"The unique id of the site","schema":{"type":"string"}}},"schemas":{"IntegrationSiteInstallation":{"allOf":[{"$ref":"#/components/schemas/IntegrationContentInstallationBase"},{"type":"object","properties":{"site":{"description":"The site the integration is installed on. Using the string value is deprecated in favor of site.id","oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Site"}]}},"required":["site"]}]},"IntegrationContentInstallationBase":{"type":"object","description":"Base properties of an installation of an integration on a site or space.","properties":{"integration":{"description":"Unique name identifier of the integration","type":"string"},"installation":{"description":"ID of the integration installation","type":"string"},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"configuration":{"description":"Configuration of the integration for this site","type":"object"},"externalIds":{"$ref":"#/components/schemas/IntegrationInstallationExternalIds"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the integration's installation in the API","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration's installation","format":"uri"}},"required":["location","publicEndpoint"]}},"required":["integration","installation","status","configuration","externalIds","urls"]},"IntegrationInstallationStatus":{"type":"string","enum":["active","pending","paused"]},"IntegrationInstallationExternalIds":{"type":"array","description":"External IDs assigned by the integration.","maxItems":5,"items":{"type":"string"}},"Site":{"type":"object","properties":{"object":{"type":"string","enum":["site"]},"id":{"type":"string","description":"Unique identifier of the site"},"type":{"$ref":"#/components/schemas/SiteType"},"appliedType":{"$ref":"#/components/schemas/SiteType","description":"The currently applied type of the site. For example, frozen sites will have this set to Basic."},"title":{"$ref":"#/components/schemas/SiteTitle"},"icon":{"oneOf":[{"$ref":"#/components/schemas/CustomizationFavicon"},{"type":"null"}]},"hostname":{"$ref":"#/components/schemas/SiteHostname"},"basename":{"$ref":"#/components/schemas/SiteBasename"},"proxy":{"$ref":"#/components/schemas/SiteProxy"},"visibility":{"$ref":"#/components/schemas/SiteVisibility"},"permissionsModel":{"$ref":"#/components/schemas/SitePermissionsModel"},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"published":{"type":"boolean","description":"Whether the site is live or not. If true, the site is accessible to the audience defined by the visibility setting."},"siteSpaces":{"type":"number"},"createdAt":{"type":"string","format":"date-time"},"adaptiveContent":{"$ref":"#/components/schemas/SiteAdaptiveContent"},"ads":{"$ref":"#/components/schemas/SiteAds"},"features":{"description":"A list of all premium features enabled on this site. For each feature we list the plan they belong to and whether the feature is frozen. A frozen feature is still enabled but cannot be changed or modified.\n","type":"array","items":{"$ref":"#/components/schemas/SiteFeature"}},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the site in the API","format":"uri"},"app":{"type":"string","description":"URL of the site in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the site. Only defined when site is published.","format":"uri"},"preview":{"type":"string","description":"URL of the preview version of the site.","format":"uri"},"login":{"type":"string","description":"URL of the login endpoint for visitors to authenticate with the site auth backend.\n","format":"uri"}},"required":["app","location","preview"]}},"required":["object","id","type","appliedType","title","visibility","permissionsModel","defaultLevel","published","createdAt","siteSpaces","features","urls"]},"SiteType":{"type":"string","description":"The type of the site","enum":["basic","premium","ultimate","sponsored","legacy-basic","legacy-premium"]},"SiteTitle":{"type":"string","description":"Title of the site","minLength":2,"maxLength":128},"CustomizationFavicon":{"oneOf":[{"type":"object","properties":{"icon":{"$ref":"#/components/schemas/CustomizationThemedURL"}},"required":["icon"]},{"type":"object","properties":{"emoji":{"$ref":"#/components/schemas/Emoji"}},"required":["emoji"]},{"type":"object","properties":{},"additionalProperties":false}]},"CustomizationThemedURL":{"type":"object","properties":{"light":{"$ref":"#/components/schemas/URL"},"dark":{"$ref":"#/components/schemas/URL"}},"required":["light","dark"]},"URL":{"type":"string","format":"uri","maxLength":2048},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"SiteHostname":{"type":"string","description":"Custom hostname for the site, for e.g. docs.mycompany.com","pattern":"^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?[.]){2,}[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$","maxLength":512},"SiteBasename":{"type":"string","description":"Basename for the site. For e.g. api","minLength":1,"maxLength":100},"SiteProxy":{"type":"object","properties":{"origin":{"$ref":"#/components/schemas/SiteProxyOrigin"},"target":{"type":"string","description":"The target URL to which the requests at the origin URL should be proxied to."}},"required":["origin","target"]},"SiteProxyOrigin":{"type":"string","description":"Proxy URL for the site, for e.g. company.com/docs or www.company.com/developer/docs etc.","pattern":"^([\\w-]+\\.)*[\\w-]+\\.[a-zA-Z]{2,}(\\/[\\w-]+)+$","maxLength":512},"SiteVisibility":{"type":"string","description":"The visibility setting of the site determines the audience of the site.\n* `public`: Anyone can access the site, and the site is indexed by search engines.\n* `unlisted`: Anyone can access the site, and the site is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the site.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the site.\n","enum":["public","unlisted","share-link","visitor-auth"]},"SitePermissionsModel":{"type":"string","description":"Permissions resolution mode for the site.","enum":["legacy","site"]},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"SiteAdaptiveContent":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether adaptive content should be enabled on the site."}},"required":["enabled"]},"SiteAds":{"oneOf":[{"type":"object","required":["status","submittable"],"properties":{"status":{"type":"string","enum":["pending"]},"submittable":{"type":"boolean","description":"True if the user can submit the site for review."}}},{"type":"object","required":["status","topic"],"properties":{"status":{"type":"string","enum":["in-review"]},"topic":{"$ref":"#/components/schemas/SiteAdsTopic"}}},{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["rejected"]},"reason":{"type":"string","description":"Reason for the rejection"}}},{"type":"object","required":["status","topic","zoneId"],"properties":{"status":{"type":"string","enum":["live","disabled"]},"topic":{"$ref":"#/components/schemas/SiteAdsTopic"},"zoneId":{"type":"string","description":"The ad network zone ID"}}}]},"SiteAdsTopic":{"type":"string","description":"Topic of the content","enum":["webdev","crypto"]},"SiteFeature":{"type":"object","description":"A site feature and the plan it is available on.","properties":{"id":{"$ref":"#/components/schemas/SiteFeatureKey"},"plan":{"$ref":"#/components/schemas/SiteType"},"frozen":{"description":"A frozen feature is still enabled but cannot be changed or modified.","type":"boolean"},"customizations":{"description":"A list of the actual advanced customizations used (only applicable for sites-advanced-customization)","type":"array","items":{"$ref":"#/components/schemas/SiteCustomizationFeature"}}},"required":["id","plan","frozen"]},"SiteFeatureKey":{"type":"string","description":"The site feature identifier","enum":["sites-adaptive-content","sites-advanced-customization","sites-advanced-insights","sites-ads","sites-ai-search","sites-ai-assistant","sites-connections","sites-channels","sites-embed","sites-api-playground","sites-basic-customization","sites-custom-domain","sites-custom-fonts","sites-custom-subdirectory","sites-full-text-search","sites-multivariant-site","sites-no-custom-domain","sites-page-feedback","sites-page-traffic-insights","sites-pdf-export","sites-preview-deployments","sites-public-visibility","sites-redirects","sites-search-insights","sites-sections","sites-seo","sites-share-links","sites-unlisted-visibility","sites-user-contribution","sites-visitor-authentication","sites-visitors"]},"SiteCustomizationFeature":{"type":"string","description":"A list of all premium customizations.","enum":["header-logo","header-primary-link","theme-preset","premium-fonts","custom-icons","footer-logo","footer-links","footer-copyright","semantic-colors"]}},"responses":{"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[404]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/integrations/{integrationName}/installations/{installationId}/sites/{siteId}":{"get":{"operationId":"getIntegrationSiteInstallation","summary":"Get an integration site installation","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"$ref":"#/components/parameters/installationId"},{"$ref":"#/components/parameters/siteId"},{"name":"extended","in":"query","description":"If true, returns the site object in each items. If false, returns the site ID in each items.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Integration site installation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationSiteInstallation"}}}},"404":{"$ref":"#/components/responses/NotFoundError"}}}}}}
```

## DELETE /integrations/{integrationName}/installations/{installationId}/sites/{siteId}

> Uninstall an integration from a site

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"installationId":{"name":"installationId","in":"path","required":true,"description":"Identifier of the installation","schema":{"type":"string"}},"siteId":{"name":"siteId","in":"path","required":true,"description":"The unique id of the site","schema":{"type":"string"}}}},"paths":{"/integrations/{integrationName}/installations/{installationId}/sites/{siteId}":{"delete":{"operationId":"uninstallIntegrationFromSite","summary":"Uninstall an integration from a site","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"$ref":"#/components/parameters/installationId"},{"$ref":"#/components/parameters/siteId"}],"responses":{"204":{"description":"The site installation did not exist."},"205":{"description":"The site installation has been deleted."}}}}}}
```

## PATCH /integrations/{integrationName}/installations/{installationId}/sites/{siteId}

> Update an integration site installation

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"installationId":{"name":"installationId","in":"path","required":true,"description":"Identifier of the installation","schema":{"type":"string"}},"siteId":{"name":"siteId","in":"path","required":true,"description":"The unique id of the site","schema":{"type":"string"}}},"schemas":{"IntegrationSiteInstallation":{"allOf":[{"$ref":"#/components/schemas/IntegrationContentInstallationBase"},{"type":"object","properties":{"site":{"description":"The site the integration is installed on. Using the string value is deprecated in favor of site.id","oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Site"}]}},"required":["site"]}]},"IntegrationContentInstallationBase":{"type":"object","description":"Base properties of an installation of an integration on a site or space.","properties":{"integration":{"description":"Unique name identifier of the integration","type":"string"},"installation":{"description":"ID of the integration installation","type":"string"},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"configuration":{"description":"Configuration of the integration for this site","type":"object"},"externalIds":{"$ref":"#/components/schemas/IntegrationInstallationExternalIds"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the integration's installation in the API","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration's installation","format":"uri"}},"required":["location","publicEndpoint"]}},"required":["integration","installation","status","configuration","externalIds","urls"]},"IntegrationInstallationStatus":{"type":"string","enum":["active","pending","paused"]},"IntegrationInstallationExternalIds":{"type":"array","description":"External IDs assigned by the integration.","maxItems":5,"items":{"type":"string"}},"Site":{"type":"object","properties":{"object":{"type":"string","enum":["site"]},"id":{"type":"string","description":"Unique identifier of the site"},"type":{"$ref":"#/components/schemas/SiteType"},"appliedType":{"$ref":"#/components/schemas/SiteType","description":"The currently applied type of the site. For example, frozen sites will have this set to Basic."},"title":{"$ref":"#/components/schemas/SiteTitle"},"icon":{"oneOf":[{"$ref":"#/components/schemas/CustomizationFavicon"},{"type":"null"}]},"hostname":{"$ref":"#/components/schemas/SiteHostname"},"basename":{"$ref":"#/components/schemas/SiteBasename"},"proxy":{"$ref":"#/components/schemas/SiteProxy"},"visibility":{"$ref":"#/components/schemas/SiteVisibility"},"permissionsModel":{"$ref":"#/components/schemas/SitePermissionsModel"},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"published":{"type":"boolean","description":"Whether the site is live or not. If true, the site is accessible to the audience defined by the visibility setting."},"siteSpaces":{"type":"number"},"createdAt":{"type":"string","format":"date-time"},"adaptiveContent":{"$ref":"#/components/schemas/SiteAdaptiveContent"},"ads":{"$ref":"#/components/schemas/SiteAds"},"features":{"description":"A list of all premium features enabled on this site. For each feature we list the plan they belong to and whether the feature is frozen. A frozen feature is still enabled but cannot be changed or modified.\n","type":"array","items":{"$ref":"#/components/schemas/SiteFeature"}},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the site in the API","format":"uri"},"app":{"type":"string","description":"URL of the site in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the site. Only defined when site is published.","format":"uri"},"preview":{"type":"string","description":"URL of the preview version of the site.","format":"uri"},"login":{"type":"string","description":"URL of the login endpoint for visitors to authenticate with the site auth backend.\n","format":"uri"}},"required":["app","location","preview"]}},"required":["object","id","type","appliedType","title","visibility","permissionsModel","defaultLevel","published","createdAt","siteSpaces","features","urls"]},"SiteType":{"type":"string","description":"The type of the site","enum":["basic","premium","ultimate","sponsored","legacy-basic","legacy-premium"]},"SiteTitle":{"type":"string","description":"Title of the site","minLength":2,"maxLength":128},"CustomizationFavicon":{"oneOf":[{"type":"object","properties":{"icon":{"$ref":"#/components/schemas/CustomizationThemedURL"}},"required":["icon"]},{"type":"object","properties":{"emoji":{"$ref":"#/components/schemas/Emoji"}},"required":["emoji"]},{"type":"object","properties":{},"additionalProperties":false}]},"CustomizationThemedURL":{"type":"object","properties":{"light":{"$ref":"#/components/schemas/URL"},"dark":{"$ref":"#/components/schemas/URL"}},"required":["light","dark"]},"URL":{"type":"string","format":"uri","maxLength":2048},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"SiteHostname":{"type":"string","description":"Custom hostname for the site, for e.g. docs.mycompany.com","pattern":"^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?[.]){2,}[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$","maxLength":512},"SiteBasename":{"type":"string","description":"Basename for the site. For e.g. api","minLength":1,"maxLength":100},"SiteProxy":{"type":"object","properties":{"origin":{"$ref":"#/components/schemas/SiteProxyOrigin"},"target":{"type":"string","description":"The target URL to which the requests at the origin URL should be proxied to."}},"required":["origin","target"]},"SiteProxyOrigin":{"type":"string","description":"Proxy URL for the site, for e.g. company.com/docs or www.company.com/developer/docs etc.","pattern":"^([\\w-]+\\.)*[\\w-]+\\.[a-zA-Z]{2,}(\\/[\\w-]+)+$","maxLength":512},"SiteVisibility":{"type":"string","description":"The visibility setting of the site determines the audience of the site.\n* `public`: Anyone can access the site, and the site is indexed by search engines.\n* `unlisted`: Anyone can access the site, and the site is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the site.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the site.\n","enum":["public","unlisted","share-link","visitor-auth"]},"SitePermissionsModel":{"type":"string","description":"Permissions resolution mode for the site.","enum":["legacy","site"]},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"SiteAdaptiveContent":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether adaptive content should be enabled on the site."}},"required":["enabled"]},"SiteAds":{"oneOf":[{"type":"object","required":["status","submittable"],"properties":{"status":{"type":"string","enum":["pending"]},"submittable":{"type":"boolean","description":"True if the user can submit the site for review."}}},{"type":"object","required":["status","topic"],"properties":{"status":{"type":"string","enum":["in-review"]},"topic":{"$ref":"#/components/schemas/SiteAdsTopic"}}},{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["rejected"]},"reason":{"type":"string","description":"Reason for the rejection"}}},{"type":"object","required":["status","topic","zoneId"],"properties":{"status":{"type":"string","enum":["live","disabled"]},"topic":{"$ref":"#/components/schemas/SiteAdsTopic"},"zoneId":{"type":"string","description":"The ad network zone ID"}}}]},"SiteAdsTopic":{"type":"string","description":"Topic of the content","enum":["webdev","crypto"]},"SiteFeature":{"type":"object","description":"A site feature and the plan it is available on.","properties":{"id":{"$ref":"#/components/schemas/SiteFeatureKey"},"plan":{"$ref":"#/components/schemas/SiteType"},"frozen":{"description":"A frozen feature is still enabled but cannot be changed or modified.","type":"boolean"},"customizations":{"description":"A list of the actual advanced customizations used (only applicable for sites-advanced-customization)","type":"array","items":{"$ref":"#/components/schemas/SiteCustomizationFeature"}}},"required":["id","plan","frozen"]},"SiteFeatureKey":{"type":"string","description":"The site feature identifier","enum":["sites-adaptive-content","sites-advanced-customization","sites-advanced-insights","sites-ads","sites-ai-search","sites-ai-assistant","sites-connections","sites-channels","sites-embed","sites-api-playground","sites-basic-customization","sites-custom-domain","sites-custom-fonts","sites-custom-subdirectory","sites-full-text-search","sites-multivariant-site","sites-no-custom-domain","sites-page-feedback","sites-page-traffic-insights","sites-pdf-export","sites-preview-deployments","sites-public-visibility","sites-redirects","sites-search-insights","sites-sections","sites-seo","sites-share-links","sites-unlisted-visibility","sites-user-contribution","sites-visitor-authentication","sites-visitors"]},"SiteCustomizationFeature":{"type":"string","description":"A list of all premium customizations.","enum":["header-logo","header-primary-link","theme-preset","premium-fonts","custom-icons","footer-logo","footer-links","footer-copyright","semantic-colors"]},"UpdateIntegrationSiteInstallation":{"type":"object","properties":{"externalIds":{"$ref":"#/components/schemas/IntegrationInstallationExternalIds"},"configuration":{"$ref":"#/components/schemas/IntegrationInstallationConfiguration"}}},"IntegrationInstallationConfiguration":{"type":"object","description":"Configuration of the integration at the account level","additionalProperties":true}}},"paths":{"/integrations/{integrationName}/installations/{installationId}/sites/{siteId}":{"patch":{"operationId":"updateIntegrationSiteInstallation","summary":"Update an integration site installation","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/integrationName"},{"$ref":"#/components/parameters/installationId"},{"$ref":"#/components/parameters/siteId"},{"name":"extended","in":"query","description":"If true, returns the site object in each items. If false, returns the site ID in each items.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"The site installation has been updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationSiteInstallation"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIntegrationSiteInstallation"}}}}}}}}
```

## GET /orgs/{organizationId}/integrations

> List all public integrations along with private ones trusted by the specific org.

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}},"listPage":{"name":"page","in":"query","description":"Identifier of the page results to fetch.","schema":{"type":"string"}},"listLimit":{"name":"limit","in":"query","description":"The number of results per page","schema":{"type":"number","minimum":0,"maximum":1000}},"integrationSearchQuery":{"name":"search","in":"query","description":"A search string to filter integrations by name\n","schema":{"type":"string"}},"integrationSearchCategory":{"name":"category","in":"query","description":"Filter the integrations by category","schema":{"$ref":"#/components/schemas/IntegrationCategory"}},"integrationSearchBlockDomain":{"name":"blockDomain","in":"query","description":"Filter the integrations by block's domains","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}},"integrationSearchBlocks":{"name":"blocks","in":"query","description":"If true, returns only integrations with blocks. If false, returns only integrations without blocks.","schema":{"type":"boolean"}},"integrationSearchContentSources":{"name":"contentSources","in":"query","description":"If true, returns only integrations with contentSources. If false, returns only integrations without contentSources.","schema":{"type":"boolean"}},"integrationSearchOwner":{"name":"owner","in":"query","description":"If defined, only list integrations owned by the given organization.","schema":{"type":"string"}},"integrationSearchScope":{"name":"scope","in":"query","description":"Filter the integrations by scope","schema":{"$ref":"#/components/schemas/IntegrationScope"}},"integrationSearchTarget":{"name":"target","in":"query","description":"Filter the integrations by target","schema":{"$ref":"#/components/schemas/IntegrationTarget"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"IntegrationCategory":{"type":"string","enum":["analytics","collaboration","content","gitsync","marketing","visitor-auth","other"]},"IntegrationScope":{"type":"string","enum":["space:content:read","space:content:write","space:metadata:read","space:metadata:write","space:git:sync","page:feedback:read","site:metadata:read","site:views:read","site:script:inject","site:script:cookies","site:visitor:auth","site:adaptive:read","site:adaptive:write","conversations:ingest","openapi:read","openapi:write"]},"IntegrationTarget":{"type":"string","description":"The target on which the integration can operate and needs to be configured for","enum":["all","site","space","organization"]},"List":{"type":"object","properties":{"next":{"type":"object","properties":{"page":{"type":"string","description":"Unique identifier to query the next results page"}},"required":["page"]},"count":{"type":"number","description":"Total count of objects in the list"}}},"Integration":{"type":"object","properties":{"object":{"type":"string","enum":["integration"]},"name":{"type":"string","description":"Unique named identifier for the integration"},"version":{"type":"number","description":"Version of the integration"},"title":{"$ref":"#/components/schemas/IntegrationTitle"},"description":{"$ref":"#/components/schemas/IntegrationDescription"},"summary":{"$ref":"#/components/schemas/IntegrationSummary"},"previewImages":{"type":"array","description":"URLs of images to showcase the integration","maxItems":3,"items":{"type":"string"}},"target":{"$ref":"#/components/schemas/IntegrationTarget"},"verified":{"type":"boolean","description":"If true, the integration has been verified by the GitBook team"},"visibility":{"$ref":"#/components/schemas/IntegrationVisibility"},"scopes":{"$ref":"#/components/schemas/IntegrationScopes"},"categories":{"$ref":"#/components/schemas/IntegrationCategories"},"blocks":{"$ref":"#/components/schemas/IntegrationBlocks"},"contentSources":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationContentSource"}},"configurations":{"$ref":"#/components/schemas/IntegrationConfigurations"},"externalLinks":{"$ref":"#/components/schemas/IntegrationExternalLinks"},"owner":{"$ref":"#/components/schemas/Organization"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the integration in the API","format":"uri"},"icon":{"type":"string","description":"URL of the icon associated to the integration","format":"uri"},"app":{"type":"string","description":"URL of the integration in the application","format":"uri"},"assets":{"type":"string","description":"URL of the integration's assets.","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration","format":"uri"}},"required":["location","app","assets","publicEndpoint"]},"permissions":{"type":"object","description":"The set of permissions for the integration","properties":{"admin":{"type":"boolean"}},"required":["admin"]},"contentSecurityPolicy":{"$ref":"#/components/schemas/IntegrationContentSecurityPolicy"}},"required":["object","name","version","title","scopes","categories","visibility","target","verified","previewImages","externalLinks","owner","permissions","urls"]},"IntegrationTitle":{"type":"string","description":"Title of the integration","minLength":2,"maxLength":30},"IntegrationDescription":{"type":"string","description":"Description of the integration","maxLength":100},"IntegrationSummary":{"type":"string","description":"Long form markdown summary of the integration","maxLength":2048},"IntegrationVisibility":{"type":"string","enum":["public","private","unlisted"]},"IntegrationScopes":{"type":"array","description":"Permissions that should be granted to the integration","items":{"$ref":"#/components/schemas/IntegrationScope"}},"IntegrationCategories":{"type":"array","description":"Categories for which the integration is listed in the marketplace","items":{"$ref":"#/components/schemas/IntegrationCategory"}},"IntegrationBlocks":{"type":"array","description":"Custom blocks defined by this integration.","items":{"$ref":"#/components/schemas/IntegrationBlock"}},"IntegrationBlock":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID in the integration for the block. It also represents the UI component used."},"title":{"type":"string","description":"Short descriptive title for the block.","minLength":2,"maxLength":40},"description":{"type":"string","description":"Long descriptive text for the block.","minLength":0,"maxLength":150},"icon":{"type":"string","description":"URL of the icon to represent this block."},"urlUnfurl":{"type":"array","description":"URLs patterns to convert as this block.","items":{"type":"string"}},"markdown":{"$ref":"#/components/schemas/IntegrationBlockMarkdown"}},"required":["id","title"]},"IntegrationBlockMarkdown":{"oneOf":[{"type":"object","description":"Format the custom block as a codeblock","properties":{"codeblock":{"description":"Code block syntax to use to identify the block.","type":"string"},"body":{"description":"Key of the property to use as body of the codeblock.","type":"string"}},"required":["codeblock","body"]}]},"IntegrationContentSource":{"type":"object","description":"Definition of a content source provided by the integration.","properties":{"id":{"type":"string","description":"Unique ID in the integration for the source."},"title":{"type":"string","description":"Short descriptive title for the source.","minLength":2,"maxLength":40},"description":{"type":"string","description":"Long descriptive text for the source.","minLength":0,"maxLength":150},"icon":{"type":"string","description":"URL of the icon to represent this source."},"configuration":{"$ref":"#/components/schemas/IntegrationConfigurationComponent"}},"required":["id","title","configuration"]},"IntegrationConfigurationComponent":{"type":"object","description":"ContentKit component for configuration","properties":{"componentId":{"type":"string","description":"ID of the ContentKit component defined in the integration"}},"required":["componentId"]},"IntegrationConfigurations":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/IntegrationConfiguration"},"space":{"$ref":"#/components/schemas/IntegrationConfiguration"},"site":{"$ref":"#/components/schemas/IntegrationConfiguration"}}},"IntegrationConfiguration":{"oneOf":[{"$ref":"#/components/schemas/IntegrationConfigurationSchema"},{"$ref":"#/components/schemas/IntegrationConfigurationComponent"}]},"IntegrationConfigurationSchema":{"type":"object","description":"Schema for a configuration","properties":{"properties":{"type":"object","additionalProperties":{"allOf":[{"type":"object","properties":{"title":{"$ref":"#/components/schemas/IntegrationPropertyTitle"},"description":{"type":"string","maxLength":100}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["string"]},"default":{"type":"string"},"completion_url":{"description":"If specified, this URL will be called to fetch suggestions for auto-completing the property.","type":"string"},"enum":{"type":"array","description":"If specified, only values from this array are allowed as inputs.","items":{"type":"string"}}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"default":{"type":"number"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["boolean"]},"default":{"type":"boolean"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["button"]},"callback_url":{"type":"string"},"button_text":{"type":"string"}},"required":["type","callback_url","button_text"]}]}]}},"required":{"type":"array","uniqueItems":true,"items":{"type":"string"}}},"required":["properties"]},"IntegrationPropertyTitle":{"type":"string","description":"Property title for an integration configuration property","minLength":2,"maxLength":50},"IntegrationExternalLinks":{"type":"array","description":"External urls configured by the developer of the integration","maxItems":5,"items":{"type":"object","properties":{"url":{"$ref":"#/components/schemas/URL"},"label":{"type":"string"}},"required":["url","label"]}},"URL":{"type":"string","format":"uri","maxLength":2048},"Organization":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"organization\"","enum":["organization"]},"id":{"type":"string","description":"Unique identifier for the organization"},"title":{"$ref":"#/components/schemas/OrganizationTitle"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"emailDomains":{"$ref":"#/components/schemas/OrganizationEmailDomains"},"hostname":{"$ref":"#/components/schemas/OrganizationHostname"},"type":{"$ref":"#/components/schemas/OrganizationType"},"useCase":{"$ref":"#/components/schemas/OrganizationUseCase"},"communityType":{"$ref":"#/components/schemas/OrganizationCommunityType"},"defaultRole":{"$ref":"#/components/schemas/MemberRoleOrGuest"},"defaultContent":{"$ref":"#/components/schemas/OrganizationDefaultContent"},"sso":{"description":"Whether SSO is enforced organization-wide","type":"boolean"},"ai":{"description":"If true, the organization is configured to use all our AI features.","type":"boolean"},"inviteLinks":{"description":"If true, invite links are enabled for this organization.","type":"boolean"},"plan":{"$ref":"#/components/schemas/BillingProduct"},"billing":{"description":"Billing details, only available for org members.","$ref":"#/components/schemas/OrganizationBilling"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the organization in the API","format":"uri"},"app":{"type":"string","description":"URL of the organization in the application","format":"uri"},"logo":{"description":"URL of the logo of this organization, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"trial":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/BillingTrialStatus"},"count":{"type":"integer","description":"Number of trials the organization has consumed."},"endDate":{"description":"The trial's end date, if the organization has or had a trial.","$ref":"#/components/schemas/Timestamp"},"decision":{"type":"string","description":"The decision taken by the user at the end of the trial","enum":["downgrade"]}},"required":["status","count"]},"customHostname":{"description":"Custom hostname linked to this organization","type":"string"},"blocked":{"type":"object","description":"If the organization is blocked, information about the block will appear here","properties":{"source":{"$ref":"#/components/schemas/BlockSource"},"reason":{"$ref":"#/components/schemas/BlockReason"}},"required":["reason"]},"internal_billingMigration":{"type":"object","properties":{"deadline":{"description":"When we will upgrade the organization onto new pricing, if they haven't already.","$ref":"#/components/schemas/Timestamp"},"discountPercent":{"description":"A discount the organization may have received thanks to migrating early.","type":"number"},"discountEndDate":{"description":"The expiration date of the discount, after wich regular pricing resumes.","$ref":"#/components/schemas/Timestamp"}}},"permissions":{"type":"object","description":"The set of permissions for the organization","properties":{"view":{"type":"boolean","description":"Can the user view the organization."},"access":{"type":"boolean","description":"Can the user view the organization in the application."},"admin":{"type":"boolean","description":"Can the user manage the title, members, etc."},"ownTeam":{"type":"boolean","description":"Is the user a team owner."},"createContent":{"type":"boolean","description":"Can the user create new spaces/collections in the organization."},"createOpenAPISpec":{"type":"boolean","description":"Can the user create new OpenAPI specifications."},"viewBilling":{"type":"boolean","description":"Can the user view the billing details of the organization."},"listMembers":{"type":"boolean","description":"Can the user list the members of the organization."},"listTeams":{"type":"boolean","description":"Can the user list the teams in the organization."},"listIntegrations":{"type":"boolean","description":"Can the user list the integrations in the organization."},"listInstallations":{"type":"boolean","description":"Can the user list the integration installations in the organization."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the organization."}},"required":["view","access","admin","ownTeam","createContent","createOpenAPISpec","viewBilling","listMembers","listTeams","listIntegrations","listInstallations","installIntegration"]}},"required":["object","id","plan","title","createdAt","inviteLinks","type","emailDomains","mergeRules","urls","trial","permissions"]},"OrganizationTitle":{"type":"string","description":"Name of the organization","minLength":2,"maxLength":255,"pattern":"\\S.*\\S"},"Timestamp":{"type":"string","format":"date-time"},"OrganizationEmailDomains":{"type":"array","items":{"type":"string"}},"OrganizationHostname":{"type":"string","description":"Default hostname for the organization's public content, e.g. <org-hostname>.gitbook.io","minLength":3,"maxLength":32},"OrganizationType":{"type":"string","enum":["business","community"]},"OrganizationUseCase":{"type":"string","enum":["internalDocs","docsSite","audienceControlledSite","productDocs","teamKnowledgeBase","designSystem","openSourceDocs","notes","other"]},"OrganizationCommunityType":{"type":"string","enum":["nonProfit","openSource","education"]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"OrganizationDefaultContent":{"description":"The default content for the organization","oneOf":[{"$ref":"#/components/schemas/SitePointer"}]},"SitePointer":{"type":"object","properties":{"type":{"type":"string","enum":["site"]},"site":{"type":"string","description":"Unique identifier for the site"}},"required":["type","site"]},"BillingProduct":{"type":"string","description":"Name of the product","enum":["free_2024","plus_2024","pro_2024","enterprise_2024","community_2024","free","plus","pro","internal"]},"OrganizationBilling":{"type":"object","properties":{"interval":{"$ref":"#/components/schemas/BillingInterval"},"endDate":{"oneOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"hasPaymentFailed":{"description":"If true, we were unable to collect the last payment","type":"boolean"},"canCheckout":{"description":"If true, organization can create a checkout session to subscribe/update billing. \nIf false, organization must resolve other billing issues before a checkout can be done.\n","type":"boolean"},"isScheduledToCancel":{"description":"If true, the billing is set to cancel at the end of its current period","type":"boolean"},"pricing":{"description":"Pricing information for the organization","$ref":"#/components/schemas/OrganizationPricing"},"usageAddons":{"description":"Configuration for the usage-based addons","type":"object","additionalProperties":{"$ref":"#/components/schemas/BillingMeterAddon"}},"minUsers":{"description":"The minimum number of members allowed for this organization.","type":"number"},"maxUsers":{"description":"The maximum number of members allowed for this organization","type":"number"},"minPremiumSites":{"description":"The minimum number of premium sites allowed for this organization.","type":"number"},"maxPremiumSites":{"description":"The maximum number of premium sites allowed for this organization.","type":"number"},"minUltimateSites":{"description":"The minimum number of ultimate sites allowed for this organization.","type":"number"},"maxUltimateSites":{"description":"The maximum number of ultimate sites allowed for this organization.","type":"number"},"paidMembers":{"description":"The number of paid members on the current subscription.","type":"number"},"paidPremiumSites":{"description":"The number of paid premium sites on the current subscription.","type":"number"},"paidUltimateSites":{"description":"The number of paid ultimate sites on the current subscription.","type":"number"}},"required":["interval","endDate","hasPaymentFailed","canCheckout","isScheduledToCancel","pricing","usageAddons"]},"BillingInterval":{"type":"string","description":"Interval for a billing subscription","enum":["monthly","yearly"]},"OrganizationPricing":{"type":"object","description":"Pricing information for an organization","properties":{"members":{"type":"object","description":"Pricing for members (organization plan)","properties":{"plus_2024":{"$ref":"#/components/schemas/OrganizationPricePair"},"pro_2024":{"$ref":"#/components/schemas/OrganizationPricePair"}},"required":["plus_2024","pro_2024"],"additionalProperties":false},"sites":{"type":"object","description":"Pricing for site types (site plans)","properties":{"premium":{"$ref":"#/components/schemas/OrganizationPricePair"},"ultimate":{"$ref":"#/components/schemas/OrganizationPricePair"}},"required":["premium","ultimate"],"additionalProperties":false}},"required":["members","sites"]},"OrganizationPricePair":{"type":"object","description":"Pricing pair for monthly and yearly intervals","properties":{"monthly":{"type":"number","description":"Monthly price in USD","minimum":0},"yearly":{"type":"number","description":"Yearly price in USD (per month)","minimum":0}},"required":["monthly","yearly"]},"BillingMeterAddon":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"BillingTrialStatus":{"type":"string","description":"- notapplicable, no trial can be started for this organization. - none, no trial has been started yet. - active, trial is active. - ended, the trial has ended and the user has choosen to stay on the free plan or has upgraded to a paid plan. - expired, the trial has ended but the user hasn't deciced yet what to do.\n","enum":["notapplicable","none","active","ended","expired"]},"BlockSource":{"type":"string","description":"Source for an organization block","enum":["backoffice","external","internal"]},"BlockReason":{"type":"string","description":"A short description giving context on the reason for the block.","minLength":1,"maxLength":255},"IntegrationContentSecurityPolicy":{"description":"Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as \nheaders when processing the script fetch event and the blocks fetch events.\n","oneOf":[{"type":"string"},{"type":"object","properties":{"base-uri":{"type":"string"},"block-all-mixed-content":{"type":"string"},"child-src":{"type":"string"},"connect-src":{"type":"string"},"default-src":{"type":"string"},"font-src":{"type":"string"},"form-action":{"type":"string"},"frame-ancestors":{"type":"string"},"frame-src":{"type":"string"},"img-src":{"type":"string"},"manifest-src":{"type":"string"},"media-src":{"type":"string"},"navigate-to":{"type":"string"},"object-src":{"type":"string"},"plugin-types":{"type":"string"},"prefetch-src":{"type":"string"},"referrer":{"type":"string"},"report-to":{"type":"string"},"report-uri":{"type":"string"},"require-sri-for":{"type":"string"},"require-trusted-types-for":{"type":"string"},"sandbox":{"type":"string"},"script-src":{"type":"string"},"script-src-attr":{"type":"string"},"script-src-elem":{"type":"string"},"style-src":{"type":"string"},"style-src-attr":{"type":"string"},"style-src-elem":{"type":"string"},"trusted-types":{"type":"string"},"upgrade-insecure-requests":{"type":"string"},"worker-src":{"type":"string"}}}]}}},"paths":{"/orgs/{organizationId}/integrations":{"get":{"operationId":"listOrganizationIntegrations","summary":"List all public integrations along with private ones trusted by the specific org.","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/listPage"},{"$ref":"#/components/parameters/listLimit"},{"$ref":"#/components/parameters/integrationSearchQuery"},{"$ref":"#/components/parameters/integrationSearchCategory"},{"$ref":"#/components/parameters/integrationSearchBlockDomain"},{"$ref":"#/components/parameters/integrationSearchBlocks"},{"$ref":"#/components/parameters/integrationSearchContentSources"},{"$ref":"#/components/parameters/integrationSearchOwner"},{"$ref":"#/components/parameters/integrationSearchScope"},{"$ref":"#/components/parameters/integrationSearchTarget"}],"responses":{"200":{"description":"List of integrations.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Integration"}}}}]}}}}}}}}}
```

## GET /orgs/{organizationId}/integrations/{integrationName}/installation\_status

> Get the status of an integration

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}},"integrationName":{"name":"integrationName","in":"path","required":true,"description":"Name of the integration.","schema":{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":100}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"IntegrationInstallationStatus":{"type":"string","enum":["active","pending","paused"]}},"responses":{"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[404]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/orgs/{organizationId}/integrations/{integrationName}/installation_status":{"get":{"operationId":"getOrganizationIntegrationStatus","summary":"Get the status of an integration","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/integrationName"}],"responses":{"200":{"description":"Integration installation status","content":{"application/json":{"schema":{"properties":{"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"}},"required":["status"]}}}},"404":{"$ref":"#/components/responses/NotFoundError"}}}}}}
```

## GET /orgs/{organizationId}/installations

> List all integration installations

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}},"listPage":{"name":"page","in":"query","description":"Identifier of the page results to fetch.","schema":{"type":"string"}},"listLimit":{"name":"limit","in":"query","description":"The number of results per page","schema":{"type":"number","minimum":0,"maximum":1000}},"integrationSearchQuery":{"name":"search","in":"query","description":"A search string to filter integrations by name\n","schema":{"type":"string"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"List":{"type":"object","properties":{"next":{"type":"object","properties":{"page":{"type":"string","description":"Unique identifier to query the next results page"}},"required":["page"]},"count":{"type":"number","description":"Total count of objects in the list"}}},"IntegrationInstallation":{"type":"object","description":"Installation of an integration on an account","properties":{"id":{"type":"string"},"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"space_selection":{"$ref":"#/components/schemas/IntegrationInstallationSpaceSelection"},"site_selection":{"$ref":"#/components/schemas/IntegrationInstallationSiteSelection"},"spaces":{"type":"number","description":"Count of spaces, the installation is managing"},"configuration":{"$ref":"#/components/schemas/IntegrationInstallationConfiguration"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the installation in the API","format":"uri"},"app":{"type":"string","description":"URL of the integration's installation in the application","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration's installation","format":"uri"}},"required":["location","app","publicEndpoint"]},"externalIds":{"$ref":"#/components/schemas/IntegrationInstallationExternalIds"},"target":{"$ref":"#/components/schemas/IntegrationInstallationTarget","description":"Target of the integration installation"},"network":{"$ref":"#/components/schemas/IntegrationNetwork","description":"Network configuration for the installation"}},"required":["id","status","space_selection","site_selection","spaces","configuration","urls","externalIds","target","createdAt","updatedAt"]},"IntegrationInstallationStatus":{"type":"string","enum":["active","pending","paused"]},"IntegrationInstallationSpaceSelection":{"type":"string","description":"Describe whether all spaces have been selected or there's a selection involved","enum":["all","selected"]},"IntegrationInstallationSiteSelection":{"type":"string","description":"Describe whether all sites have been selected or there's a selection involved","enum":["all","selected"]},"IntegrationInstallationConfiguration":{"type":"object","description":"Configuration of the integration at the account level","additionalProperties":true},"Timestamp":{"type":"string","format":"date-time"},"IntegrationInstallationExternalIds":{"type":"array","description":"External IDs assigned by the integration.","maxItems":5,"items":{"type":"string"}},"IntegrationInstallationTarget":{"oneOf":[{"$ref":"#/components/schemas/OrganizationTarget"}]},"OrganizationTarget":{"type":"object","required":["organization"],"properties":{"organization":{"type":"string"}}},"IntegrationNetwork":{"type":"object","description":"Network configuration for the installation","properties":{"proxy":{"type":"boolean","description":"Whether the installation is proxied through the backend"}}},"Integration":{"type":"object","properties":{"object":{"type":"string","enum":["integration"]},"name":{"type":"string","description":"Unique named identifier for the integration"},"version":{"type":"number","description":"Version of the integration"},"title":{"$ref":"#/components/schemas/IntegrationTitle"},"description":{"$ref":"#/components/schemas/IntegrationDescription"},"summary":{"$ref":"#/components/schemas/IntegrationSummary"},"previewImages":{"type":"array","description":"URLs of images to showcase the integration","maxItems":3,"items":{"type":"string"}},"target":{"$ref":"#/components/schemas/IntegrationTarget"},"verified":{"type":"boolean","description":"If true, the integration has been verified by the GitBook team"},"visibility":{"$ref":"#/components/schemas/IntegrationVisibility"},"scopes":{"$ref":"#/components/schemas/IntegrationScopes"},"categories":{"$ref":"#/components/schemas/IntegrationCategories"},"blocks":{"$ref":"#/components/schemas/IntegrationBlocks"},"contentSources":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationContentSource"}},"configurations":{"$ref":"#/components/schemas/IntegrationConfigurations"},"externalLinks":{"$ref":"#/components/schemas/IntegrationExternalLinks"},"owner":{"$ref":"#/components/schemas/Organization"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the integration in the API","format":"uri"},"icon":{"type":"string","description":"URL of the icon associated to the integration","format":"uri"},"app":{"type":"string","description":"URL of the integration in the application","format":"uri"},"assets":{"type":"string","description":"URL of the integration's assets.","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration","format":"uri"}},"required":["location","app","assets","publicEndpoint"]},"permissions":{"type":"object","description":"The set of permissions for the integration","properties":{"admin":{"type":"boolean"}},"required":["admin"]},"contentSecurityPolicy":{"$ref":"#/components/schemas/IntegrationContentSecurityPolicy"}},"required":["object","name","version","title","scopes","categories","visibility","target","verified","previewImages","externalLinks","owner","permissions","urls"]},"IntegrationTitle":{"type":"string","description":"Title of the integration","minLength":2,"maxLength":30},"IntegrationDescription":{"type":"string","description":"Description of the integration","maxLength":100},"IntegrationSummary":{"type":"string","description":"Long form markdown summary of the integration","maxLength":2048},"IntegrationTarget":{"type":"string","description":"The target on which the integration can operate and needs to be configured for","enum":["all","site","space","organization"]},"IntegrationVisibility":{"type":"string","enum":["public","private","unlisted"]},"IntegrationScopes":{"type":"array","description":"Permissions that should be granted to the integration","items":{"$ref":"#/components/schemas/IntegrationScope"}},"IntegrationScope":{"type":"string","enum":["space:content:read","space:content:write","space:metadata:read","space:metadata:write","space:git:sync","page:feedback:read","site:metadata:read","site:views:read","site:script:inject","site:script:cookies","site:visitor:auth","site:adaptive:read","site:adaptive:write","conversations:ingest","openapi:read","openapi:write"]},"IntegrationCategories":{"type":"array","description":"Categories for which the integration is listed in the marketplace","items":{"$ref":"#/components/schemas/IntegrationCategory"}},"IntegrationCategory":{"type":"string","enum":["analytics","collaboration","content","gitsync","marketing","visitor-auth","other"]},"IntegrationBlocks":{"type":"array","description":"Custom blocks defined by this integration.","items":{"$ref":"#/components/schemas/IntegrationBlock"}},"IntegrationBlock":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID in the integration for the block. It also represents the UI component used."},"title":{"type":"string","description":"Short descriptive title for the block.","minLength":2,"maxLength":40},"description":{"type":"string","description":"Long descriptive text for the block.","minLength":0,"maxLength":150},"icon":{"type":"string","description":"URL of the icon to represent this block."},"urlUnfurl":{"type":"array","description":"URLs patterns to convert as this block.","items":{"type":"string"}},"markdown":{"$ref":"#/components/schemas/IntegrationBlockMarkdown"}},"required":["id","title"]},"IntegrationBlockMarkdown":{"oneOf":[{"type":"object","description":"Format the custom block as a codeblock","properties":{"codeblock":{"description":"Code block syntax to use to identify the block.","type":"string"},"body":{"description":"Key of the property to use as body of the codeblock.","type":"string"}},"required":["codeblock","body"]}]},"IntegrationContentSource":{"type":"object","description":"Definition of a content source provided by the integration.","properties":{"id":{"type":"string","description":"Unique ID in the integration for the source."},"title":{"type":"string","description":"Short descriptive title for the source.","minLength":2,"maxLength":40},"description":{"type":"string","description":"Long descriptive text for the source.","minLength":0,"maxLength":150},"icon":{"type":"string","description":"URL of the icon to represent this source."},"configuration":{"$ref":"#/components/schemas/IntegrationConfigurationComponent"}},"required":["id","title","configuration"]},"IntegrationConfigurationComponent":{"type":"object","description":"ContentKit component for configuration","properties":{"componentId":{"type":"string","description":"ID of the ContentKit component defined in the integration"}},"required":["componentId"]},"IntegrationConfigurations":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/IntegrationConfiguration"},"space":{"$ref":"#/components/schemas/IntegrationConfiguration"},"site":{"$ref":"#/components/schemas/IntegrationConfiguration"}}},"IntegrationConfiguration":{"oneOf":[{"$ref":"#/components/schemas/IntegrationConfigurationSchema"},{"$ref":"#/components/schemas/IntegrationConfigurationComponent"}]},"IntegrationConfigurationSchema":{"type":"object","description":"Schema for a configuration","properties":{"properties":{"type":"object","additionalProperties":{"allOf":[{"type":"object","properties":{"title":{"$ref":"#/components/schemas/IntegrationPropertyTitle"},"description":{"type":"string","maxLength":100}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["string"]},"default":{"type":"string"},"completion_url":{"description":"If specified, this URL will be called to fetch suggestions for auto-completing the property.","type":"string"},"enum":{"type":"array","description":"If specified, only values from this array are allowed as inputs.","items":{"type":"string"}}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"default":{"type":"number"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["boolean"]},"default":{"type":"boolean"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["button"]},"callback_url":{"type":"string"},"button_text":{"type":"string"}},"required":["type","callback_url","button_text"]}]}]}},"required":{"type":"array","uniqueItems":true,"items":{"type":"string"}}},"required":["properties"]},"IntegrationPropertyTitle":{"type":"string","description":"Property title for an integration configuration property","minLength":2,"maxLength":50},"IntegrationExternalLinks":{"type":"array","description":"External urls configured by the developer of the integration","maxItems":5,"items":{"type":"object","properties":{"url":{"$ref":"#/components/schemas/URL"},"label":{"type":"string"}},"required":["url","label"]}},"URL":{"type":"string","format":"uri","maxLength":2048},"Organization":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"organization\"","enum":["organization"]},"id":{"type":"string","description":"Unique identifier for the organization"},"title":{"$ref":"#/components/schemas/OrganizationTitle"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"emailDomains":{"$ref":"#/components/schemas/OrganizationEmailDomains"},"hostname":{"$ref":"#/components/schemas/OrganizationHostname"},"type":{"$ref":"#/components/schemas/OrganizationType"},"useCase":{"$ref":"#/components/schemas/OrganizationUseCase"},"communityType":{"$ref":"#/components/schemas/OrganizationCommunityType"},"defaultRole":{"$ref":"#/components/schemas/MemberRoleOrGuest"},"defaultContent":{"$ref":"#/components/schemas/OrganizationDefaultContent"},"sso":{"description":"Whether SSO is enforced organization-wide","type":"boolean"},"ai":{"description":"If true, the organization is configured to use all our AI features.","type":"boolean"},"inviteLinks":{"description":"If true, invite links are enabled for this organization.","type":"boolean"},"plan":{"$ref":"#/components/schemas/BillingProduct"},"billing":{"description":"Billing details, only available for org members.","$ref":"#/components/schemas/OrganizationBilling"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the organization in the API","format":"uri"},"app":{"type":"string","description":"URL of the organization in the application","format":"uri"},"logo":{"description":"URL of the logo of this organization, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"trial":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/BillingTrialStatus"},"count":{"type":"integer","description":"Number of trials the organization has consumed."},"endDate":{"description":"The trial's end date, if the organization has or had a trial.","$ref":"#/components/schemas/Timestamp"},"decision":{"type":"string","description":"The decision taken by the user at the end of the trial","enum":["downgrade"]}},"required":["status","count"]},"customHostname":{"description":"Custom hostname linked to this organization","type":"string"},"blocked":{"type":"object","description":"If the organization is blocked, information about the block will appear here","properties":{"source":{"$ref":"#/components/schemas/BlockSource"},"reason":{"$ref":"#/components/schemas/BlockReason"}},"required":["reason"]},"internal_billingMigration":{"type":"object","properties":{"deadline":{"description":"When we will upgrade the organization onto new pricing, if they haven't already.","$ref":"#/components/schemas/Timestamp"},"discountPercent":{"description":"A discount the organization may have received thanks to migrating early.","type":"number"},"discountEndDate":{"description":"The expiration date of the discount, after wich regular pricing resumes.","$ref":"#/components/schemas/Timestamp"}}},"permissions":{"type":"object","description":"The set of permissions for the organization","properties":{"view":{"type":"boolean","description":"Can the user view the organization."},"access":{"type":"boolean","description":"Can the user view the organization in the application."},"admin":{"type":"boolean","description":"Can the user manage the title, members, etc."},"ownTeam":{"type":"boolean","description":"Is the user a team owner."},"createContent":{"type":"boolean","description":"Can the user create new spaces/collections in the organization."},"createOpenAPISpec":{"type":"boolean","description":"Can the user create new OpenAPI specifications."},"viewBilling":{"type":"boolean","description":"Can the user view the billing details of the organization."},"listMembers":{"type":"boolean","description":"Can the user list the members of the organization."},"listTeams":{"type":"boolean","description":"Can the user list the teams in the organization."},"listIntegrations":{"type":"boolean","description":"Can the user list the integrations in the organization."},"listInstallations":{"type":"boolean","description":"Can the user list the integration installations in the organization."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the organization."}},"required":["view","access","admin","ownTeam","createContent","createOpenAPISpec","viewBilling","listMembers","listTeams","listIntegrations","listInstallations","installIntegration"]}},"required":["object","id","plan","title","createdAt","inviteLinks","type","emailDomains","mergeRules","urls","trial","permissions"]},"OrganizationTitle":{"type":"string","description":"Name of the organization","minLength":2,"maxLength":255,"pattern":"\\S.*\\S"},"OrganizationEmailDomains":{"type":"array","items":{"type":"string"}},"OrganizationHostname":{"type":"string","description":"Default hostname for the organization's public content, e.g. <org-hostname>.gitbook.io","minLength":3,"maxLength":32},"OrganizationType":{"type":"string","enum":["business","community"]},"OrganizationUseCase":{"type":"string","enum":["internalDocs","docsSite","audienceControlledSite","productDocs","teamKnowledgeBase","designSystem","openSourceDocs","notes","other"]},"OrganizationCommunityType":{"type":"string","enum":["nonProfit","openSource","education"]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"OrganizationDefaultContent":{"description":"The default content for the organization","oneOf":[{"$ref":"#/components/schemas/SitePointer"}]},"SitePointer":{"type":"object","properties":{"type":{"type":"string","enum":["site"]},"site":{"type":"string","description":"Unique identifier for the site"}},"required":["type","site"]},"BillingProduct":{"type":"string","description":"Name of the product","enum":["free_2024","plus_2024","pro_2024","enterprise_2024","community_2024","free","plus","pro","internal"]},"OrganizationBilling":{"type":"object","properties":{"interval":{"$ref":"#/components/schemas/BillingInterval"},"endDate":{"oneOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"hasPaymentFailed":{"description":"If true, we were unable to collect the last payment","type":"boolean"},"canCheckout":{"description":"If true, organization can create a checkout session to subscribe/update billing. \nIf false, organization must resolve other billing issues before a checkout can be done.\n","type":"boolean"},"isScheduledToCancel":{"description":"If true, the billing is set to cancel at the end of its current period","type":"boolean"},"pricing":{"description":"Pricing information for the organization","$ref":"#/components/schemas/OrganizationPricing"},"usageAddons":{"description":"Configuration for the usage-based addons","type":"object","additionalProperties":{"$ref":"#/components/schemas/BillingMeterAddon"}},"minUsers":{"description":"The minimum number of members allowed for this organization.","type":"number"},"maxUsers":{"description":"The maximum number of members allowed for this organization","type":"number"},"minPremiumSites":{"description":"The minimum number of premium sites allowed for this organization.","type":"number"},"maxPremiumSites":{"description":"The maximum number of premium sites allowed for this organization.","type":"number"},"minUltimateSites":{"description":"The minimum number of ultimate sites allowed for this organization.","type":"number"},"maxUltimateSites":{"description":"The maximum number of ultimate sites allowed for this organization.","type":"number"},"paidMembers":{"description":"The number of paid members on the current subscription.","type":"number"},"paidPremiumSites":{"description":"The number of paid premium sites on the current subscription.","type":"number"},"paidUltimateSites":{"description":"The number of paid ultimate sites on the current subscription.","type":"number"}},"required":["interval","endDate","hasPaymentFailed","canCheckout","isScheduledToCancel","pricing","usageAddons"]},"BillingInterval":{"type":"string","description":"Interval for a billing subscription","enum":["monthly","yearly"]},"OrganizationPricing":{"type":"object","description":"Pricing information for an organization","properties":{"members":{"type":"object","description":"Pricing for members (organization plan)","properties":{"plus_2024":{"$ref":"#/components/schemas/OrganizationPricePair"},"pro_2024":{"$ref":"#/components/schemas/OrganizationPricePair"}},"required":["plus_2024","pro_2024"],"additionalProperties":false},"sites":{"type":"object","description":"Pricing for site types (site plans)","properties":{"premium":{"$ref":"#/components/schemas/OrganizationPricePair"},"ultimate":{"$ref":"#/components/schemas/OrganizationPricePair"}},"required":["premium","ultimate"],"additionalProperties":false}},"required":["members","sites"]},"OrganizationPricePair":{"type":"object","description":"Pricing pair for monthly and yearly intervals","properties":{"monthly":{"type":"number","description":"Monthly price in USD","minimum":0},"yearly":{"type":"number","description":"Yearly price in USD (per month)","minimum":0}},"required":["monthly","yearly"]},"BillingMeterAddon":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"BillingTrialStatus":{"type":"string","description":"- notapplicable, no trial can be started for this organization. - none, no trial has been started yet. - active, trial is active. - ended, the trial has ended and the user has choosen to stay on the free plan or has upgraded to a paid plan. - expired, the trial has ended but the user hasn't deciced yet what to do.\n","enum":["notapplicable","none","active","ended","expired"]},"BlockSource":{"type":"string","description":"Source for an organization block","enum":["backoffice","external","internal"]},"BlockReason":{"type":"string","description":"A short description giving context on the reason for the block.","minLength":1,"maxLength":255},"IntegrationContentSecurityPolicy":{"description":"Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as \nheaders when processing the script fetch event and the blocks fetch events.\n","oneOf":[{"type":"string"},{"type":"object","properties":{"base-uri":{"type":"string"},"block-all-mixed-content":{"type":"string"},"child-src":{"type":"string"},"connect-src":{"type":"string"},"default-src":{"type":"string"},"font-src":{"type":"string"},"form-action":{"type":"string"},"frame-ancestors":{"type":"string"},"frame-src":{"type":"string"},"img-src":{"type":"string"},"manifest-src":{"type":"string"},"media-src":{"type":"string"},"navigate-to":{"type":"string"},"object-src":{"type":"string"},"plugin-types":{"type":"string"},"prefetch-src":{"type":"string"},"referrer":{"type":"string"},"report-to":{"type":"string"},"report-uri":{"type":"string"},"require-sri-for":{"type":"string"},"require-trusted-types-for":{"type":"string"},"sandbox":{"type":"string"},"script-src":{"type":"string"},"script-src-attr":{"type":"string"},"script-src-elem":{"type":"string"},"style-src":{"type":"string"},"style-src-attr":{"type":"string"},"style-src-elem":{"type":"string"},"trusted-types":{"type":"string"},"upgrade-insecure-requests":{"type":"string"},"worker-src":{"type":"string"}}}]}}},"paths":{"/orgs/{organizationId}/installations":{"get":{"operationId":"listOrganizationInstallations","summary":"List all integration installations","tags":["integrations"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/listPage"},{"$ref":"#/components/parameters/listLimit"},{"$ref":"#/components/parameters/integrationSearchQuery"}],"responses":{"200":{"description":"List of integrations with the associated installations.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","properties":{"installation":{"$ref":"#/components/schemas/IntegrationInstallation"},"integration":{"$ref":"#/components/schemas/Integration"}},"required":["integration","installation"]}}}}]}}}}}}}}}
```

## GET /orgs/{organizationId}/integrations/installations-status

> List all integration statuses

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"user-internal":[]},{"user-staff":[]},{"user-internal-or-staff":[]},{"integration":[]},{"integration-installation":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"user-internal":{"type":"http","scheme":"bearer"},"user-staff":{"type":"http","scheme":"bearer"},"user-internal-or-staff":{"type":"http","scheme":"bearer"},"integration":{"type":"http","scheme":"bearer"},"integration-installation":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}},"listPage":{"name":"page","in":"query","description":"Identifier of the page results to fetch.","schema":{"type":"string"}},"listLimit":{"name":"limit","in":"query","description":"The number of results per page","schema":{"type":"number","minimum":0,"maximum":1000}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"List":{"type":"object","properties":{"next":{"type":"object","properties":{"page":{"type":"string","description":"Unique identifier to query the next results page"}},"required":["page"]},"count":{"type":"number","description":"Total count of objects in the list"}}},"InstalledIntegration":{"type":"object","description":"An installed integration with its current status","required":["status","integration"],"properties":{"status":{"$ref":"#/components/schemas/IntegrationInstallationStatus"},"integration":{"$ref":"#/components/schemas/Integration"}}},"IntegrationInstallationStatus":{"type":"string","enum":["active","pending","paused"]},"Integration":{"type":"object","properties":{"object":{"type":"string","enum":["integration"]},"name":{"type":"string","description":"Unique named identifier for the integration"},"version":{"type":"number","description":"Version of the integration"},"title":{"$ref":"#/components/schemas/IntegrationTitle"},"description":{"$ref":"#/components/schemas/IntegrationDescription"},"summary":{"$ref":"#/components/schemas/IntegrationSummary"},"previewImages":{"type":"array","description":"URLs of images to showcase the integration","maxItems":3,"items":{"type":"string"}},"target":{"$ref":"#/components/schemas/IntegrationTarget"},"verified":{"type":"boolean","description":"If true, the integration has been verified by the GitBook team"},"visibility":{"$ref":"#/components/schemas/IntegrationVisibility"},"scopes":{"$ref":"#/components/schemas/IntegrationScopes"},"categories":{"$ref":"#/components/schemas/IntegrationCategories"},"blocks":{"$ref":"#/components/schemas/IntegrationBlocks"},"contentSources":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationContentSource"}},"configurations":{"$ref":"#/components/schemas/IntegrationConfigurations"},"externalLinks":{"$ref":"#/components/schemas/IntegrationExternalLinks"},"owner":{"$ref":"#/components/schemas/Organization"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the integration in the API","format":"uri"},"icon":{"type":"string","description":"URL of the icon associated to the integration","format":"uri"},"app":{"type":"string","description":"URL of the integration in the application","format":"uri"},"assets":{"type":"string","description":"URL of the integration's assets.","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration","format":"uri"}},"required":["location","app","assets","publicEndpoint"]},"permissions":{"type":"object","description":"The set of permissions for the integration","properties":{"admin":{"type":"boolean"}},"required":["admin"]},"contentSecurityPolicy":{"$ref":"#/components/schemas/IntegrationContentSecurityPolicy"}},"required":["object","name","version","title","scopes","categories","visibility","target","verified","previewImages","externalLinks","owner","permissions","urls"]},"IntegrationTitle":{"type":"string","description":"Title of the integration","minLength":2,"maxLength":30},"IntegrationDescription":{"type":"string","description":"Description of the integration","maxLength":100},"IntegrationSummary":{"type":"string","description":"Long form markdown summary of the integration","maxLength":2048},"IntegrationTarget":{"type":"string","description":"The target on which the integration can operate and needs to be configured for","enum":["all","site","space","organization"]},"IntegrationVisibility":{"type":"string","enum":["public","private","unlisted"]},"IntegrationScopes":{"type":"array","description":"Permissions that should be granted to the integration","items":{"$ref":"#/components/schemas/IntegrationScope"}},"IntegrationScope":{"type":"string","enum":["space:content:read","space:content:write","space:metadata:read","space:metadata:write","space:git:sync","page:feedback:read","site:metadata:read","site:views:read","site:script:inject","site:script:cookies","site:visitor:auth","site:adaptive:read","site:adaptive:write","conversations:ingest","openapi:read","openapi:write"]},"IntegrationCategories":{"type":"array","description":"Categories for which the integration is listed in the marketplace","items":{"$ref":"#/components/schemas/IntegrationCategory"}},"IntegrationCategory":{"type":"string","enum":["analytics","collaboration","content","gitsync","marketing","visitor-auth","other"]},"IntegrationBlocks":{"type":"array","description":"Custom blocks defined by this integration.","items":{"$ref":"#/components/schemas/IntegrationBlock"}},"IntegrationBlock":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID in the integration for the block. It also represents the UI component used."},"title":{"type":"string","description":"Short descriptive title for the block.","minLength":2,"maxLength":40},"description":{"type":"string","description":"Long descriptive text for the block.","minLength":0,"maxLength":150},"icon":{"type":"string","description":"URL of the icon to represent this block."},"urlUnfurl":{"type":"array","description":"URLs patterns to convert as this block.","items":{"type":"string"}},"markdown":{"$ref":"#/components/schemas/IntegrationBlockMarkdown"}},"required":["id","title"]},"IntegrationBlockMarkdown":{"oneOf":[{"type":"object","description":"Format the custom block as a codeblock","properties":{"codeblock":{"description":"Code block syntax to use to identify the block.","type":"string"},"body":{"description":"Key of the property to use as body of the codeblock.","type":"string"}},"required":["codeblock","body"]}]},"IntegrationContentSource":{"type":"object","description":"Definition of a content source provided by the integration.","properties":{"id":{"type":"string","description":"Unique ID in the integration for the source."},"title":{"type":"string","description":"Short descriptive title for the source.","minLength":2,"maxLength":40},"description":{"type":"string","description":"Long descriptive text for the source.","minLength":0,"maxLength":150},"icon":{"type":"string","description":"URL of the icon to represent this source."},"configuration":{"$ref":"#/components/schemas/IntegrationConfigurationComponent"}},"required":["id","title","configuration"]},"IntegrationConfigurationComponent":{"type":"object","description":"ContentKit component for configuration","properties":{"componentId":{"type":"string","description":"ID of the ContentKit component defined in the integration"}},"required":["componentId"]},"IntegrationConfigurations":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/IntegrationConfiguration"},"space":{"$ref":"#/components/schemas/IntegrationConfiguration"},"site":{"$ref":"#/components/schemas/IntegrationConfiguration"}}},"IntegrationConfiguration":{"oneOf":[{"$ref":"#/components/schemas/IntegrationConfigurationSchema"},{"$ref":"#/components/schemas/IntegrationConfigurationComponent"}]},"IntegrationConfigurationSchema":{"type":"object","description":"Schema for a configuration","properties":{"properties":{"type":"object","additionalProperties":{"allOf":[{"type":"object","properties":{"title":{"$ref":"#/components/schemas/IntegrationPropertyTitle"},"description":{"type":"string","maxLength":100}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["string"]},"default":{"type":"string"},"completion_url":{"description":"If specified, this URL will be called to fetch suggestions for auto-completing the property.","type":"string"},"enum":{"type":"array","description":"If specified, only values from this array are allowed as inputs.","items":{"type":"string"}}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"default":{"type":"number"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["boolean"]},"default":{"type":"boolean"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["button"]},"callback_url":{"type":"string"},"button_text":{"type":"string"}},"required":["type","callback_url","button_text"]}]}]}},"required":{"type":"array","uniqueItems":true,"items":{"type":"string"}}},"required":["properties"]},"IntegrationPropertyTitle":{"type":"string","description":"Property title for an integration configuration property","minLength":2,"maxLength":50},"IntegrationExternalLinks":{"type":"array","description":"External urls configured by the developer of the integration","maxItems":5,"items":{"type":"object","properties":{"url":{"$ref":"#/components/schemas/URL"},"label":{"type":"string"}},"required":["url","label"]}},"URL":{"type":"string","format":"uri","maxLength":2048},"Organization":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"organization\"","enum":["organization"]},"id":{"type":"string","description":"Unique identifier for the organization"},"title":{"$ref":"#/components/schemas/OrganizationTitle"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"emailDomains":{"$ref":"#/components/schemas/OrganizationEmailDomains"},"hostname":{"$ref":"#/components/schemas/OrganizationHostname"},"type":{"$ref":"#/components/schemas/OrganizationType"},"useCase":{"$ref":"#/components/schemas/OrganizationUseCase"},"communityType":{"$ref":"#/components/schemas/OrganizationCommunityType"},"defaultRole":{"$ref":"#/components/schemas/MemberRoleOrGuest"},"defaultContent":{"$ref":"#/components/schemas/OrganizationDefaultContent"},"sso":{"description":"Whether SSO is enforced organization-wide","type":"boolean"},"ai":{"description":"If true, the organization is configured to use all our AI features.","type":"boolean"},"inviteLinks":{"description":"If true, invite links are enabled for this organization.","type":"boolean"},"plan":{"$ref":"#/components/schemas/BillingProduct"},"billing":{"description":"Billing details, only available for org members.","$ref":"#/components/schemas/OrganizationBilling"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the organization in the API","format":"uri"},"app":{"type":"string","description":"URL of the organization in the application","format":"uri"},"logo":{"description":"URL of the logo of this organization, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"trial":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/BillingTrialStatus"},"count":{"type":"integer","description":"Number of trials the organization has consumed."},"endDate":{"description":"The trial's end date, if the organization has or had a trial.","$ref":"#/components/schemas/Timestamp"},"decision":{"type":"string","description":"The decision taken by the user at the end of the trial","enum":["downgrade"]}},"required":["status","count"]},"customHostname":{"description":"Custom hostname linked to this organization","type":"string"},"blocked":{"type":"object","description":"If the organization is blocked, information about the block will appear here","properties":{"source":{"$ref":"#/components/schemas/BlockSource"},"reason":{"$ref":"#/components/schemas/BlockReason"}},"required":["reason"]},"internal_billingMigration":{"type":"object","properties":{"deadline":{"description":"When we will upgrade the organization onto new pricing, if they haven't already.","$ref":"#/components/schemas/Timestamp"},"discountPercent":{"description":"A discount the organization may have received thanks to migrating early.","type":"number"},"discountEndDate":{"description":"The expiration date of the discount, after wich regular pricing resumes.","$ref":"#/components/schemas/Timestamp"}}},"permissions":{"type":"object","description":"The set of permissions for the organization","properties":{"view":{"type":"boolean","description":"Can the user view the organization."},"access":{"type":"boolean","description":"Can the user view the organization in the application."},"admin":{"type":"boolean","description":"Can the user manage the title, members, etc."},"ownTeam":{"type":"boolean","description":"Is the user a team owner."},"createContent":{"type":"boolean","description":"Can the user create new spaces/collections in the organization."},"createOpenAPISpec":{"type":"boolean","description":"Can the user create new OpenAPI specifications."},"viewBilling":{"type":"boolean","description":"Can the user view the billing details of the organization."},"listMembers":{"type":"boolean","description":"Can the user list the members of the organization."},"listTeams":{"type":"boolean","description":"Can the user list the teams in the organization."},"listIntegrations":{"type":"boolean","description":"Can the user list the integrations in the organization."},"listInstallations":{"type":"boolean","description":"Can the user list the integration installations in the organization."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the organization."}},"required":["view","access","admin","ownTeam","createContent","createOpenAPISpec","viewBilling","listMembers","listTeams","listIntegrations","listInstallations","installIntegration"]}},"required":["object","id","plan","title","createdAt","inviteLinks","type","emailDomains","mergeRules","urls","trial","permissions"]},"OrganizationTitle":{"type":"string","description":"Name of the organization","minLength":2,"maxLength":255,"pattern":"\\S.*\\S"},"Timestamp":{"type":"string","format":"date-time"},"OrganizationEmailDomains":{"type":"array","items":{"type":"string"}},"OrganizationHostname":{"type":"string","description":"Default hostname for the organization's public content, e.g. <org-hostname>.gitbook.io","minLength":3,"maxLength":32},"OrganizationType":{"type":"string","enum":["business","community"]},"OrganizationUseCase":{"type":"string","enum":["internalDocs","docsSite","audienceControlledSite","productDocs","teamKnowledgeBase","designSystem","openSourceDocs","notes","other"]},"OrganizationCommunityType":{"type":"string","enum":["nonProfit","openSource","education"]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"OrganizationDefaultContent":{"description":"The default content for the organization","oneOf":[{"$ref":"#/components/schemas/SitePointer"}]},"SitePointer":{"type":"object","properties":{"type":{"type":"string","enum":["site"]},"site":{"type":"string","description":"Unique identifier for the site"}},"required":["type","site"]},"BillingProduct":{"type":"string","description":"Name of the product","enum":["free_2024","plus_2024","pro_2024","enterprise_2024","community_2024","free","plus","pro","internal"]},"OrganizationBilling":{"type":"object","properties":{"interval":{"$ref":"#/components/schemas/BillingInterval"},"endDate":{"oneOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"hasPaymentFailed":{"description":"If true, we were unable to collect the last payment","type":"boolean"},"canCheckout":{"description":"If true, organization can create a checkout session to subscribe/update billing. \nIf false, organization must resolve other billing issues before a checkout can be done.\n","type":"boolean"},"isScheduledToCancel":{"description":"If true, the billing is set to cancel at the end of its current period","type":"boolean"},"pricing":{"description":"Pricing information for the organization","$ref":"#/components/schemas/OrganizationPricing"},"usageAddons":{"description":"Configuration for the usage-based addons","type":"object","additionalProperties":{"$ref":"#/components/schemas/BillingMeterAddon"}},"minUsers":{"description":"The minimum number of members allowed for this organization.","type":"number"},"maxUsers":{"description":"The maximum number of members allowed for this organization","type":"number"},"minPremiumSites":{"description":"The minimum number of premium sites allowed for this organization.","type":"number"},"maxPremiumSites":{"description":"The maximum number of premium sites allowed for this organization.","type":"number"},"minUltimateSites":{"description":"The minimum number of ultimate sites allowed for this organization.","type":"number"},"maxUltimateSites":{"description":"The maximum number of ultimate sites allowed for this organization.","type":"number"},"paidMembers":{"description":"The number of paid members on the current subscription.","type":"number"},"paidPremiumSites":{"description":"The number of paid premium sites on the current subscription.","type":"number"},"paidUltimateSites":{"description":"The number of paid ultimate sites on the current subscription.","type":"number"}},"required":["interval","endDate","hasPaymentFailed","canCheckout","isScheduledToCancel","pricing","usageAddons"]},"BillingInterval":{"type":"string","description":"Interval for a billing subscription","enum":["monthly","yearly"]},"OrganizationPricing":{"type":"object","description":"Pricing information for an organization","properties":{"members":{"type":"object","description":"Pricing for members (organization plan)","properties":{"plus_2024":{"$ref":"#/components/schemas/OrganizationPricePair"},"pro_2024":{"$ref":"#/components/schemas/OrganizationPricePair"}},"required":["plus_2024","pro_2024"],"additionalProperties":false},"sites":{"type":"object","description":"Pricing for site types (site plans)","properties":{"premium":{"$ref":"#/components/schemas/OrganizationPricePair"},"ultimate":{"$ref":"#/components/schemas/OrganizationPricePair"}},"required":["premium","ultimate"],"additionalProperties":false}},"required":["members","sites"]},"OrganizationPricePair":{"type":"object","description":"Pricing pair for monthly and yearly intervals","properties":{"monthly":{"type":"number","description":"Monthly price in USD","minimum":0},"yearly":{"type":"number","description":"Yearly price in USD (per month)","minimum":0}},"required":["monthly","yearly"]},"BillingMeterAddon":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"BillingTrialStatus":{"type":"string","description":"- notapplicable, no trial can be started for this organization. - none, no trial has been started yet. - active, trial is active. - ended, the trial has ended and the user has choosen to stay on the free plan or has upgraded to a paid plan. - expired, the trial has ended but the user hasn't deciced yet what to do.\n","enum":["notapplicable","none","active","ended","expired"]},"BlockSource":{"type":"string","description":"Source for an organization block","enum":["backoffice","external","internal"]},"BlockReason":{"type":"string","description":"A short description giving context on the reason for the block.","minLength":1,"maxLength":255},"IntegrationContentSecurityPolicy":{"description":"Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as \nheaders when processing the script fetch event and the blocks fetch events.\n","oneOf":[{"type":"string"},{"type":"object","properties":{"base-uri":{"type":"string"},"block-all-mixed-content":{"type":"string"},"child-src":{"type":"string"},"connect-src":{"type":"string"},"default-src":{"type":"string"},"font-src":{"type":"string"},"form-action":{"type":"string"},"frame-ancestors":{"type":"string"},"frame-src":{"type":"string"},"img-src":{"type":"string"},"manifest-src":{"type":"string"},"media-src":{"type":"string"},"navigate-to":{"type":"string"},"object-src":{"type":"string"},"plugin-types":{"type":"string"},"prefetch-src":{"type":"string"},"referrer":{"type":"string"},"report-to":{"type":"string"},"report-uri":{"type":"string"},"require-sri-for":{"type":"string"},"require-trusted-types-for":{"type":"string"},"sandbox":{"type":"string"},"script-src":{"type":"string"},"script-src-attr":{"type":"string"},"script-src-elem":{"type":"string"},"style-src":{"type":"string"},"style-src-attr":{"type":"string"},"style-src-elem":{"type":"string"},"trusted-types":{"type":"string"},"upgrade-insecure-requests":{"type":"string"},"worker-src":{"type":"string"}}}]}}},"paths":{"/orgs/{organizationId}/integrations/installations-status":{"get":{"operationId":"listOrganizationIntegrationsStatus","summary":"List all integration statuses","tags":["integrations","critical"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/listPage"},{"$ref":"#/components/parameters/listLimit"},{"name":"target","in":"query","description":"Filter installations by their target (organization, space, or site). When not provided, defaults to organization-level installations for backwards compatibility","schema":{"type":"string","default":"organization","enum":["organization","space","site"]}}],"responses":{"200":{"description":"List of installed integrations and their statuses","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/InstalledIntegration"}}}}]}}}}}}}}}
```

## GET /orgs/{organizationId}/sites/{siteId}/integration-scripts

> List the scripts to embed in published content for a site.

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"sites","description":"The Docs Sites API lets you programmatically manage published documentation sites within your organization. You can list and update all sites created under a specific organization, making it easy to audit or interact with site metadata at scale.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"Site\" grouped=\"false\" %}\n    The Site object\n{% endopenapi-schemas %}\n"},{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}},"siteId":{"name":"siteId","in":"path","required":true,"description":"The unique id of the site","schema":{"type":"string"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"SiteIntegrationScript":{"type":"object","properties":{"script":{"description":"Script URL to load.","$ref":"#/components/schemas/URL"},"contentSecurityPolicy":{"description":"Content Security Policy to secure the loading of this script.","type":"string"},"cookies":{"type":"boolean","description":"If true, the script will potentially load use cookies and visitors should be aware."}},"required":["script","cookies"]},"URL":{"type":"string","format":"uri","maxLength":2048}},"responses":{"BadRequestError":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[400]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/orgs/{organizationId}/sites/{siteId}/integration-scripts":{"get":{"operationId":"listSiteIntegrationScripts","summary":"List the scripts to embed in published content for a site.","tags":["integrations","sites"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/siteId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SiteIntegrationScript"}}}}},"400":{"$ref":"#/components/responses/BadRequestError"}}}}}}
```

## GET /orgs/{organizationId}/sites/{siteId}/integrations

> List integrations enabled in a site.

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"sites","description":"The Docs Sites API lets you programmatically manage published documentation sites within your organization. You can list and update all sites created under a specific organization, making it easy to audit or interact with site metadata at scale.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"Site\" grouped=\"false\" %}\n    The Site object\n{% endopenapi-schemas %}\n"},{"name":"integrations","description":"Expand the capabilities of GitBook by connecting it with various external platforms—CRM, finding trackers, or CI/CD pipelines—through standardized integration endpoints.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}},"siteId":{"name":"siteId","in":"path","required":true,"description":"The unique id of the site","schema":{"type":"string"}},"integrationSearchQuery":{"name":"search","in":"query","description":"A search string to filter integrations by name\n","schema":{"type":"string"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"List":{"type":"object","properties":{"next":{"type":"object","properties":{"page":{"type":"string","description":"Unique identifier to query the next results page"}},"required":["page"]},"count":{"type":"number","description":"Total count of objects in the list"}}},"Integration":{"type":"object","properties":{"object":{"type":"string","enum":["integration"]},"name":{"type":"string","description":"Unique named identifier for the integration"},"version":{"type":"number","description":"Version of the integration"},"title":{"$ref":"#/components/schemas/IntegrationTitle"},"description":{"$ref":"#/components/schemas/IntegrationDescription"},"summary":{"$ref":"#/components/schemas/IntegrationSummary"},"previewImages":{"type":"array","description":"URLs of images to showcase the integration","maxItems":3,"items":{"type":"string"}},"target":{"$ref":"#/components/schemas/IntegrationTarget"},"verified":{"type":"boolean","description":"If true, the integration has been verified by the GitBook team"},"visibility":{"$ref":"#/components/schemas/IntegrationVisibility"},"scopes":{"$ref":"#/components/schemas/IntegrationScopes"},"categories":{"$ref":"#/components/schemas/IntegrationCategories"},"blocks":{"$ref":"#/components/schemas/IntegrationBlocks"},"contentSources":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationContentSource"}},"configurations":{"$ref":"#/components/schemas/IntegrationConfigurations"},"externalLinks":{"$ref":"#/components/schemas/IntegrationExternalLinks"},"owner":{"$ref":"#/components/schemas/Organization"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the integration in the API","format":"uri"},"icon":{"type":"string","description":"URL of the icon associated to the integration","format":"uri"},"app":{"type":"string","description":"URL of the integration in the application","format":"uri"},"assets":{"type":"string","description":"URL of the integration's assets.","format":"uri"},"publicEndpoint":{"type":"string","description":"Public HTTP endpoint for the integration","format":"uri"}},"required":["location","app","assets","publicEndpoint"]},"permissions":{"type":"object","description":"The set of permissions for the integration","properties":{"admin":{"type":"boolean"}},"required":["admin"]},"contentSecurityPolicy":{"$ref":"#/components/schemas/IntegrationContentSecurityPolicy"}},"required":["object","name","version","title","scopes","categories","visibility","target","verified","previewImages","externalLinks","owner","permissions","urls"]},"IntegrationTitle":{"type":"string","description":"Title of the integration","minLength":2,"maxLength":30},"IntegrationDescription":{"type":"string","description":"Description of the integration","maxLength":100},"IntegrationSummary":{"type":"string","description":"Long form markdown summary of the integration","maxLength":2048},"IntegrationTarget":{"type":"string","description":"The target on which the integration can operate and needs to be configured for","enum":["all","site","space","organization"]},"IntegrationVisibility":{"type":"string","enum":["public","private","unlisted"]},"IntegrationScopes":{"type":"array","description":"Permissions that should be granted to the integration","items":{"$ref":"#/components/schemas/IntegrationScope"}},"IntegrationScope":{"type":"string","enum":["space:content:read","space:content:write","space:metadata:read","space:metadata:write","space:git:sync","page:feedback:read","site:metadata:read","site:views:read","site:script:inject","site:script:cookies","site:visitor:auth","site:adaptive:read","site:adaptive:write","conversations:ingest","openapi:read","openapi:write"]},"IntegrationCategories":{"type":"array","description":"Categories for which the integration is listed in the marketplace","items":{"$ref":"#/components/schemas/IntegrationCategory"}},"IntegrationCategory":{"type":"string","enum":["analytics","collaboration","content","gitsync","marketing","visitor-auth","other"]},"IntegrationBlocks":{"type":"array","description":"Custom blocks defined by this integration.","items":{"$ref":"#/components/schemas/IntegrationBlock"}},"IntegrationBlock":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID in the integration for the block. It also represents the UI component used."},"title":{"type":"string","description":"Short descriptive title for the block.","minLength":2,"maxLength":40},"description":{"type":"string","description":"Long descriptive text for the block.","minLength":0,"maxLength":150},"icon":{"type":"string","description":"URL of the icon to represent this block."},"urlUnfurl":{"type":"array","description":"URLs patterns to convert as this block.","items":{"type":"string"}},"markdown":{"$ref":"#/components/schemas/IntegrationBlockMarkdown"}},"required":["id","title"]},"IntegrationBlockMarkdown":{"oneOf":[{"type":"object","description":"Format the custom block as a codeblock","properties":{"codeblock":{"description":"Code block syntax to use to identify the block.","type":"string"},"body":{"description":"Key of the property to use as body of the codeblock.","type":"string"}},"required":["codeblock","body"]}]},"IntegrationContentSource":{"type":"object","description":"Definition of a content source provided by the integration.","properties":{"id":{"type":"string","description":"Unique ID in the integration for the source."},"title":{"type":"string","description":"Short descriptive title for the source.","minLength":2,"maxLength":40},"description":{"type":"string","description":"Long descriptive text for the source.","minLength":0,"maxLength":150},"icon":{"type":"string","description":"URL of the icon to represent this source."},"configuration":{"$ref":"#/components/schemas/IntegrationConfigurationComponent"}},"required":["id","title","configuration"]},"IntegrationConfigurationComponent":{"type":"object","description":"ContentKit component for configuration","properties":{"componentId":{"type":"string","description":"ID of the ContentKit component defined in the integration"}},"required":["componentId"]},"IntegrationConfigurations":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/IntegrationConfiguration"},"space":{"$ref":"#/components/schemas/IntegrationConfiguration"},"site":{"$ref":"#/components/schemas/IntegrationConfiguration"}}},"IntegrationConfiguration":{"oneOf":[{"$ref":"#/components/schemas/IntegrationConfigurationSchema"},{"$ref":"#/components/schemas/IntegrationConfigurationComponent"}]},"IntegrationConfigurationSchema":{"type":"object","description":"Schema for a configuration","properties":{"properties":{"type":"object","additionalProperties":{"allOf":[{"type":"object","properties":{"title":{"$ref":"#/components/schemas/IntegrationPropertyTitle"},"description":{"type":"string","maxLength":100}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["string"]},"default":{"type":"string"},"completion_url":{"description":"If specified, this URL will be called to fetch suggestions for auto-completing the property.","type":"string"},"enum":{"type":"array","description":"If specified, only values from this array are allowed as inputs.","items":{"type":"string"}}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"default":{"type":"number"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["boolean"]},"default":{"type":"boolean"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["button"]},"callback_url":{"type":"string"},"button_text":{"type":"string"}},"required":["type","callback_url","button_text"]}]}]}},"required":{"type":"array","uniqueItems":true,"items":{"type":"string"}}},"required":["properties"]},"IntegrationPropertyTitle":{"type":"string","description":"Property title for an integration configuration property","minLength":2,"maxLength":50},"IntegrationExternalLinks":{"type":"array","description":"External urls configured by the developer of the integration","maxItems":5,"items":{"type":"object","properties":{"url":{"$ref":"#/components/schemas/URL"},"label":{"type":"string"}},"required":["url","label"]}},"URL":{"type":"string","format":"uri","maxLength":2048},"Organization":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"organization\"","enum":["organization"]},"id":{"type":"string","description":"Unique identifier for the organization"},"title":{"$ref":"#/components/schemas/OrganizationTitle"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"emailDomains":{"$ref":"#/components/schemas/OrganizationEmailDomains"},"hostname":{"$ref":"#/components/schemas/OrganizationHostname"},"type":{"$ref":"#/components/schemas/OrganizationType"},"useCase":{"$ref":"#/components/schemas/OrganizationUseCase"},"communityType":{"$ref":"#/components/schemas/OrganizationCommunityType"},"defaultRole":{"$ref":"#/components/schemas/MemberRoleOrGuest"},"defaultContent":{"$ref":"#/components/schemas/OrganizationDefaultContent"},"sso":{"description":"Whether SSO is enforced organization-wide","type":"boolean"},"ai":{"description":"If true, the organization is configured to use all our AI features.","type":"boolean"},"inviteLinks":{"description":"If true, invite links are enabled for this organization.","type":"boolean"},"plan":{"$ref":"#/components/schemas/BillingProduct"},"billing":{"description":"Billing details, only available for org members.","$ref":"#/components/schemas/OrganizationBilling"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the organization in the API","format":"uri"},"app":{"type":"string","description":"URL of the organization in the application","format":"uri"},"logo":{"description":"URL of the logo of this organization, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"trial":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/BillingTrialStatus"},"count":{"type":"integer","description":"Number of trials the organization has consumed."},"endDate":{"description":"The trial's end date, if the organization has or had a trial.","$ref":"#/components/schemas/Timestamp"},"decision":{"type":"string","description":"The decision taken by the user at the end of the trial","enum":["downgrade"]}},"required":["status","count"]},"customHostname":{"description":"Custom hostname linked to this organization","type":"string"},"blocked":{"type":"object","description":"If the organization is blocked, information about the block will appear here","properties":{"source":{"$ref":"#/components/schemas/BlockSource"},"reason":{"$ref":"#/components/schemas/BlockReason"}},"required":["reason"]},"internal_billingMigration":{"type":"object","properties":{"deadline":{"description":"When we will upgrade the organization onto new pricing, if they haven't already.","$ref":"#/components/schemas/Timestamp"},"discountPercent":{"description":"A discount the organization may have received thanks to migrating early.","type":"number"},"discountEndDate":{"description":"The expiration date of the discount, after wich regular pricing resumes.","$ref":"#/components/schemas/Timestamp"}}},"permissions":{"type":"object","description":"The set of permissions for the organization","properties":{"view":{"type":"boolean","description":"Can the user view the organization."},"access":{"type":"boolean","description":"Can the user view the organization in the application."},"admin":{"type":"boolean","description":"Can the user manage the title, members, etc."},"ownTeam":{"type":"boolean","description":"Is the user a team owner."},"createContent":{"type":"boolean","description":"Can the user create new spaces/collections in the organization."},"createOpenAPISpec":{"type":"boolean","description":"Can the user create new OpenAPI specifications."},"viewBilling":{"type":"boolean","description":"Can the user view the billing details of the organization."},"listMembers":{"type":"boolean","description":"Can the user list the members of the organization."},"listTeams":{"type":"boolean","description":"Can the user list the teams in the organization."},"listIntegrations":{"type":"boolean","description":"Can the user list the integrations in the organization."},"listInstallations":{"type":"boolean","description":"Can the user list the integration installations in the organization."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the organization."}},"required":["view","access","admin","ownTeam","createContent","createOpenAPISpec","viewBilling","listMembers","listTeams","listIntegrations","listInstallations","installIntegration"]}},"required":["object","id","plan","title","createdAt","inviteLinks","type","emailDomains","mergeRules","urls","trial","permissions"]},"OrganizationTitle":{"type":"string","description":"Name of the organization","minLength":2,"maxLength":255,"pattern":"\\S.*\\S"},"Timestamp":{"type":"string","format":"date-time"},"OrganizationEmailDomains":{"type":"array","items":{"type":"string"}},"OrganizationHostname":{"type":"string","description":"Default hostname for the organization's public content, e.g. <org-hostname>.gitbook.io","minLength":3,"maxLength":32},"OrganizationType":{"type":"string","enum":["business","community"]},"OrganizationUseCase":{"type":"string","enum":["internalDocs","docsSite","audienceControlledSite","productDocs","teamKnowledgeBase","designSystem","openSourceDocs","notes","other"]},"OrganizationCommunityType":{"type":"string","enum":["nonProfit","openSource","education"]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"null"}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"OrganizationDefaultContent":{"description":"The default content for the organization","oneOf":[{"$ref":"#/components/schemas/SitePointer"}]},"SitePointer":{"type":"object","properties":{"type":{"type":"string","enum":["site"]},"site":{"type":"string","description":"Unique identifier for the site"}},"required":["type","site"]},"BillingProduct":{"type":"string","description":"Name of the product","enum":["free_2024","plus_2024","pro_2024","enterprise_2024","community_2024","free","plus","pro","internal"]},"OrganizationBilling":{"type":"object","properties":{"interval":{"$ref":"#/components/schemas/BillingInterval"},"endDate":{"oneOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"hasPaymentFailed":{"description":"If true, we were unable to collect the last payment","type":"boolean"},"canCheckout":{"description":"If true, organization can create a checkout session to subscribe/update billing. \nIf false, organization must resolve other billing issues before a checkout can be done.\n","type":"boolean"},"isScheduledToCancel":{"description":"If true, the billing is set to cancel at the end of its current period","type":"boolean"},"pricing":{"description":"Pricing information for the organization","$ref":"#/components/schemas/OrganizationPricing"},"usageAddons":{"description":"Configuration for the usage-based addons","type":"object","additionalProperties":{"$ref":"#/components/schemas/BillingMeterAddon"}},"minUsers":{"description":"The minimum number of members allowed for this organization.","type":"number"},"maxUsers":{"description":"The maximum number of members allowed for this organization","type":"number"},"minPremiumSites":{"description":"The minimum number of premium sites allowed for this organization.","type":"number"},"maxPremiumSites":{"description":"The maximum number of premium sites allowed for this organization.","type":"number"},"minUltimateSites":{"description":"The minimum number of ultimate sites allowed for this organization.","type":"number"},"maxUltimateSites":{"description":"The maximum number of ultimate sites allowed for this organization.","type":"number"},"paidMembers":{"description":"The number of paid members on the current subscription.","type":"number"},"paidPremiumSites":{"description":"The number of paid premium sites on the current subscription.","type":"number"},"paidUltimateSites":{"description":"The number of paid ultimate sites on the current subscription.","type":"number"}},"required":["interval","endDate","hasPaymentFailed","canCheckout","isScheduledToCancel","pricing","usageAddons"]},"BillingInterval":{"type":"string","description":"Interval for a billing subscription","enum":["monthly","yearly"]},"OrganizationPricing":{"type":"object","description":"Pricing information for an organization","properties":{"members":{"type":"object","description":"Pricing for members (organization plan)","properties":{"plus_2024":{"$ref":"#/components/schemas/OrganizationPricePair"},"pro_2024":{"$ref":"#/components/schemas/OrganizationPricePair"}},"required":["plus_2024","pro_2024"],"additionalProperties":false},"sites":{"type":"object","description":"Pricing for site types (site plans)","properties":{"premium":{"$ref":"#/components/schemas/OrganizationPricePair"},"ultimate":{"$ref":"#/components/schemas/OrganizationPricePair"}},"required":["premium","ultimate"],"additionalProperties":false}},"required":["members","sites"]},"OrganizationPricePair":{"type":"object","description":"Pricing pair for monthly and yearly intervals","properties":{"monthly":{"type":"number","description":"Monthly price in USD","minimum":0},"yearly":{"type":"number","description":"Yearly price in USD (per month)","minimum":0}},"required":["monthly","yearly"]},"BillingMeterAddon":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"BillingTrialStatus":{"type":"string","description":"- notapplicable, no trial can be started for this organization. - none, no trial has been started yet. - active, trial is active. - ended, the trial has ended and the user has choosen to stay on the free plan or has upgraded to a paid plan. - expired, the trial has ended but the user hasn't deciced yet what to do.\n","enum":["notapplicable","none","active","ended","expired"]},"BlockSource":{"type":"string","description":"Source for an organization block","enum":["backoffice","external","internal"]},"BlockReason":{"type":"string","description":"A short description giving context on the reason for the block.","minLength":1,"maxLength":255},"IntegrationContentSecurityPolicy":{"description":"Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as \nheaders when processing the script fetch event and the blocks fetch events.\n","oneOf":[{"type":"string"},{"type":"object","properties":{"base-uri":{"type":"string"},"block-all-mixed-content":{"type":"string"},"child-src":{"type":"string"},"connect-src":{"type":"string"},"default-src":{"type":"string"},"font-src":{"type":"string"},"form-action":{"type":"string"},"frame-ancestors":{"type":"string"},"frame-src":{"type":"string"},"img-src":{"type":"string"},"manifest-src":{"type":"string"},"media-src":{"type":"string"},"navigate-to":{"type":"string"},"object-src":{"type":"string"},"plugin-types":{"type":"string"},"prefetch-src":{"type":"string"},"referrer":{"type":"string"},"report-to":{"type":"string"},"report-uri":{"type":"string"},"require-sri-for":{"type":"string"},"require-trusted-types-for":{"type":"string"},"sandbox":{"type":"string"},"script-src":{"type":"string"},"script-src-attr":{"type":"string"},"script-src-elem":{"type":"string"},"style-src":{"type":"string"},"style-src-attr":{"type":"string"},"style-src-elem":{"type":"string"},"trusted-types":{"type":"string"},"upgrade-insecure-requests":{"type":"string"},"worker-src":{"type":"string"}}}]}}},"paths":{"/orgs/{organizationId}/sites/{siteId}/integrations":{"get":{"operationId":"listSiteIntegrations","summary":"List integrations enabled in a site.","tags":["integrations","sites"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/siteId"},{"$ref":"#/components/parameters/integrationSearchQuery"}],"responses":{"200":{"description":"Listing of integrations enabled in the site.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Integration"}}}}]}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gitbook.com/docs/developers/gitbook-api/api-reference/integrations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
