@gitbook/api 0.206.0 → 0.207.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/spec/openapi.yaml CHANGED
@@ -505,6 +505,12 @@ tags:
505
505
  {% openapi-schemas spec="gitbook" schemas="Subdomain" grouped="false" %}
506
506
  The Subdomain object
507
507
  {% endopenapi-schemas %}
508
+ - name: scim
509
+ x-page-icon: users
510
+ x-page-title: SCIM
511
+ x-page-description: Provision organization members automatically from an identity provider.
512
+ description: |
513
+ Connect an identity provider such as Okta or Microsoft Entra ID to provision your organization's members with SCIM.
508
514
  - name: storage
509
515
  x-page-icon: database
510
516
  x-page-title: Storage
@@ -796,7 +802,8 @@ paths:
796
802
  operationId: moveSpace
797
803
  summary: Move a space to a different collection or position
798
804
  description: Moves a space to a new parent collection and/or a new position within the hierarchy.
799
- x-gitbook-mcp: true
805
+ x-gitbook-mcp:
806
+ destructive: true
800
807
  tags:
801
808
  - spaces
802
809
  security:
@@ -907,7 +914,8 @@ paths:
907
914
  operationId: importGitRepository
908
915
  summary: Pull content into a space from a connected Git repository
909
916
  description: Triggers an import from provided Git repository into the space, updating the space's content to match the repository (if not standalone). This is an async operation — it runs in the background after the request returns 204.
910
- x-gitbook-mcp: true
917
+ x-gitbook-mcp:
918
+ destructive: true
911
919
  tags:
912
920
  - space-git
913
921
  security:
@@ -932,7 +940,8 @@ paths:
932
940
  operationId: exportToGitRepository
933
941
  summary: Push space content to a connected Git repository
934
942
  description: Triggers an export of the space's current content to the provided Git repository. This is an async operation — the export runs in the background after the request returns 204.
935
- x-gitbook-mcp: true
943
+ x-gitbook-mcp:
944
+ destructive: true
936
945
  tags:
937
946
  - space-git
938
947
  security:
@@ -1198,7 +1207,8 @@ paths:
1198
1207
  operationId: applyTemplateToSpace
1199
1208
  summary: Apply a content template to populate a space with initial pages
1200
1209
  description: Populates a space with pages and structure from a specified template, bootstrapping it with a standard documentation layout. Use this to initialise a new space rather than creating pages manually. Optionally apply the template to a specific change request instead of main content by providing the changeRequestId field.
1201
- x-gitbook-mcp: true
1210
+ x-gitbook-mcp:
1211
+ destructive: true
1202
1212
  tags:
1203
1213
  - space-content
1204
1214
  security:
@@ -1315,7 +1325,8 @@ paths:
1315
1325
  operationId: getPageById
1316
1326
  summary: Get a single page from a space by its ID
1317
1327
  description: Retrieves a page's metadata, content, and document structure from a space's current revision by its page ID. Use this when you know the exact page ID and need its content or path. For lookup by URL path, use the content/path endpoint instead.
1318
- x-gitbook-mcp: true
1328
+ x-gitbook-mcp:
1329
+ curatedBy: get_page
1319
1330
  tags:
1320
1331
  - space-content
1321
1332
  security:
@@ -1365,7 +1376,8 @@ paths:
1365
1376
  operationId: getPageByPath
1366
1377
  summary: Get a page from a space by its URL path
1367
1378
  description: Retrieves a page by its URL path (e.g. /guides/getting-started) from the space's current revision. Use this when you have a page's path rather than its ID. Returns either a document page or a group/section page depending on the path.
1368
- x-gitbook-mcp: true
1379
+ x-gitbook-mcp:
1380
+ curatedBy: get_page
1369
1381
  tags:
1370
1382
  - space-content
1371
1383
  security:
@@ -1420,7 +1432,8 @@ paths:
1420
1432
  operationId: getComputedDocument
1421
1433
  summary: Compute and render a document from a structured content source
1422
1434
  description: Server-renders a document from a provided content source definition, evaluating template expressions and resolving variables to produce a fully computed document. Use this to preview how dynamic content will look without publishing a full revision.
1423
- x-gitbook-mcp: true
1435
+ x-gitbook-mcp:
1436
+ readOnly: true
1424
1437
  tags:
1425
1438
  - space-content
1426
1439
  security:
@@ -1457,7 +1470,8 @@ paths:
1457
1470
  operationId: getComputedRevision
1458
1471
  summary: Compute and render a full revision from a structured content source
1459
1472
  description: Server-renders an entire revision — pages, files, and reusable contents — from a provided content source definition, resolving all template expressions and variables. Use this to evaluate and preview computed content before publishing. Returns the full set of pages and files with all dynamic content fully resolved.
1460
- x-gitbook-mcp: true
1473
+ x-gitbook-mcp:
1474
+ readOnly: true
1461
1475
  tags:
1462
1476
  - space-content
1463
1477
  security:
@@ -1538,7 +1552,8 @@ paths:
1538
1552
  operationId: createChangeRequest
1539
1553
  summary: Create a new change request in a space
1540
1554
  description: Creates a new change request, which is a draft working copy of the space's content — similar to a Git branch or pull request. Use this before making content edits to avoid modifying the live published content directly. Optionally supply a subject and a template to pre-populate the change request with content. Once created, use the change-request content endpoints to read and modify pages within the draft, then merge it when ready. Pass `siteFindingIds` to link the documentation findings this change request fixes. Outbound broken links are resolved by the outbound checker, rather than by merging.
1541
- x-gitbook-mcp: true
1555
+ x-gitbook-mcp:
1556
+ curatedBy: create_change_request
1542
1557
  tags:
1543
1558
  - change-requests
1544
1559
  security:
@@ -1748,7 +1763,9 @@ paths:
1748
1763
  operationId: mergeChangeRequest
1749
1764
  summary: Merge a change request into the space's live content
1750
1765
  description: Merges the change request's draft content into the space's primary (published) content, making all changes live. If the result is "conflicts", the merge was still applied but the space may need manual conflict resolution. Consider running updateChangeRequest first to sync with the latest live content and reduce conflicts.
1751
- x-gitbook-mcp: true
1766
+ x-gitbook-mcp:
1767
+ destructive: true
1768
+ curatedBy: submit_or_merge_change_request
1752
1769
  tags:
1753
1770
  - change-requests
1754
1771
  security:
@@ -1782,7 +1799,8 @@ paths:
1782
1799
  operationId: updateChangeRequest
1783
1800
  summary: Sync a change request with the latest live space content
1784
1801
  description: Rebases the change request onto the latest primary revision of the space, pulling in any changes that were merged to the live space since this change request was created. Run this before merging to minimise conflicts, especially if the change request has been open for a while.
1785
- x-gitbook-mcp: true
1802
+ x-gitbook-mcp:
1803
+ destructive: true
1786
1804
  tags:
1787
1805
  - change-requests
1788
1806
  security:
@@ -2470,6 +2488,7 @@ paths:
2470
2488
  **Renaming a page** — `update_page` can change a page's `title` and/or its `slug` (the path segment used to build its URL within its current parent). Both fields are independent: to rename only the title without changing the URL, set `title` and omit `slug`; to change the URL without changing the title, set `slug` and omit `title`.
2471
2489
  **Moving a page** — `update_page` can also change a page's parent and/or its position among siblings with `into`/`at`. Set `into` to the new parent's page ID, or `null` to move the page to the root of the tree; omit `into` to leave the parent unchanged. Set `at` to place the page at a specific zero-based index among its new siblings; omit it to leave the position unchanged (when the parent isn't changing) or append at the end (when it is). A page cannot be moved under itself or one of its own descendants. `insert_page`'s `into`/`at` remain the way to place a **new** page at creation time.
2472
2490
  To put an image or attachment in a page, upload it with an `insert_files` change. Give the file a `ref` and a page inserted in the same batch can reference it as `![Alt](./<ref>)` or `[File](./<ref>)`, which resolves to the file's ID at apply time regardless of operation order. Uploaded files are also listed as `insertedFiles` when `compat=false`, and a file already in the change request can be referenced directly as `/files/<fileId>`. Inline `data:` URIs in markdown are not ingested and large image blocks are dropped, so upload the bytes with `insert_files` instead.
2491
+ **Reusable content** (snippets shared by several pages, Git Sync's `.gitbook/includes/`) is created with `insert_reusable_contents`, changed with `update_reusable_content` and removed with `delete_reusable_content`. A page includes one in markdown as `{% include "/reusable-content/<reusableContentId>" %}`; give a new one a `ref` and a page in the same batch can include it as `{% include "./<ref>" %}`, regardless of operation order. Created reusable contents are listed as `insertedReusableContents` when `compat=false`. An update keeps the ID, so every page including it shows the change. Deleting one leaves the includes in pages unresolved, as in the editor: remove them from those pages too. Reusable content cannot include other reusable content, so an include in its document is dropped. Unlike a link, an include that matches no reusable content of the change request (or of the batch) rejects the batch, since dropping it would remove it from the page silently.
2473
2492
  **Publishing an OpenAPI spec** — an OpenAPI spec belongs to the organization (see `createOpenAPISpec`) and appears in a space only through a page that renders it. Insert that page with an `insert_computed_page` change: `{ "operation": "insert_computed_page", "title": "API reference", "computed": { "type": "builtin:openapi", "props": { "models": true }, "dependencies": { "spec": { "ref": { "kind": "openapi", "spec": "<spec slug>" } } } } }`. GitBook replaces that page, at its position, with the API reference: one page per tag (or per operation with `"grouping": "by-operation"` in `props`), plus a models page when `models` is true, regenerated whenever the spec changes. Use `into` to nest the reference under an existing page. Do not recreate a spec with `insert_page`: `openapi-operation` blocks in a document only render the operations they name.
2474
2493
  When page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by:
2475
2494
  - Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`).
@@ -2486,7 +2505,7 @@ paths:
2486
2505
 
2487
2506
  External URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail.
2488
2507
  GitBook normalizes submitted content, so the stored page may differ from what was sent. To help callers reconcile local state with the stored result, the response can list each created and modified page with its resolved ID and a `urls.location` to fetch the page's persisted content.
2489
-
2508
+ For change requests with frequent concurrent edits, consider `expectedRevision` to protect against overwriting changes made since your read. If the branch has changed since the supplied revision, the batch is rejected with HTTP 409 and none of the submitted changes are applied.
2490
2509
  **Response shape (`compat`)** — this endpoint is changing what it returns:
2491
2510
  - `compat=true` (current default) returns the updated change request, matching the endpoint's
2492
2511
  original behavior.
@@ -2495,7 +2514,8 @@ paths:
2495
2514
  the response schema).
2496
2515
 
2497
2516
  The default is `true` for now to preserve backwards compatibility, but **will switch to `false` in a future release**, at which point the affected-page list is always included. You should pass `compat=false` if you want the new behavior today and avoid unexpected errors when the default flips in the future.
2498
- x-gitbook-mcp: true
2517
+ x-gitbook-mcp:
2518
+ destructive: true
2499
2519
  tags:
2500
2520
  - change-request-content
2501
2521
  security:
@@ -2520,6 +2540,10 @@ paths:
2520
2540
  required:
2521
2541
  - changes
2522
2542
  properties:
2543
+ expectedRevision:
2544
+ type: string
2545
+ minLength: 1
2546
+ description: The saved branch revision on which these changes are based, available in getChangeRequestById's revision field. If the branch has changed, including pending realtime edits, the batch is rejected with 409 and none of the submitted changes are applied. This field is optional and most changes can omit it.
2523
2547
  changes:
2524
2548
  type: array
2525
2549
  minItems: 1
@@ -2539,6 +2563,9 @@ paths:
2539
2563
  "404":
2540
2564
  description: The change request could not be found.
2541
2565
  $ref: "#/components/responses/NotFoundError"
2566
+ "409":
2567
+ description: The branch changed since the expected revision; read the latest content before retrying.
2568
+ $ref: "#/components/responses/ConflictError"
2542
2569
  /spaces/{spaceId}/change-requests/{changeRequestId}/content/pages:
2543
2570
  get:
2544
2571
  operationId: listPagesInChangeRequest
@@ -5255,9 +5282,13 @@ paths:
5255
5282
  properties:
5256
5283
  role:
5257
5284
  $ref: "#/components/schemas/MemberRoleOrGuest"
5285
+ disabled:
5286
+ type: boolean
5287
+ description: Disable or re-enable the member. Only members disabled by an admin can be re-enabled.
5258
5288
  delete:
5259
5289
  operationId: removeMemberFromOrganizationById
5260
5290
  summary: Remove an organization member or request an organization admin to do it
5291
+ description: Users cannot remove their own membership. Ask another organization admin to remove it.
5261
5292
  tags:
5262
5293
  - organization-members
5263
5294
  security:
@@ -6489,6 +6520,166 @@ paths:
6489
6520
  description: SAML provider did not exist
6490
6521
  "205":
6491
6522
  description: SAML provider has been deleted
6523
+ /orgs/{organizationId}/scim/connections:
6524
+ get:
6525
+ operationId: listOrganizationSCIMConnections
6526
+ summary: List SCIM connections
6527
+ tags:
6528
+ - scim
6529
+ security:
6530
+ - user-internal: []
6531
+ parameters:
6532
+ - $ref: "#/components/parameters/organizationId"
6533
+ responses:
6534
+ "200":
6535
+ description: OK
6536
+ content:
6537
+ application/json:
6538
+ schema:
6539
+ allOf:
6540
+ - $ref: "#/components/schemas/List"
6541
+ - type: object
6542
+ required:
6543
+ - items
6544
+ properties:
6545
+ items:
6546
+ type: array
6547
+ items:
6548
+ $ref: "#/components/schemas/OrganizationSCIMConnection"
6549
+ "404":
6550
+ $ref: "#/components/responses/NotFoundError"
6551
+ post:
6552
+ operationId: createOrganizationSCIMConnection
6553
+ summary: Create a SCIM connection
6554
+ description: |
6555
+ Creates a SCIM connection and its token. The token is only returned in this response.
6556
+ tags:
6557
+ - scim
6558
+ security:
6559
+ - user-internal: []
6560
+ parameters:
6561
+ - $ref: "#/components/parameters/organizationId"
6562
+ requestBody:
6563
+ required: true
6564
+ content:
6565
+ application/json:
6566
+ schema:
6567
+ type: object
6568
+ properties:
6569
+ label:
6570
+ $ref: "#/components/schemas/SCIMConnectionLabel"
6571
+ provider:
6572
+ $ref: "#/components/schemas/SCIMConnectionProvider"
6573
+ required:
6574
+ - label
6575
+ - provider
6576
+ responses:
6577
+ "201":
6578
+ description: SCIM connection created
6579
+ content:
6580
+ application/json:
6581
+ schema:
6582
+ $ref: "#/components/schemas/OrganizationSCIMConnectionWithToken"
6583
+ "400":
6584
+ $ref: "#/components/responses/BadRequestError"
6585
+ "404":
6586
+ $ref: "#/components/responses/NotFoundError"
6587
+ "412":
6588
+ description: The organization has SAML providers configured.
6589
+ $ref: "#/components/responses/PreconditionFailedError"
6590
+ /orgs/{organizationId}/scim/connections/{scimConnectionId}:
6591
+ get:
6592
+ operationId: getOrganizationSCIMConnection
6593
+ summary: Get a SCIM connection by its ID
6594
+ tags:
6595
+ - scim
6596
+ security:
6597
+ - user-internal: []
6598
+ parameters:
6599
+ - $ref: "#/components/parameters/organizationId"
6600
+ - $ref: "#/components/parameters/scimConnectionId"
6601
+ responses:
6602
+ "200":
6603
+ description: OK
6604
+ content:
6605
+ application/json:
6606
+ schema:
6607
+ $ref: "#/components/schemas/OrganizationSCIMConnection"
6608
+ "404":
6609
+ $ref: "#/components/responses/NotFoundError"
6610
+ patch:
6611
+ operationId: updateOrganizationSCIMConnection
6612
+ summary: Update a SCIM connection
6613
+ tags:
6614
+ - scim
6615
+ security:
6616
+ - user-internal: []
6617
+ parameters:
6618
+ - $ref: "#/components/parameters/organizationId"
6619
+ - $ref: "#/components/parameters/scimConnectionId"
6620
+ requestBody:
6621
+ required: true
6622
+ content:
6623
+ application/json:
6624
+ schema:
6625
+ type: object
6626
+ properties:
6627
+ label:
6628
+ $ref: "#/components/schemas/SCIMConnectionLabel"
6629
+ required:
6630
+ - label
6631
+ responses:
6632
+ "200":
6633
+ description: SCIM connection updated
6634
+ content:
6635
+ application/json:
6636
+ schema:
6637
+ $ref: "#/components/schemas/OrganizationSCIMConnection"
6638
+ "400":
6639
+ $ref: "#/components/responses/BadRequestError"
6640
+ "404":
6641
+ $ref: "#/components/responses/NotFoundError"
6642
+ delete:
6643
+ operationId: deleteOrganizationSCIMConnection
6644
+ summary: Delete a SCIM connection
6645
+ description: |
6646
+ Deletes a SCIM connection. Its token stops working immediately.
6647
+ tags:
6648
+ - scim
6649
+ security:
6650
+ - user-internal: []
6651
+ parameters:
6652
+ - $ref: "#/components/parameters/organizationId"
6653
+ - $ref: "#/components/parameters/scimConnectionId"
6654
+ responses:
6655
+ "204":
6656
+ description: SCIM connection not found
6657
+ "205":
6658
+ description: SCIM connection deleted
6659
+ "404":
6660
+ $ref: "#/components/responses/NotFoundError"
6661
+ /orgs/{organizationId}/scim/connections/{scimConnectionId}/token:
6662
+ post:
6663
+ operationId: rotateOrganizationSCIMConnectionToken
6664
+ summary: Rotate the token of a SCIM connection
6665
+ description: |
6666
+ Replaces the token of a SCIM connection. The previous token stops working immediately, and the new token is only returned in this response.
6667
+ tags:
6668
+ - scim
6669
+ security:
6670
+ - user-internal: []
6671
+ parameters:
6672
+ - $ref: "#/components/parameters/organizationId"
6673
+ - $ref: "#/components/parameters/scimConnectionId"
6674
+ responses:
6675
+ "200":
6676
+ description: Token rotated
6677
+ content:
6678
+ application/json:
6679
+ schema:
6680
+ $ref: "#/components/schemas/OrganizationSCIMConnectionWithToken"
6681
+ "404":
6682
+ $ref: "#/components/responses/NotFoundError"
6492
6683
  /orgs/{organizationId}/sso:
6493
6684
  get:
6494
6685
  operationId: listSSOProviderLoginsInOrganization
@@ -7682,7 +7873,8 @@ paths:
7682
7873
  operationId: listSites
7683
7874
  summary: List all documentation sites in an organization
7684
7875
  description: Returns a paginated list of all documentation sites belonging to the organization. Use this to discover available sites before fetching their content, settings, or structure. Members with access only to individual spaces receive the sites that use those spaces as site items, with site administration fields omitted.
7685
- x-gitbook-mcp: true
7876
+ x-gitbook-mcp:
7877
+ curatedBy: list_sites
7686
7878
  tags:
7687
7879
  - sites
7688
7880
  - critical
@@ -8032,7 +8224,9 @@ paths:
8032
8224
  operationId: publishSite
8033
8225
  summary: Publish a site to make it publicly accessible
8034
8226
  description: Makes the site publicly accessible at its configured URL by publishing it. If the organization's plan requires an upgrade, the response includes a Stripe checkout session ID instead of the site object. Use unpublish to take the site offline again.
8035
- x-gitbook-mcp: true
8227
+ x-gitbook-mcp:
8228
+ destructive: true
8229
+ idempotent: true
8036
8230
  tags:
8037
8231
  - sites
8038
8232
  security:
@@ -8070,12 +8264,38 @@ paths:
8070
8264
  required:
8071
8265
  - type
8072
8266
  - sessionId
8267
+ /orgs/{organizationId}/sites/{siteId}/setup:
8268
+ get:
8269
+ operationId: getSiteSetup
8270
+ summary: Get the setup steps of a site
8271
+ description: Lists the steps to set up a site, from a first edit to publishing, and whether each one is completed. Use it to know what is left to do on a site. Returns no steps once the site has been published.
8272
+ x-gitbook-mcp: true
8273
+ tags:
8274
+ - sites
8275
+ security:
8276
+ - user: []
8277
+ - oauth:
8278
+ - site:read
8279
+ parameters:
8280
+ - $ref: "#/components/parameters/organizationId"
8281
+ - $ref: "#/components/parameters/siteId"
8282
+ responses:
8283
+ "200":
8284
+ description: OK
8285
+ content:
8286
+ application/json:
8287
+ schema:
8288
+ $ref: "#/components/schemas/SiteSetup"
8289
+ "400":
8290
+ $ref: "#/components/responses/BadRequestError"
8073
8291
  /orgs/{organizationId}/sites/{siteId}/unpublish:
8074
8292
  post:
8075
8293
  operationId: unpublishSite
8076
8294
  summary: Take a site offline by unpublishing it
8077
8295
  description: Removes the site from public access by unpublishing it. The site's configuration and content are preserved; use the publish endpoint to make it accessible again. Use this when you need to temporarily hide a site or take it down for maintenance.
8078
- x-gitbook-mcp: true
8296
+ x-gitbook-mcp:
8297
+ destructive: true
8298
+ idempotent: true
8079
8299
  tags:
8080
8300
  - sites
8081
8301
  security:
@@ -8439,7 +8659,8 @@ paths:
8439
8659
  operationId: getSiteStructure
8440
8660
  summary: Get the full navigation structure of a site
8441
8661
  description: Returns the complete hierarchical structure of a site, including all sections, section groups, and site spaces in their current order. Use this to understand how a site's navigation is organized before making structural changes, or to render the full navigation tree of a site. Members with access only to individual spaces receive only the site items backed by those spaces and their parent sections.
8442
- x-gitbook-mcp: true
8662
+ x-gitbook-mcp:
8663
+ curatedBy: get_site_structure
8443
8664
  tags:
8444
8665
  - site-structure
8445
8666
  security:
@@ -8571,7 +8792,8 @@ paths:
8571
8792
  operationId: regenerateSitePublishingAuthById
8572
8793
  summary: Regenerate the private key for a site's published content authentication
8573
8794
  description: Re-generates the private key used for the site's publishing authentication (e.g., JWT signing key for SSO). Existing tokens signed with the old key will become invalid immediately. Use this to rotate credentials after a security incident or as part of a regular key rotation policy.
8574
- x-gitbook-mcp: true
8795
+ x-gitbook-mcp:
8796
+ destructive: true
8575
8797
  tags:
8576
8798
  - site-publishing-auth
8577
8799
  security:
@@ -8774,7 +8996,8 @@ paths:
8774
8996
  operationId: addSpaceToSite
8775
8997
  summary: Add a space to a site as a content source
8776
8998
  description: Pass an existing space ID to link it, or pass `null` to create and link a new space. New spaces start with a blank page unless a template is provided or `empty` is `true`, which creates the space with no page at all (use it when you are about to add the pages yourself).
8777
- x-gitbook-mcp: true
8999
+ x-gitbook-mcp:
9000
+ destructive: true
8778
9001
  x-gitbook-return-preference: true
8779
9002
  tags:
8780
9003
  - site-spaces
@@ -8915,7 +9138,8 @@ paths:
8915
9138
  operationId: addSectionGroupToSite
8916
9139
  summary: Add a section group to a site's navigation structure
8917
9140
  description: Creates a new section group to organize multiple sections under a shared navigation label. Section groups can be nested by providing a parent group ID. Existing sections can be assigned to the group at creation time via their IDs. Create the group in draft mode to stage it before publishing.
8918
- x-gitbook-mcp: true
9141
+ x-gitbook-mcp:
9142
+ destructive: true
8919
9143
  tags:
8920
9144
  - site-section-groups
8921
9145
  security:
@@ -8934,6 +9158,9 @@ paths:
8934
9158
  properties:
8935
9159
  title:
8936
9160
  $ref: "#/components/schemas/SiteSectionGroupTitle"
9161
+ condition:
9162
+ description: Conditional expression used to evaluate whether the site section group should be shown to the site's visitor (should evaluate to a boolean).
9163
+ $ref: "#/components/schemas/Expression"
8937
9164
  icon:
8938
9165
  oneOf:
8939
9166
  - $ref: "#/components/schemas/Icon"
@@ -8997,6 +9224,11 @@ paths:
8997
9224
  $ref: "#/components/schemas/SiteSectionGroupTitle"
8998
9225
  localizedTitle:
8999
9226
  $ref: "#/components/schemas/LocalizedString128"
9227
+ condition:
9228
+ description: Conditional expression used to evaluate whether the site section group should be shown to the site's visitor (should evaluate to a boolean). If not set, the condition will remain unchanged. If set to null, the condition will be removed.
9229
+ oneOf:
9230
+ - $ref: "#/components/schemas/Expression"
9231
+ - type: "null"
9000
9232
  icon:
9001
9233
  oneOf:
9002
9234
  - $ref: "#/components/schemas/Icon"
@@ -9044,7 +9276,8 @@ paths:
9044
9276
  operationId: addSectionToSite
9045
9277
  summary: Add a new navigation section to a site backed by a space
9046
9278
  description: Creates a new top-level navigation section in the site. The section appears as a tab or sidebar entry in the site navigation. Pass an existing space ID to link it as the section's primary content source, or pass `null` to create and link a new space. New spaces start with a blank page unless a template is provided or `empty` is `true`, which creates the space with no page at all (use it when you are about to add the pages yourself).
9047
- x-gitbook-mcp: true
9279
+ x-gitbook-mcp:
9280
+ destructive: true
9048
9281
  tags:
9049
9282
  - site-sections
9050
9283
  security:
@@ -9178,6 +9411,9 @@ paths:
9178
9411
  defaultSiteSpace:
9179
9412
  type: string
9180
9413
  description: ID of the site-space to be used as the default in this section.
9414
+ hidden:
9415
+ type: boolean
9416
+ description: Whether to hide the site section from the site's navigation. Setting it updates all the site spaces of the section, and site spaces added to a hidden section are hidden too. The default site section cannot be hidden.
9181
9417
  condition:
9182
9418
  description: Conditional expression used to evaluate whether the site section should be shown to the site's visitor (should evaluate to a boolean). If not set, the condition will remain unchanged. If set to null, the condition will be removed.
9183
9419
  oneOf:
@@ -9236,7 +9472,8 @@ paths:
9236
9472
  operationId: addExternalLinkToSite
9237
9473
  summary: Add an external link to a site's navigation
9238
9474
  description: Creates an external navigation link at the site root or in a section group. On a site with root variants and no sections, creating the first external link enables sections and moves those variants into a default section. Links cannot be placed inside a section. The destination must be an absolute HTTP or HTTPS URL. Draft links and links whose adaptive condition does not match are omitted from published structure responses. Use the generic structure sort operation after creation to change sibling order.
9239
- x-gitbook-mcp: true
9475
+ x-gitbook-mcp:
9476
+ destructive: true
9240
9477
  tags:
9241
9478
  - site-external-links
9242
9479
  security:
@@ -9411,7 +9648,8 @@ paths:
9411
9648
  operationId: searchSiteContent
9412
9649
  summary: Full-text search across all content in a site
9413
9650
  description: Performs a full-text search across all published spaces in the site and returns matching pages with relevant excerpts. Use the scope parameter to restrict the search to specific site spaces or sections. Prefer this over the space-level search when you need to search across a multi-section site in one call.
9414
- x-gitbook-mcp: true
9651
+ x-gitbook-mcp:
9652
+ readOnly: true
9415
9653
  tags:
9416
9654
  - sites
9417
9655
  security:
@@ -9630,6 +9868,8 @@ paths:
9630
9868
  parameters:
9631
9869
  - $ref: "#/components/parameters/organizationId"
9632
9870
  - $ref: "#/components/parameters/siteId"
9871
+ - $ref: "#/components/parameters/xOriginalUserAgent"
9872
+ - $ref: "#/components/parameters/xOriginalSignatureAgent"
9633
9873
  - $ref: "#/components/parameters/documentFormat"
9634
9874
  requestBody:
9635
9875
  required: true
@@ -9904,11 +10144,27 @@ paths:
9904
10144
  description: Filter findings by estimated severity.
9905
10145
  schema:
9906
10146
  $ref: "#/components/schemas/SiteFindingSeverity"
10147
+ - name: autoResolution
10148
+ in: query
10149
+ description: "Filter findings by what GitBook did on its own to resolve them: `drafted` fixes wait for approval, `applied` ones were made live, `undone` ones were reversed by a person."
10150
+ schema:
10151
+ $ref: "#/components/schemas/SiteFindingAutoResolution"
10152
+ - name: autoResolvedAfter
10153
+ in: query
10154
+ description: Only return findings GitBook drafted or applied a fix for at or after this date. Combine with `autoResolution` and `status` to count recent automatic fixes.
10155
+ schema:
10156
+ type: string
10157
+ format: date-time
9907
10158
  - name: hasChangeRequests
9908
10159
  in: query
9909
10160
  description: Filter findings that have at least one associated change request.
9910
10161
  schema:
9911
10162
  type: boolean
10163
+ - name: state
10164
+ in: query
10165
+ description: Filter link findings by where they stand, for example `awaiting-approval` for broken links with a redirect GitBook drafted.
10166
+ schema:
10167
+ $ref: "#/components/schemas/SiteFindingState"
9912
10168
  - name: source
9913
10169
  in: query
9914
10170
  description: Filter findings by the source of their evidence. Each entry is either `connection:<connectionId>` (findings with at least one piece of evidence coming from the given connection) or `questions` (findings with at least one piece of evidence coming from a site question). When multiple entries are given, findings matching any of them are returned.
@@ -9976,8 +10232,12 @@ paths:
9976
10232
  $ref: "#/components/schemas/SiteFinding"
9977
10233
  patch:
9978
10234
  operationId: updateSiteFindingById
9979
- summary: Resolve, dismiss, or reopen a documentation issue
9980
- description: Changes the status of a documentation issue found by GitBook's AI, typically after fixing it (for example via `triggerChangeRequestsForSiteFinding`) or dismissing it as not worth acting on. This does not edit any content itself — it only records the outcome.
10235
+ deprecated: true
10236
+ summary: Resolve, dismiss, or reopen a documentation issue. (Deprecated) use applySiteFindingAction instead.
10237
+ description: |-
10238
+ Changes the status of a documentation issue found by GitBook's AI. Refuses `broken-link` findings, whose status follows the redirects at their path.
10239
+
10240
+ Deprecated in favour of `applySiteFindingAction`, which applies one of the `actions` a finding lists: `mark-resolved`, `ignore`, `reopen` or `restore`.
9981
10241
  x-gitbook-mcp: true
9982
10242
  tags:
9983
10243
  - site-context
@@ -10161,6 +10421,41 @@ paths:
10161
10421
  type: array
10162
10422
  items:
10163
10423
  $ref: "#/components/schemas/ContextRecord"
10424
+ /orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/actions:
10425
+ post:
10426
+ operationId: applySiteFindingAction
10427
+ summary: Apply an action to a finding
10428
+ description: "Applies one of the `actions` a finding lists, with the site permission it gives: resolve, dismiss or reopen it, or act on a broken link's redirect. Returns 409 when the finding doesn't allow the action now."
10429
+ x-gitbook-mcp:
10430
+ destructive: true
10431
+ tags:
10432
+ - site-context
10433
+ security:
10434
+ - user: []
10435
+ - oauth:
10436
+ - site:write
10437
+ parameters:
10438
+ - $ref: "#/components/parameters/organizationId"
10439
+ - $ref: "#/components/parameters/siteId"
10440
+ - $ref: "#/components/parameters/siteFindingId"
10441
+ requestBody:
10442
+ required: true
10443
+ content:
10444
+ application/json:
10445
+ schema:
10446
+ type: object
10447
+ properties:
10448
+ action:
10449
+ $ref: "#/components/schemas/SiteFindingAction"
10450
+ required:
10451
+ - action
10452
+ responses:
10453
+ "200":
10454
+ description: Action applied
10455
+ content:
10456
+ application/json:
10457
+ schema:
10458
+ $ref: "#/components/schemas/SiteFinding"
10164
10459
  /orgs/{organizationId}/sites/{siteId}/stats/findings:
10165
10460
  get:
10166
10461
  operationId: getSiteFindingStats
@@ -10198,6 +10493,17 @@ paths:
10198
10493
  description: Filter findings by estimated severity.
10199
10494
  schema:
10200
10495
  $ref: "#/components/schemas/SiteFindingSeverity"
10496
+ - name: autoResolution
10497
+ in: query
10498
+ description: "Filter findings by what GitBook did on its own to resolve them: `drafted` fixes wait for approval, `applied` ones were made live, `undone` ones were reversed by a person."
10499
+ schema:
10500
+ $ref: "#/components/schemas/SiteFindingAutoResolution"
10501
+ - name: autoResolvedAfter
10502
+ in: query
10503
+ description: Only return findings GitBook drafted or applied a fix for at or after this date. Combine with `autoResolution` and `status` to count recent automatic fixes.
10504
+ schema:
10505
+ type: string
10506
+ format: date-time
10201
10507
  - name: hasChangeRequests
10202
10508
  in: query
10203
10509
  description: Filter findings that have at least one associated change request.
@@ -10463,6 +10769,7 @@ paths:
10463
10769
  type: array
10464
10770
  items:
10465
10771
  $ref: "#/components/schemas/SiteChannelType"
10772
+ - $ref: "#/components/parameters/siteQuestionVisitorType"
10466
10773
  - name: answered
10467
10774
  in: query
10468
10775
  description: Filter stats by answer resolution.
@@ -10542,7 +10849,7 @@ paths:
10542
10849
  delete:
10543
10850
  operationId: deleteSiteTopicFindings
10544
10851
  summary: Delete all documentation issues found under a topic
10545
- description: Permanently deletes every finding associated with a site topic, regardless of status. This is a bulk, irreversible cleanup operation — use `updateSiteFindingById` to resolve or dismiss individual issues instead unless the intent is to wipe every issue under a topic, for example when the topic itself is being removed.
10852
+ description: Permanently deletes every finding associated with a site topic, regardless of status. This is a bulk, irreversible cleanup operation — use `applySiteFindingAction` to resolve or dismiss individual issues instead unless the intent is to wipe every issue under a topic, for example when the topic itself is being removed.
10546
10853
  x-gitbook-mcp: true
10547
10854
  tags:
10548
10855
  - site-context
@@ -10603,6 +10910,7 @@ paths:
10603
10910
  type: array
10604
10911
  items:
10605
10912
  $ref: "#/components/schemas/SiteChannelType"
10913
+ - $ref: "#/components/parameters/siteQuestionVisitorType"
10606
10914
  - name: answered
10607
10915
  in: query
10608
10916
  description: Filter questions by answer resolution.
@@ -10686,6 +10994,7 @@ paths:
10686
10994
  type: array
10687
10995
  items:
10688
10996
  $ref: "#/components/schemas/SiteChannelType"
10997
+ - $ref: "#/components/parameters/siteQuestionVisitorType"
10689
10998
  - name: answered
10690
10999
  in: query
10691
11000
  description: Filter stats by answer resolution.
@@ -10742,6 +11051,7 @@ paths:
10742
11051
  type: array
10743
11052
  items:
10744
11053
  $ref: "#/components/schemas/SiteChannelType"
11054
+ - $ref: "#/components/parameters/siteQuestionVisitorType"
10745
11055
  - name: answered
10746
11056
  in: query
10747
11057
  description: Filter answer sources by answer resolution.
@@ -10811,6 +11121,7 @@ paths:
10811
11121
  type: array
10812
11122
  items:
10813
11123
  $ref: "#/components/schemas/SiteChannelType"
11124
+ - $ref: "#/components/parameters/siteQuestionVisitorType"
10814
11125
  - name: answered
10815
11126
  in: query
10816
11127
  description: Filter stats by answer resolution.
@@ -10886,6 +11197,7 @@ paths:
10886
11197
  type: array
10887
11198
  items:
10888
11199
  $ref: "#/components/schemas/SiteChannelType"
11200
+ - $ref: "#/components/parameters/siteQuestionVisitorType"
10889
11201
  - name: question.type
10890
11202
  in: query
10891
11203
  description: Filter answers by question type.
@@ -11082,7 +11394,8 @@ paths:
11082
11394
  operationId: duplicateSiteSpace
11083
11395
  summary: Duplicate a space in a site
11084
11396
  description: Creates a full copy of the space linked by the specified site space. When the site space is the only variant in a section, the copy is placed in a new sibling section. Otherwise, it is added as a variant under the same parent. Prefer this operation over duplicateSpace whenever the request originates from a site or needs to preserve site placement.
11085
- x-gitbook-mcp: true
11397
+ x-gitbook-mcp:
11398
+ destructive: true
11086
11399
  tags:
11087
11400
  - site-spaces
11088
11401
  - spaces
@@ -11798,6 +12111,8 @@ paths:
11798
12111
  parameters:
11799
12112
  - $ref: "#/components/parameters/organizationId"
11800
12113
  - $ref: "#/components/parameters/siteId"
12114
+ - $ref: "#/components/parameters/xOriginalUserAgent"
12115
+ - $ref: "#/components/parameters/xOriginalSignatureAgent"
11801
12116
  requestBody:
11802
12117
  required: true
11803
12118
  content:
@@ -11846,7 +12161,8 @@ paths:
11846
12161
  operationId: applyTemplateToSite
11847
12162
  summary: Apply the default documentation template to a site
11848
12163
  description: Populates an empty site with GitBook's default documentation structure, content, and customization. Use this after creating a site without spaces to give it a ready-to-edit starting point.
11849
- x-gitbook-mcp: true
12164
+ x-gitbook-mcp:
12165
+ destructive: true
11850
12166
  tags:
11851
12167
  - sites
11852
12168
  security:
@@ -11918,7 +12234,8 @@ paths:
11918
12234
  operationId: createSiteStyleguideById
11919
12235
  summary: Create or retrieve the style guide space for a site
11920
12236
  description: Ensures the site has a dedicated style guide space and returns it. The style guide defines writing style and tone guidelines that the AI editor agent references when generating or refining content for the site. If a style guide already exists, this is idempotent and returns the existing space.
11921
- x-gitbook-mcp: true
12237
+ x-gitbook-mcp:
12238
+ idempotent: true
11922
12239
  tags:
11923
12240
  - sites
11924
12241
  security:
@@ -12061,7 +12378,8 @@ paths:
12061
12378
  operationId: aggregateSiteEvents
12062
12379
  summary: Query a site's analytics events
12063
12380
  description: "Runs an aggregation query over a published site's Insights events, grouped and filtered over a time range. Use it to answer analytics questions about how visitors engage with a site's documentation: page views, visitors, searches, referrers, and broken URLs (404s). A 404 is a `page_view` or `search_open_result` event whose `page` is `null`, in the `site` display context; filter `eventPageNotFoundType` not in `conditional` to leave out 404s that adaptive content explains. Group by `datetime` for a trend over time and by `urlPath` for the top broken URLs."
12064
- x-gitbook-mcp: true
12381
+ x-gitbook-mcp:
12382
+ readOnly: true
12065
12383
  security:
12066
12384
  - user: []
12067
12385
  - oauth:
@@ -12114,7 +12432,9 @@ paths:
12114
12432
  operationId: updateSiteAdsById
12115
12433
  summary: Update the advertising settings for a site
12116
12434
  description: Updates the advertising configuration for a site, including the review status and topic category used to select relevant ads. This controls GitBook's monetization feature for sites opted into the ads program.
12117
- x-gitbook-mcp: true
12435
+ x-gitbook-mcp:
12436
+ destructive: true
12437
+ idempotent: true
12118
12438
  tags:
12119
12439
  - site-ads
12120
12440
  security:
@@ -12146,7 +12466,8 @@ paths:
12146
12466
  operationId: createSiteRedirect
12147
12467
  summary: Create a URL redirect rule for a site
12148
12468
  description: Creates a new redirect rule mapping a source path to a destination URL or content reference. Creating a live redirect also resolves open broken-link findings for the same source path. Use the bulk upsert endpoint instead when creating many redirects at once.
12149
- x-gitbook-mcp: true
12469
+ x-gitbook-mcp:
12470
+ destructive: true
12150
12471
  tags:
12151
12472
  - site-redirects
12152
12473
  security:
@@ -12755,7 +13076,8 @@ paths:
12755
13076
  operationId: listSiteChannelScopes
12756
13077
  summary: List available site channel scopes
12757
13078
  description: Lists accessible Linear teams, GitHub repositories, Slack channels or Jira projects. Requires site admin permission. Linear, GitHub and Slack require an already-connected channel belonging to this site and matching the provider. Jira uses either the credentials supplied, verified without saving a connection, or those stored on an existing Jira context connection of this site. Slack includes public channels and accessible private channels, excluding archived channels. To fetch another page, pass the opaque token from `next.page` as the `page` query parameter with the same request body. An absent `next` means there are no more pages; an empty `items` array alone does not indicate the end of the list.
12758
- x-gitbook-mcp: true
13079
+ x-gitbook-mcp:
13080
+ readOnly: true
12759
13081
  tags:
12760
13082
  - site-channels
12761
13083
  security:
@@ -14142,6 +14464,13 @@ components:
14142
14464
  description: The unique id of the SAML provider
14143
14465
  schema:
14144
14466
  type: string
14467
+ scimConnectionId:
14468
+ name: scimConnectionId
14469
+ in: path
14470
+ required: true
14471
+ description: The unique id of the SCIM connection
14472
+ schema:
14473
+ type: string
14145
14474
  openapiSpecSlug:
14146
14475
  name: specSlug
14147
14476
  in: path
@@ -14227,6 +14556,25 @@ components:
14227
14556
  description: The unique ID of the site external link
14228
14557
  schema:
14229
14558
  type: string
14559
+ xOriginalUserAgent:
14560
+ in: header
14561
+ name: X-Original-User-Agent
14562
+ description: |
14563
+ User agent of the visitor, when calling on behalf of one, such as from a server rendering a
14564
+ docs site. When omitted, the request's own `User-Agent` is used.
14565
+ required: false
14566
+ schema:
14567
+ type: string
14568
+ xOriginalSignatureAgent:
14569
+ in: header
14570
+ name: X-Original-Signature-Agent
14571
+ description: |
14572
+ `Signature-Agent` header sent by the visitor, when calling on behalf of one, for agents that
14573
+ sign their requests. When omitted, the request's own `Signature-Agent` is used.
14574
+ https://datatracker.ietf.org/doc/draft-meunier-web-bot-auth-architecture/
14575
+ required: false
14576
+ schema:
14577
+ type: string
14230
14578
  siteContextRecordId:
14231
14579
  name: siteContextRecordId
14232
14580
  in: path
@@ -14255,6 +14603,14 @@ components:
14255
14603
  description: The unique id of the context connection
14256
14604
  schema:
14257
14605
  type: string
14606
+ siteQuestionVisitorType:
14607
+ name: visitorType
14608
+ in: query
14609
+ description: Filter by whether a person or an AI agent asked the question.
14610
+ schema:
14611
+ type: array
14612
+ items:
14613
+ $ref: "#/components/schemas/SiteQuestionVisitorType"
14258
14614
  siteTopicId:
14259
14615
  name: siteTopicId
14260
14616
  in: path
@@ -17616,6 +17972,7 @@ components:
17616
17972
  - $ref: "#/components/schemas/DocumentBlockReusableContent"
17617
17973
  - $ref: "#/components/schemas/DocumentBlockIntegration"
17618
17974
  - $ref: "#/components/schemas/DocumentBlockStepper"
17975
+ - $ref: "#/components/schemas/DocumentBlockTabs"
17619
17976
  minItems: 1
17620
17977
  required:
17621
17978
  - nodes
@@ -20436,6 +20793,11 @@ components:
20436
20793
  ref:
20437
20794
  type: string
20438
20795
  description: Temporary local reference for the page, used only for the lifetime of this request and never persisted. Other pages inserted in the same batch can link to this page by its ref (e.g. `[Page](./<ref>.md)`), which resolves to the page's ID at apply time — regardless of operation order or the page's eventual slug. A ref must be unique within the batch and must not collide with an existing page's path.
20796
+ stableKey:
20797
+ type: string
20798
+ minLength: 1
20799
+ maxLength: 255
20800
+ description: "Stable identifier for the page's content, such as the ID of the record it is generated from. The page's ID is derived from it, so re-inserting a deleted page with the same key restores its ID and links to it keep working. The same key gives the same page ID in every space, including duplicated spaces. To change a page that exists, use `update_page`: an insert whose key matches an existing page, or another insert in the batch, is rejected, so deleting a page and re-inserting its key must be done in separate requests. A re-created page takes over the old page's comments, redirects, insights and history. When two change requests insert the same key, merging both keeps only one of the pages, without a conflict."
20439
20801
  document:
20440
20802
  description: Document for the new page. When provided as markdown, its frontmatter is read to set the page metadata.
20441
20803
  $ref: "#/components/schemas/Document"
@@ -20580,6 +20942,92 @@ components:
20580
20942
  ref:
20581
20943
  kind: openapi
20582
20944
  spec: my-api
20945
+ ChangeRequestContentChangeInsertReusableContents:
20946
+ type: object
20947
+ description: Create reusable content (snippets shared by several pages) in the change request. A markdown document includes one as `{% include "/reusable-content/<reusableContentId>" %}` — use a `ref` to include it from a page in the same batch, or read the generated IDs from `insertedReusableContents`.
20948
+ required:
20949
+ - operation
20950
+ - reusableContents
20951
+ properties:
20952
+ operation:
20953
+ type: string
20954
+ enum:
20955
+ - insert_reusable_contents
20956
+ reusableContents:
20957
+ type: array
20958
+ minItems: 1
20959
+ maxItems: 20
20960
+ items:
20961
+ type: object
20962
+ description: A reusable content to create.
20963
+ required:
20964
+ - title
20965
+ - document
20966
+ properties:
20967
+ ref:
20968
+ type: string
20969
+ description: Temporary local reference for the reusable content, used only for the lifetime of this request and never persisted. Pages in the same batch can include it by its ref (e.g. `{% include "./<ref>" %}`), which resolves to the reusable content's ID at apply time — regardless of operation order. A ref must be unique among the reusable content refs of the batch.
20970
+ title:
20971
+ type: string
20972
+ minLength: 1
20973
+ maxLength: 100
20974
+ description: Title of the reusable content, shown when picking it in the editor.
20975
+ document:
20976
+ description: Body of the reusable content.
20977
+ $ref: "#/components/schemas/Document"
20978
+ example:
20979
+ operation: insert_reusable_contents
20980
+ reusableContents:
20981
+ - ref: disclaimer
20982
+ title: Disclaimer
20983
+ document:
20984
+ markdown: |
20985
+ {% hint style="warning" %}
20986
+ This feature is in beta.
20987
+ {% endhint %}
20988
+ ChangeRequestContentChangeUpdateReusableContent:
20989
+ type: object
20990
+ description: Update an existing reusable content's title and/or document. Its ID is unchanged, so every page including it shows the update.
20991
+ required:
20992
+ - operation
20993
+ - reusableContent
20994
+ properties:
20995
+ operation:
20996
+ type: string
20997
+ enum:
20998
+ - update_reusable_content
20999
+ reusableContent:
21000
+ type: string
21001
+ description: ID of the reusable content to update.
21002
+ title:
21003
+ type: string
21004
+ minLength: 1
21005
+ maxLength: 100
21006
+ description: New title of the reusable content. Omit to keep the current title.
21007
+ document:
21008
+ description: New body of the reusable content. Omit to keep the current body.
21009
+ $ref: "#/components/schemas/Document"
21010
+ example:
21011
+ operation: update_reusable_content
21012
+ reusableContent: reusable_content_id
21013
+ title: Beta disclaimer
21014
+ ChangeRequestContentChangeDeleteReusableContent:
21015
+ type: object
21016
+ description: Delete an existing reusable content from the change request.
21017
+ required:
21018
+ - operation
21019
+ - reusableContent
21020
+ properties:
21021
+ operation:
21022
+ type: string
21023
+ enum:
21024
+ - delete_reusable_content
21025
+ reusableContent:
21026
+ type: string
21027
+ description: ID of the reusable content to delete.
21028
+ example:
21029
+ operation: delete_reusable_content
21030
+ reusableContent: reusable_content_id
20583
21031
  ChangeRequestContentChange:
20584
21032
  oneOf:
20585
21033
  - $ref: "#/components/schemas/ChangeRequestContentChangeUpdatePage"
@@ -20588,6 +21036,9 @@ components:
20588
21036
  - $ref: "#/components/schemas/ChangeRequestContentChangeRevertPage"
20589
21037
  - $ref: "#/components/schemas/ChangeRequestContentChangeInsertFiles"
20590
21038
  - $ref: "#/components/schemas/ChangeRequestContentChangeInsertComputedPage"
21039
+ - $ref: "#/components/schemas/ChangeRequestContentChangeInsertReusableContents"
21040
+ - $ref: "#/components/schemas/ChangeRequestContentChangeUpdateReusableContent"
21041
+ - $ref: "#/components/schemas/ChangeRequestContentChangeDeleteReusableContent"
20591
21042
  discriminator:
20592
21043
  propertyName: operation
20593
21044
  mapping:
@@ -20597,6 +21048,9 @@ components:
20597
21048
  revert_page: "#/components/schemas/ChangeRequestContentChangeRevertPage"
20598
21049
  insert_files: "#/components/schemas/ChangeRequestContentChangeInsertFiles"
20599
21050
  insert_computed_page: "#/components/schemas/ChangeRequestContentChangeInsertComputedPage"
21051
+ insert_reusable_contents: "#/components/schemas/ChangeRequestContentChangeInsertReusableContents"
21052
+ update_reusable_content: "#/components/schemas/ChangeRequestContentChangeUpdateReusableContent"
21053
+ delete_reusable_content: "#/components/schemas/ChangeRequestContentChangeDeleteReusableContent"
20600
21054
  ChangeRequestContentUpdatePageRef:
20601
21055
  type: object
20602
21056
  required:
@@ -20700,6 +21154,11 @@ components:
20700
21154
  description: Files created by the `insert_files` changes in this batch, in the order they were inserted. Use their IDs to reference them from a document.
20701
21155
  items:
20702
21156
  $ref: "#/components/schemas/RevisionFile"
21157
+ insertedReusableContents:
21158
+ type: array
21159
+ description: Reusable contents created by the `insert_reusable_contents` changes in this batch, in the order they were inserted. Use their IDs to include them from a document.
21160
+ items:
21161
+ $ref: "#/components/schemas/RevisionReusableContent"
20703
21162
  RevisionPageType:
20704
21163
  type: string
20705
21164
  enum:
@@ -21083,6 +21542,10 @@ components:
21083
21542
  properties:
21084
21543
  label:
21085
21544
  $ref: "#/components/schemas/ChangeAttributeString"
21545
+ group:
21546
+ $ref: "#/components/schemas/ChangeAttributeString"
21547
+ parent:
21548
+ $ref: "#/components/schemas/ChangeAttributeString"
21086
21549
  RevisionSemanticChangeTagEdited:
21087
21550
  type: object
21088
21551
  properties:
@@ -21098,6 +21561,72 @@ components:
21098
21561
  - type
21099
21562
  - tag
21100
21563
  - attributes
21564
+ RevisionTagGroup:
21565
+ type: object
21566
+ description: A space-scoped group of tags in this revision. Groups may contain other groups.
21567
+ required:
21568
+ - slug
21569
+ - label
21570
+ - orderIndex
21571
+ properties:
21572
+ slug:
21573
+ type: string
21574
+ description: Immutable group identifier, unique within the revision.
21575
+ label:
21576
+ type: string
21577
+ description: Display name of the group.
21578
+ parent:
21579
+ type: string
21580
+ description: Parent group slug. Omitted for root groups.
21581
+ orderIndex:
21582
+ type: string
21583
+ description: Lexicographic sibling sort key. Break ties using the slug.
21584
+ RevisionSemanticChangeTagGroupCreated:
21585
+ type: object
21586
+ required:
21587
+ - type
21588
+ - tagGroup
21589
+ properties:
21590
+ type:
21591
+ type: string
21592
+ enum:
21593
+ - tag_group_created
21594
+ tagGroup:
21595
+ $ref: "#/components/schemas/RevisionTagGroup"
21596
+ RevisionSemanticChangeTagGroupEdited:
21597
+ type: object
21598
+ required:
21599
+ - type
21600
+ - tagGroup
21601
+ - attributes
21602
+ properties:
21603
+ type:
21604
+ type: string
21605
+ enum:
21606
+ - tag_group_edited
21607
+ tagGroup:
21608
+ $ref: "#/components/schemas/RevisionTagGroup"
21609
+ attributes:
21610
+ type: object
21611
+ properties:
21612
+ label:
21613
+ $ref: "#/components/schemas/ChangeAttributeString"
21614
+ parent:
21615
+ $ref: "#/components/schemas/ChangeAttributeString"
21616
+ orderIndex:
21617
+ $ref: "#/components/schemas/ChangeAttributeString"
21618
+ RevisionSemanticChangeTagGroupDeleted:
21619
+ type: object
21620
+ required:
21621
+ - type
21622
+ - tagGroup
21623
+ properties:
21624
+ type:
21625
+ type: string
21626
+ enum:
21627
+ - tag_group_deleted
21628
+ tagGroup:
21629
+ $ref: "#/components/schemas/RevisionTagGroup"
21101
21630
  RevisionSemanticChange:
21102
21631
  oneOf:
21103
21632
  - $ref: "#/components/schemas/RevisionSemanticChangePageCreated"
@@ -21114,6 +21643,9 @@ components:
21114
21643
  - $ref: "#/components/schemas/RevisionSemanticChangeTagCreated"
21115
21644
  - $ref: "#/components/schemas/RevisionSemanticChangeTagDeleted"
21116
21645
  - $ref: "#/components/schemas/RevisionSemanticChangeTagEdited"
21646
+ - $ref: "#/components/schemas/RevisionSemanticChangeTagGroupCreated"
21647
+ - $ref: "#/components/schemas/RevisionSemanticChangeTagGroupEdited"
21648
+ - $ref: "#/components/schemas/RevisionSemanticChangeTagGroupDeleted"
21117
21649
  RevisionSemanticChanges:
21118
21650
  type: object
21119
21651
  properties:
@@ -21145,6 +21677,24 @@ components:
21145
21677
  description: Reactions to remove from the comment.
21146
21678
  items:
21147
21679
  type: string
21680
+ MemberDisabledReason:
21681
+ type: string
21682
+ description: |
21683
+ Why a member is disabled in an organization.
21684
+ "billing": The organization's plan has reached its maximum number of members.
21685
+ "scim": The member was deactivated by the organization's identity provider.
21686
+ "admin": An organization admin disabled the member.
21687
+ enum:
21688
+ - billing
21689
+ - scim
21690
+ - admin
21691
+ MemberDisabled:
21692
+ description: Why the member is disabled, or false when the member is active. A disabled member cannot access the organization or its content.
21693
+ oneOf:
21694
+ - type: boolean
21695
+ enum:
21696
+ - false
21697
+ - $ref: "#/components/schemas/MemberDisabledReason"
21148
21698
  OrganizationMember:
21149
21699
  type: object
21150
21700
  properties:
@@ -21161,8 +21711,7 @@ components:
21161
21711
  user:
21162
21712
  $ref: "#/components/schemas/User"
21163
21713
  disabled:
21164
- type: boolean
21165
- description: Whatever the membership of this user is disabled and prevent them from accessing content.
21714
+ $ref: "#/components/schemas/MemberDisabled"
21166
21715
  joinedAt:
21167
21716
  description: Date at which the user joined the organization.
21168
21717
  $ref: "#/components/schemas/Timestamp"
@@ -21525,9 +22074,6 @@ components:
21525
22074
  - pro_2024
21526
22075
  - enterprise_2024
21527
22076
  - community_2024
21528
- - free
21529
- - plus
21530
- - pro
21531
22077
  - internal
21532
22078
  BillingInterval:
21533
22079
  type: string
@@ -21778,6 +22324,9 @@ components:
21778
22324
  ai:
21779
22325
  description: If true, the organization is configured to use all our AI features.
21780
22326
  type: boolean
22327
+ aiPreference:
22328
+ description: Whether the master AI setting is turned on, regardless of plan availability. Contract overrides forcing AI off take precedence.
22329
+ type: boolean
21781
22330
  aiSettings:
21782
22331
  $ref: "#/components/schemas/OrganizationAISettings"
21783
22332
  aiPaused:
@@ -21849,18 +22398,6 @@ components:
21849
22398
  $ref: "#/components/schemas/BlockReason"
21850
22399
  required:
21851
22400
  - reason
21852
- internal_billingMigration:
21853
- type: object
21854
- properties:
21855
- deadline:
21856
- description: When we will upgrade the organization onto new pricing, if they haven't already.
21857
- $ref: "#/components/schemas/Timestamp"
21858
- discountPercent:
21859
- description: A discount the organization may have received thanks to migrating early.
21860
- type: number
21861
- discountEndDate:
21862
- description: The expiration date of the discount, after wich regular pricing resumes.
21863
- $ref: "#/components/schemas/Timestamp"
21864
22401
  permissions:
21865
22402
  type: object
21866
22403
  description: The set of permissions for the organization
@@ -23203,8 +23740,6 @@ components:
23203
23740
  - premium
23204
23741
  - ultimate
23205
23742
  - sponsored
23206
- - legacy-basic
23207
- - legacy-premium
23208
23743
  SiteTitle:
23209
23744
  type: string
23210
23745
  description: Title of the site
@@ -23362,7 +23897,6 @@ components:
23362
23897
  - sites-basic-customization
23363
23898
  - sites-broken-links
23364
23899
  - sites-custom-domain
23365
- - sites-custom-fonts
23366
23900
  - sites-custom-subdirectory
23367
23901
  - sites-full-text-search
23368
23902
  - sites-multivariant-site
@@ -23430,6 +23964,12 @@ components:
23430
23964
  appliedType:
23431
23965
  $ref: "#/components/schemas/SiteType"
23432
23966
  description: The currently applied type of the site. For example, frozen sites will have this set to Basic.
23967
+ unpublishedBy:
23968
+ type: string
23969
+ enum:
23970
+ - user
23971
+ - system
23972
+ description: Who unpublished this site last. Cleared when the site is published again.
23433
23973
  title:
23434
23974
  $ref: "#/components/schemas/SiteTitle"
23435
23975
  icon:
@@ -24715,6 +25255,9 @@ components:
24715
25255
  draft:
24716
25256
  type: boolean
24717
25257
  description: Whether the site section is draft and not live.
25258
+ hidden:
25259
+ type: boolean
25260
+ description: Whether the site section is hidden. It is hidden when all of its site spaces are hidden, in which case it is not shown in the site's navigation.
24718
25261
  path:
24719
25262
  $ref: "#/components/schemas/SiteSectionPath"
24720
25263
  condition:
@@ -24771,6 +25314,9 @@ components:
24771
25314
  description: List of site section ids that are members of the group. Use `children` instead.
24772
25315
  items:
24773
25316
  $ref: "#/components/schemas/SiteSection"
25317
+ condition:
25318
+ description: Conditional expression used to evaluate whether the site section group should be shown to the site's visitor.
25319
+ $ref: "#/components/schemas/Expression"
24774
25320
  sectionGroup:
24775
25321
  type: string
24776
25322
  description: ID of the parent section group this group belongs to
@@ -26037,70 +26583,6 @@ components:
26037
26583
  - interval_changed
26038
26584
  required:
26039
26585
  - result
26040
- MigrateOrganizationParameters:
26041
- type: object
26042
- properties:
26043
- interval:
26044
- description: The desired billing interval
26045
- $ref: "#/components/schemas/BillingInterval"
26046
- product:
26047
- type: string
26048
- description: The new product to upgrade to
26049
- enum:
26050
- - free_2024
26051
- - plus_2024
26052
- - pro_2024
26053
- changes:
26054
- $ref: "#/components/schemas/SubscriptionChanges"
26055
- required:
26056
- - product
26057
- - interval
26058
- - changes
26059
- Error:
26060
- type: object
26061
- required:
26062
- - error
26063
- properties:
26064
- error:
26065
- type: object
26066
- properties:
26067
- code:
26068
- type: integer
26069
- format: int32
26070
- message:
26071
- type: string
26072
- required:
26073
- - code
26074
- - message
26075
- BillingDiscount:
26076
- type: object
26077
- properties:
26078
- duration:
26079
- description: How many months the discount will last
26080
- type: number
26081
- percentOff:
26082
- description: Percent that will be deducted from the subtotal of the invoice
26083
- type: number
26084
- required:
26085
- - duration
26086
- - percentOff
26087
- SitePageviews:
26088
- type: object
26089
- properties:
26090
- object:
26091
- type: string
26092
- enum:
26093
- - site-pageviews
26094
- siteId:
26095
- type: string
26096
- description: The identifier of the site
26097
- pageviews:
26098
- description: Number of pageviews in the past 30 days
26099
- type: number
26100
- required:
26101
- - object
26102
- - siteId
26103
- - pageviews
26104
26586
  BillingPortal:
26105
26587
  type: object
26106
26588
  properties:
@@ -26214,6 +26696,7 @@ components:
26214
26696
  - members-teams
26215
26697
  - members-team-owners
26216
26698
  - security-saml
26699
+ - scim
26217
26700
  - change-requests-merge-rules
26218
26701
  SearchSpaceResult:
26219
26702
  type: object
@@ -26420,6 +26903,84 @@ components:
26420
26903
  - status
26421
26904
  - service
26422
26905
  - urls
26906
+ SCIMConnectionLabel:
26907
+ type: string
26908
+ description: Name of the SCIM connection, shown to organization admins.
26909
+ minLength: 1
26910
+ maxLength: 100
26911
+ SCIMConnectionProvider:
26912
+ type: string
26913
+ description: Identity provider that provisions members through the SCIM connection.
26914
+ enum:
26915
+ - okta
26916
+ - entra
26917
+ - generic
26918
+ OrganizationSCIMConnection:
26919
+ type: object
26920
+ description: A SCIM connection through which an identity provider provisions organization members.
26921
+ properties:
26922
+ object:
26923
+ type: string
26924
+ description: The object type, which is always "scim-connection"
26925
+ enum:
26926
+ - scim-connection
26927
+ id:
26928
+ type: string
26929
+ description: Unique identifier of the SCIM connection
26930
+ label:
26931
+ $ref: "#/components/schemas/SCIMConnectionLabel"
26932
+ provider:
26933
+ $ref: "#/components/schemas/SCIMConnectionProvider"
26934
+ baseURL:
26935
+ description: SCIM base URL to configure in the identity provider
26936
+ $ref: "#/components/schemas/URL"
26937
+ tokenHint:
26938
+ type: string
26939
+ description: Last characters of the current token, to identify it
26940
+ tokenCreatedAt:
26941
+ description: Date the current token was created
26942
+ $ref: "#/components/schemas/Timestamp"
26943
+ lastUsedAt:
26944
+ description: Date of the last request authenticated with the token
26945
+ $ref: "#/components/schemas/Timestamp"
26946
+ createdAt:
26947
+ description: Date of creation
26948
+ $ref: "#/components/schemas/Timestamp"
26949
+ updatedAt:
26950
+ description: Date of the last update
26951
+ $ref: "#/components/schemas/Timestamp"
26952
+ urls:
26953
+ type: object
26954
+ description: URLs associated with the object
26955
+ properties:
26956
+ location:
26957
+ description: URL of the SCIM connection in the API
26958
+ $ref: "#/components/schemas/URL"
26959
+ required:
26960
+ - location
26961
+ required:
26962
+ - object
26963
+ - id
26964
+ - label
26965
+ - provider
26966
+ - baseURL
26967
+ - tokenHint
26968
+ - tokenCreatedAt
26969
+ - createdAt
26970
+ - updatedAt
26971
+ - urls
26972
+ OrganizationSCIMConnectionWithToken:
26973
+ description: A SCIM connection with its token, returned only when the token is created.
26974
+ type: object
26975
+ properties:
26976
+ connection:
26977
+ $ref: "#/components/schemas/OrganizationSCIMConnection"
26978
+ token:
26979
+ type: string
26980
+ description: Bearer token to configure in the identity provider. It can't be retrieved again.
26981
+ required:
26982
+ - connection
26983
+ - token
26423
26984
  OrganizationSSOProviderLogin:
26424
26985
  type: object
26425
26986
  properties:
@@ -26457,43 +27018,28 @@ components:
26457
27018
  OrganizationUsageSites:
26458
27019
  type: object
26459
27020
  description: Sites usage metrics of an organization
26460
- oneOf:
26461
- - properties:
26462
- total:
26463
- description: Count of all sites
26464
- type: number
26465
- legacyBasic:
26466
- description: Count of all legacy basic sites
26467
- type: number
26468
- legacyPremium:
26469
- description: Count of all legacy premium sites
26470
- type: number
26471
- required:
26472
- - total
26473
- - legacyBasic
26474
- - legacyPremium
26475
- - properties:
26476
- total:
26477
- description: Count of all sites
26478
- type: number
26479
- basic:
26480
- description: Count of all basic sites
26481
- type: number
26482
- premium:
26483
- description: Count of all premium sites
26484
- type: number
26485
- ultimate:
26486
- description: Count of all ultimate sites
26487
- type: number
26488
- sponsored:
26489
- description: Count of all sponsored sites
26490
- type: number
26491
- required:
26492
- - total
26493
- - basic
26494
- - premium
26495
- - ultimate
26496
- - sponsored
27021
+ properties:
27022
+ total:
27023
+ description: Count of all sites
27024
+ type: number
27025
+ basic:
27026
+ description: Count of all basic sites
27027
+ type: number
27028
+ premium:
27029
+ description: Count of all premium sites
27030
+ type: number
27031
+ ultimate:
27032
+ description: Count of all ultimate sites
27033
+ type: number
27034
+ sponsored:
27035
+ description: Count of all sponsored sites
27036
+ type: number
27037
+ required:
27038
+ - total
27039
+ - basic
27040
+ - premium
27041
+ - ultimate
27042
+ - sponsored
26497
27043
  OrganizationUsageTeams:
26498
27044
  type: object
26499
27045
  description: Team members usage metrics of an organization
@@ -26508,10 +27054,29 @@ components:
26508
27054
  description: Members usage metrics of an organization
26509
27055
  properties:
26510
27056
  total:
26511
- description: Count of all members
27057
+ description: Count of all members, including disabled ones
26512
27058
  type: number
27059
+ active:
27060
+ description: Count of members that are not disabled
27061
+ type: number
27062
+ disabled:
27063
+ description: Count of disabled members, by the reason they are disabled
27064
+ type: object
27065
+ properties:
27066
+ billing:
27067
+ type: number
27068
+ scim:
27069
+ type: number
27070
+ admin:
27071
+ type: number
27072
+ required:
27073
+ - billing
27074
+ - scim
27075
+ - admin
26513
27076
  seats:
26514
- description: Count of all paid seats
27077
+ description: |
27078
+ Count of paid seats. On the Free plan, it includes members disabled for billing, since
27079
+ upgrading re-enables them. On paid plans, it only includes active members.
26515
27080
  type: number
26516
27081
  admin:
26517
27082
  description: Count of all admins
@@ -26536,6 +27101,8 @@ components:
26536
27101
  type: number
26537
27102
  required:
26538
27103
  - total
27104
+ - active
27105
+ - disabled
26539
27106
  - seats
26540
27107
  - admin
26541
27108
  - create
@@ -26963,6 +27530,7 @@ components:
26963
27530
  - pending
26964
27531
  - running
26965
27532
  - completed
27533
+ - failed
26966
27534
  TranslationSource:
26967
27535
  type: object
26968
27536
  required:
@@ -27624,6 +28192,22 @@ components:
27624
28192
  - createdBy
27625
28193
  - updatedAt
27626
28194
  - urls
28195
+ Error:
28196
+ type: object
28197
+ required:
28198
+ - error
28199
+ properties:
28200
+ error:
28201
+ type: object
28202
+ properties:
28203
+ code:
28204
+ type: integer
28205
+ format: int32
28206
+ message:
28207
+ type: string
28208
+ required:
28209
+ - code
28210
+ - message
27627
28211
  SiteAdaptiveRegions:
27628
28212
  type: object
27629
28213
  description: Groups of countries exposed to adaptive content as `visitor.region`. The key of each entry is the region name; `visitor.region` is undefined for a visitor whose country is in none of the regions. A site can declare at most 10 regions.
@@ -28836,6 +29420,37 @@ components:
28836
29420
  - structure
28837
29421
  - customizations
28838
29422
  - scripts
29423
+ SiteSetupStepId:
29424
+ type: string
29425
+ description: A step of the setup of a site, in the order they are done.
29426
+ enum:
29427
+ - first-edit
29428
+ - customize
29429
+ - git-sync
29430
+ - domain
29431
+ - publish
29432
+ SiteSetup:
29433
+ type: object
29434
+ description: Steps to set up a site, each completed or not from the site's current data.
29435
+ properties:
29436
+ steps:
29437
+ type: array
29438
+ description: Every setup step, in order. Empty once the site has been published, which ends the setup even if other steps are not completed.
29439
+ items:
29440
+ type: object
29441
+ properties:
29442
+ id:
29443
+ $ref: "#/components/schemas/SiteSetupStepId"
29444
+ completed:
29445
+ type: boolean
29446
+ action:
29447
+ type: string
29448
+ description: How to complete the step. Only present when it is not completed.
29449
+ required:
29450
+ - id
29451
+ - completed
29452
+ required:
29453
+ - steps
28839
29454
  SiteChangeRequestMemberStatus:
28840
29455
  type: string
28841
29456
  description: Whether the member is part of the change request, or a tombstone kept so that a member removed and later re-added keeps its identity, comments and history.
@@ -29725,6 +30340,30 @@ components:
29725
30340
  - low
29726
30341
  - medium
29727
30342
  - high
30343
+ SiteFindingAutoResolution:
30344
+ type: string
30345
+ description: |
30346
+ What GitBook did on its own to resolve a finding.
30347
+ - `drafted` drafted a fix that waits for approval.
30348
+ - `applied` has its fix live, applied on its own or approved from a draft, resolving the finding.
30349
+ - `undone` had its fix undone or rejected, so GitBook won't try again.
30350
+ enum:
30351
+ - drafted
30352
+ - applied
30353
+ - undone
30354
+ SiteFindingState:
30355
+ type: string
30356
+ description: |
30357
+ Where a link finding stands, from its status and what GitBook did with it.
30358
+ - `open` needs a fix.
30359
+ - `awaiting-approval` has a redirect GitBook drafted at its path, waiting to be approved or rejected.
30360
+ - `resolved` was fixed or closed: `servingRedirect` says whether a live redirect serves its path.
30361
+ - `ignored` was dismissed.
30362
+ enum:
30363
+ - open
30364
+ - awaiting-approval
30365
+ - resolved
30366
+ - ignored
29728
30367
  SiteTriageFilterQuestions:
29729
30368
  type: string
29730
30369
  description: |
@@ -29750,6 +30389,59 @@ components:
29750
30389
  type: string
29751
30390
  description: Short finding title
29752
30391
  maxLength: 256
30392
+ SiteFindingServingRedirect:
30393
+ type: object
30394
+ title: Serving redirect
30395
+ description: The live redirect serving a `broken-link` finding's path.
30396
+ properties:
30397
+ redirect:
30398
+ type: string
30399
+ description: ID of the redirect.
30400
+ wildcard:
30401
+ type: boolean
30402
+ description: Whether a wildcard redirect covers the path rather than one at the path itself. Reopening the finding would delete it, so `reopen` isn't offered.
30403
+ createdByAgent:
30404
+ type: boolean
30405
+ description: Whether GitBook created the redirect on its own.
30406
+ required:
30407
+ - redirect
30408
+ - wildcard
30409
+ - createdByAgent
30410
+ SiteFindingAction:
30411
+ type: string
30412
+ description: |
30413
+ An action that moves a finding to another state. A finding's `actions` lists the ones it allows.
30414
+ - `approve` makes the redirect GitBook drafted for a broken link live, which resolves the finding.
30415
+ - `reject` deletes the redirect GitBook drafted for a broken link; the finding stays open and GitBook won't draft a fix for it again.
30416
+ - `create-redirect` creates a redirect for a broken link's path with `createSiteRedirect`, prefilled with the suggestion; it resolves the finding.
30417
+ - `mark-resolved` resolves it. A broken link resolved this way has no redirect: visitors still get a 404.
30418
+ - `reopen` reopens a resolved finding. For a broken link, it deletes the live redirect at its path; for a fix GitBook applied, this undoes the fix and GitBook won't fix the link again.
30419
+ - `ignore` dismisses it.
30420
+ - `restore` reopens a dismissed finding.
30421
+ enum:
30422
+ - approve
30423
+ - reject
30424
+ - create-redirect
30425
+ - mark-resolved
30426
+ - reopen
30427
+ - ignore
30428
+ - restore
30429
+ SiteFindingAvailableAction:
30430
+ type: object
30431
+ title: Available action
30432
+ description: An action a finding allows now, with the site permission it needs.
30433
+ properties:
30434
+ action:
30435
+ $ref: "#/components/schemas/SiteFindingAction"
30436
+ permission:
30437
+ type: string
30438
+ description: Site permission the action needs.
30439
+ enum:
30440
+ - edit
30441
+ - admin
30442
+ required:
30443
+ - action
30444
+ - permission
29753
30445
  SiteRedirectSourcePath:
29754
30446
  type: string
29755
30447
  description: The source path to redirect from.
@@ -29787,15 +30479,18 @@ components:
29787
30479
  - source
29788
30480
  SiteFindingOutboundLink:
29789
30481
  type: object
29790
- description: "Details of an `outbound-link-error` finding: the failing external URL and the observed failure, sourced from the site's outbound link checks. Absent on findings of any other type."
30482
+ description: "Details of an `outbound-link-error` finding: the failing external URL, or the domain when it doesn't resolve, and the observed failure, sourced from the site's outbound link checks. A resolved finding has either `url` or `host` and no other field. Absent on findings of any other type."
29791
30483
  properties:
29792
30484
  url:
29793
30485
  type: string
29794
30486
  format: uri
29795
- description: The external URL that fails to resolve.
30487
+ description: The external URL that fails. Absent when `host` is set.
30488
+ host:
30489
+ type: string
30490
+ description: The domain that doesn't resolve, set instead of `url` when the finding covers every link to that domain on the site.
29796
30491
  status:
29797
30492
  type: string
29798
- description: Current health status of the URL for this site.
30493
+ description: Current health status of the URL or domain for this site.
29799
30494
  enum:
29800
30495
  - pending
29801
30496
  - healthy
@@ -29819,10 +30514,7 @@ components:
29819
30514
  description: HTTP status code of the last observation, when one was received.
29820
30515
  checkedAt:
29821
30516
  $ref: "#/components/schemas/Timestamp"
29822
- description: When the URL was last observed over HTTP.
29823
- required:
29824
- - url
29825
- - status
30517
+ description: When the URL or domain was last observed.
29826
30518
  SiteFinding:
29827
30519
  type: object
29828
30520
  properties:
@@ -29866,6 +30558,20 @@ components:
29866
30558
  autoFixable:
29867
30559
  type: boolean
29868
30560
  description: Whether an AI agent should be able to fix this finding directly
30561
+ autoResolution:
30562
+ description: What GitBook did on its own to resolve the finding. Null when it never acted on the finding.
30563
+ oneOf:
30564
+ - $ref: "#/components/schemas/SiteFindingAutoResolution"
30565
+ - type: "null"
30566
+ state:
30567
+ $ref: "#/components/schemas/SiteFindingState"
30568
+ servingRedirect:
30569
+ $ref: "#/components/schemas/SiteFindingServingRedirect"
30570
+ actions:
30571
+ type: array
30572
+ description: Actions the finding allows now, applied with `applySiteFindingAction`.
30573
+ items:
30574
+ $ref: "#/components/schemas/SiteFindingAvailableAction"
29869
30575
  brokenLinkAction:
29870
30576
  $ref: "#/components/schemas/SiteFindingBrokenLinkAction"
29871
30577
  outboundLink:
@@ -29899,6 +30605,7 @@ components:
29899
30605
  - severity
29900
30606
  - description
29901
30607
  - autoFixable
30608
+ - autoResolution
29902
30609
  - createdAt
29903
30610
  - updatedAt
29904
30611
  - urls
@@ -30006,6 +30713,23 @@ components:
30006
30713
  description: Count of answers by site channel ID.
30007
30714
  additionalProperties:
30008
30715
  type: number
30716
+ SiteQuestionStatsVisitorTypes:
30717
+ type: object
30718
+ description: Count of answers by visitor type.
30719
+ properties:
30720
+ human:
30721
+ type: number
30722
+ agent:
30723
+ type: number
30724
+ bot:
30725
+ type: number
30726
+ unknown:
30727
+ type: number
30728
+ required:
30729
+ - human
30730
+ - agent
30731
+ - bot
30732
+ - unknown
30009
30733
  SiteQuestionStats:
30010
30734
  type: object
30011
30735
  description: Aggregated stats for questions and linked answers.
@@ -30028,6 +30752,8 @@ components:
30028
30752
  $ref: "#/components/schemas/SiteQuestionStatsChannelTypes"
30029
30753
  channels:
30030
30754
  $ref: "#/components/schemas/SiteQuestionStatsChannels"
30755
+ visitorTypes:
30756
+ $ref: "#/components/schemas/SiteQuestionStatsVisitorTypes"
30031
30757
  weeklyPulse:
30032
30758
  type: array
30033
30759
  minItems: 13
@@ -30044,6 +30770,7 @@ components:
30044
30770
  - types
30045
30771
  - channelTypes
30046
30772
  - channels
30773
+ - visitorTypes
30047
30774
  - weeklyPulse
30048
30775
  SiteQuestion:
30049
30776
  type: object
@@ -30708,6 +31435,14 @@ components:
30708
31435
  oneOf:
30709
31436
  - $ref: "#/components/schemas/SiteCoreChannelType"
30710
31437
  - $ref: "#/components/schemas/SiteConfigurableChannelType"
31438
+ SiteQuestionVisitorType:
31439
+ type: string
31440
+ description: "Who asked the question: `human` for a person using a web browser, `agent` for an AI agent, `bot` for another automated client that names itself, such as a search engine crawler, and `unknown` when it can't be told, such as for a script calling the API."
31441
+ enum:
31442
+ - human
31443
+ - agent
31444
+ - bot
31445
+ - unknown
30711
31446
  SiteQuestionAnswerResolution:
30712
31447
  type: string
30713
31448
  description: Whether the response answered the question.
@@ -30986,6 +31721,8 @@ components:
30986
31721
  required:
30987
31722
  - type
30988
31723
  - id
31724
+ visitorType:
31725
+ $ref: "#/components/schemas/SiteQuestionVisitorType"
30989
31726
  createdAt:
30990
31727
  $ref: "#/components/schemas/Timestamp"
30991
31728
  updatedAt:
@@ -31012,6 +31749,7 @@ components:
31012
31749
  - helpfulness
31013
31750
  - relevance
31014
31751
  - channel
31752
+ - visitorType
31015
31753
  - createdAt
31016
31754
  - urls
31017
31755
  AIMessageRole:
@@ -31586,6 +32324,23 @@ components:
31586
32324
  - spaceId
31587
32325
  - changeRequestId
31588
32326
  - reason
32327
+ AIToolCallMergeChangeRequest:
32328
+ type: object
32329
+ properties:
32330
+ tool:
32331
+ type: string
32332
+ enum:
32333
+ - mergeChangeRequest
32334
+ spaceId:
32335
+ type: string
32336
+ description: The ID of the space the change request belongs to.
32337
+ changeRequestId:
32338
+ type: string
32339
+ description: The ID of the change request that was merged.
32340
+ required:
32341
+ - tool
32342
+ - spaceId
32343
+ - changeRequestId
31589
32344
  AIToolCallComment:
31590
32345
  type: object
31591
32346
  properties:
@@ -31738,6 +32493,59 @@ components:
31738
32493
  - status
31739
32494
  - importedPages
31740
32495
  - totalPages
32496
+ AIToolCallImportOpenAPISpec:
32497
+ type: object
32498
+ properties:
32499
+ tool:
32500
+ type: string
32501
+ enum:
32502
+ - importOpenAPISpec
32503
+ spaceId:
32504
+ type: string
32505
+ description: The ID of the space the API reference is added to.
32506
+ changeRequestId:
32507
+ type: string
32508
+ description: The ID of the change request the API reference is added to.
32509
+ specSlug:
32510
+ type: string
32511
+ description: The slug of the OpenAPI spec the reference is generated from.
32512
+ url:
32513
+ type: string
32514
+ description: The URL the spec is imported from, when importing from a URL.
32515
+ file:
32516
+ type: string
32517
+ description: Name of the attached file the spec is imported from, when importing a file.
32518
+ required:
32519
+ - tool
32520
+ - spaceId
32521
+ - changeRequestId
32522
+ - specSlug
32523
+ AIToolCallSiteSetupStep:
32524
+ type: object
32525
+ properties:
32526
+ tool:
32527
+ type: string
32528
+ enum:
32529
+ - siteSetupStep
32530
+ step:
32531
+ $ref: "#/components/schemas/SiteSetupStepId"
32532
+ status:
32533
+ type: string
32534
+ description: |
32535
+ Where the setup step stands in the conversation.
32536
+ * `current`: The step is being worked on.
32537
+ * `done`: The step is completed.
32538
+ * `skipped`: The user skipped the step.
32539
+ * `pending`: The step is not started: it waits again after the user went back to an earlier step.
32540
+ enum:
32541
+ - current
32542
+ - done
32543
+ - skipped
32544
+ - pending
32545
+ required:
32546
+ - tool
32547
+ - step
32548
+ - status
31741
32549
  AIToolCallStartBackgroundAgent:
31742
32550
  type: object
31743
32551
  description: |
@@ -31844,12 +32652,15 @@ components:
31844
32652
  - $ref: "#/components/schemas/AIToolCallGetChangeRequestDetails"
31845
32653
  - $ref: "#/components/schemas/AIToolCallSetChangeRequestDetails"
31846
32654
  - $ref: "#/components/schemas/AIToolCallArchiveChangeRequest"
32655
+ - $ref: "#/components/schemas/AIToolCallMergeChangeRequest"
31847
32656
  - $ref: "#/components/schemas/AIToolCallComment"
31848
32657
  - $ref: "#/components/schemas/AIToolCallReplyToComment"
31849
32658
  - $ref: "#/components/schemas/AIToolCallGetComments"
31850
32659
  - $ref: "#/components/schemas/AIToolCallSubmitChangeRequestReview"
31851
32660
  - $ref: "#/components/schemas/AIToolCallStartContentImport"
31852
32661
  - $ref: "#/components/schemas/AIToolCallCheckContentImport"
32662
+ - $ref: "#/components/schemas/AIToolCallImportOpenAPISpec"
32663
+ - $ref: "#/components/schemas/AIToolCallSiteSetupStep"
31853
32664
  - $ref: "#/components/schemas/AIToolCallStartBackgroundAgent"
31854
32665
  - $ref: "#/components/schemas/AIToolCallMCP"
31855
32666
  - $ref: "#/components/schemas/AIToolCallOther"
@@ -32117,6 +32928,10 @@ components:
32117
32928
  format: date-time
32118
32929
  description: |
32119
32930
  When the message was added to the conversation. Absent on messages recorded before this field existed.
32931
+ clientMessageId:
32932
+ type: string
32933
+ description: |
32934
+ The identifier the client gave the message when it sent it. Absent on messages the agent wrote, and on messages sent without one.
32120
32935
  required:
32121
32936
  - id
32122
32937
  - role
@@ -32288,8 +33103,7 @@ components:
32288
33103
  origin:
32289
33104
  $ref: "#/components/schemas/UserSitePermissionOrigin"
32290
33105
  disabled:
32291
- type: boolean
32292
- description: Whether the user is disabled
33106
+ $ref: "#/components/schemas/MemberDisabled"
32293
33107
  lastSeenAt:
32294
33108
  description: Date at which the user was last seen
32295
33109
  $ref: "#/components/schemas/Timestamp"
@@ -32337,6 +33151,11 @@ components:
32337
33151
  type: array
32338
33152
  items:
32339
33153
  $ref: "#/components/schemas/AIAttachment"
33154
+ clientMessageId:
33155
+ type: string
33156
+ maxLength: 64
33157
+ description: |
33158
+ Identifier the client gives the message it sends, echoed on the message the agent adds to the conversation, so the client can tell its own message apart from any other.
32340
33159
  required:
32341
33160
  - role
32342
33161
  - content
@@ -32803,6 +33622,11 @@ components:
32803
33622
  - spaces
32804
33623
  - createdAt
32805
33624
  - createdBy
33625
+ SiteInsightsUserAgent:
33626
+ type: string
33627
+ description: |
33628
+ User agent of the visitor.
33629
+ https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
32806
33630
  SiteInsightsEventSession:
32807
33631
  allOf:
32808
33632
  - $ref: "#/components/schemas/SiteInsightsSession"
@@ -32820,10 +33644,7 @@ components:
32820
33644
  IP address of the visitor.
32821
33645
  If not defined, it'll default to the IP executing the request.
32822
33646
  userAgent:
32823
- type: string
32824
- description: |
32825
- User-agent of the visitor.
32826
- https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
33647
+ $ref: "#/components/schemas/SiteInsightsUserAgent"
32827
33648
  language:
32828
33649
  type:
32829
33650
  - string
@@ -33370,7 +34191,7 @@ components:
33370
34191
  oneOf:
33371
34192
  - $ref: "#/components/schemas/SiteInsightsQueryDateTimeColumn"
33372
34193
  - type: object
33373
- description: Day of the week the event happened, in UTC, from 1 (Monday) to 7 (Sunday). Group by it alongside `hourOfDay` to fold any range into a weekly activity profile.
34194
+ description: Day of the week the event happened in `timezone`, from 1 (Monday) to 7 (Sunday). Group by it alongside `hourOfDay` to fold any range into a weekly activity profile.
33374
34195
  required:
33375
34196
  - column
33376
34197
  properties:
@@ -33378,8 +34199,12 @@ components:
33378
34199
  type: string
33379
34200
  enum:
33380
34201
  - dayOfWeek
34202
+ timezone:
34203
+ type: string
34204
+ description: IANA time zone the event is read in, UTC when omitted.
34205
+ example: Europe/Paris
33381
34206
  - type: object
33382
- description: Hour of the day the event happened, in UTC, from 0 to 23.
34207
+ description: Hour of the day the event happened in `timezone`, from 0 to 23.
33383
34208
  required:
33384
34209
  - column
33385
34210
  properties:
@@ -33387,6 +34212,10 @@ components:
33387
34212
  type: string
33388
34213
  enum:
33389
34214
  - hourOfDay
34215
+ timezone:
34216
+ type: string
34217
+ description: IANA time zone the event is read in, UTC when omitted.
34218
+ example: Europe/Paris
33390
34219
  - type: object
33391
34220
  required:
33392
34221
  - column
@@ -35279,6 +36108,104 @@ components:
35279
36108
  - object
35280
36109
  - url
35281
36110
  - expiresAt
36111
+ APIProfilingSession:
36112
+ type: object
36113
+ required:
36114
+ - object
36115
+ - id
36116
+ - status
36117
+ - releaseVersion
36118
+ - releaseBuild
36119
+ - createdAt
36120
+ - expiresAt
36121
+ - startedBy
36122
+ - urls
36123
+ properties:
36124
+ object:
36125
+ type: string
36126
+ enum:
36127
+ - api_cpu_profiling_session
36128
+ id:
36129
+ type: string
36130
+ format: uuid
36131
+ status:
36132
+ type: string
36133
+ enum:
36134
+ - active
36135
+ - stopped
36136
+ - expired
36137
+ mode:
36138
+ type: string
36139
+ enum:
36140
+ - cpu
36141
+ - allocations
36142
+ description: The profiler selected for this session. Earlier sessions without this field use CPU profiling.
36143
+ releaseVersion:
36144
+ type: string
36145
+ releaseBuild:
36146
+ type: string
36147
+ createdAt:
36148
+ type: string
36149
+ format: date-time
36150
+ expiresAt:
36151
+ type: string
36152
+ format: date-time
36153
+ stoppedAt:
36154
+ type: string
36155
+ format: date-time
36156
+ startedBy:
36157
+ type: string
36158
+ urls:
36159
+ type: object
36160
+ required:
36161
+ - location
36162
+ properties:
36163
+ location:
36164
+ type: string
36165
+ APICPUProfile:
36166
+ type: object
36167
+ required:
36168
+ - object
36169
+ - id
36170
+ - instanceId
36171
+ - startedAt
36172
+ - endedAt
36173
+ - bytes
36174
+ - urls
36175
+ properties:
36176
+ object:
36177
+ type: string
36178
+ enum:
36179
+ - api_cpu_profile
36180
+ - api_allocation_profile
36181
+ mode:
36182
+ type: string
36183
+ enum:
36184
+ - cpu
36185
+ - allocations
36186
+ id:
36187
+ type: string
36188
+ format: uuid
36189
+ instanceId:
36190
+ type: string
36191
+ startedAt:
36192
+ type: string
36193
+ format: date-time
36194
+ endedAt:
36195
+ type: string
36196
+ format: date-time
36197
+ bytes:
36198
+ type: integer
36199
+ urls:
36200
+ type: object
36201
+ required:
36202
+ - location
36203
+ properties:
36204
+ location:
36205
+ type: string
36206
+ devtools:
36207
+ type: string
36208
+ description: Download the raw .cpuprofile or .heapprofile for Chrome DevTools.
35282
36209
  PurgeCDNCacheContext:
35283
36210
  type: object
35284
36211
  description: The context to send when purging the CDN Cache
@@ -36499,6 +37426,8 @@ components:
36499
37426
  $ref: "#/components/schemas/LocalizedString128"
36500
37427
  icon:
36501
37428
  $ref: "#/components/schemas/Icon"
37429
+ condition:
37430
+ $ref: "#/components/schemas/Expression"
36502
37431
  draft:
36503
37432
  type: boolean
36504
37433
  description: Whether the section group is draft and not live.
@@ -36960,8 +37889,12 @@ components:
36960
37889
  feature:
36961
37890
  $ref: "#/components/schemas/OrganizationFeature"
36962
37891
  requiredPlan:
36963
- description: The minimum organization plan that includes the feature.
37892
+ description: The internal identifier of the minimum organization plan that includes the feature. The human-readable name is provided in requiredPlanName.
36964
37893
  $ref: "#/components/schemas/BillingProduct"
37894
+ requiredPlanName:
37895
+ type: string
37896
+ description: The human-readable name of the required organization plan.
37897
+ example: Pro
36965
37898
  url:
36966
37899
  type: string
36967
37900
  format: uri
@@ -36971,6 +37904,7 @@ components:
36971
37904
  - type
36972
37905
  - feature
36973
37906
  - requiredPlan
37907
+ - requiredPlanName
36974
37908
  - url
36975
37909
  - type: object
36976
37910
  title: Site plan upgrade
@@ -36982,8 +37916,12 @@ components:
36982
37916
  feature:
36983
37917
  $ref: "#/components/schemas/SiteFeatureKey"
36984
37918
  requiredPlan:
36985
- description: The minimum site plan that includes the feature.
37919
+ description: The internal identifier of the minimum site plan that includes the feature. The human-readable name is provided in requiredPlanName.
36986
37920
  $ref: "#/components/schemas/SiteType"
37921
+ requiredPlanName:
37922
+ type: string
37923
+ description: The human-readable name of the required site plan.
37924
+ example: Ultimate
36987
37925
  url:
36988
37926
  type: string
36989
37927
  format: uri
@@ -36993,6 +37931,7 @@ components:
36993
37931
  - type
36994
37932
  - feature
36995
37933
  - requiredPlan
37934
+ - requiredPlanName
36996
37935
  - url
36997
37936
  discriminator:
36998
37937
  propertyName: type
@@ -37006,6 +37945,18 @@ components:
37006
37945
  - canceled
37007
37946
  - unpaid
37008
37947
  - paused
37948
+ BillingDiscount:
37949
+ type: object
37950
+ properties:
37951
+ duration:
37952
+ description: How many months the discount will last
37953
+ type: number
37954
+ percentOff:
37955
+ description: Percent that will be deducted from the subtotal of the invoice
37956
+ type: number
37957
+ required:
37958
+ - duration
37959
+ - percentOff
37009
37960
  APIIntegrationScope:
37010
37961
  type: string
37011
37962
  enum:
@@ -37529,6 +38480,19 @@ components:
37529
38480
  required:
37530
38481
  - channel
37531
38482
  - organization
38483
+ APIChannelOrganizationSCIMConnections:
38484
+ type: object
38485
+ description: Subscription channel for changes in the SCIM connections of an organization.
38486
+ properties:
38487
+ channel:
38488
+ type: string
38489
+ enum:
38490
+ - organization-scim-connections
38491
+ organization:
38492
+ type: string
38493
+ required:
38494
+ - channel
38495
+ - organization
37532
38496
  APIChannelOrganizationCustomFonts:
37533
38497
  type: object
37534
38498
  description: Subscription channel for changes in custom fonts in an organization.
@@ -38097,6 +39061,7 @@ components:
38097
39061
  - $ref: "#/components/schemas/APIChannelOrganizationOpenAPISpecs"
38098
39062
  - $ref: "#/components/schemas/APIChannelOrganizationTranslations"
38099
39063
  - $ref: "#/components/schemas/APIChannelOrganizationTranslationsGlossary"
39064
+ - $ref: "#/components/schemas/APIChannelOrganizationSCIMConnections"
38100
39065
  - $ref: "#/components/schemas/APIChannelOrganizationCustomFonts"
38101
39066
  - $ref: "#/components/schemas/APIChannelOrganizationAgentInstructions"
38102
39067
  - $ref: "#/components/schemas/APIChannelOrganizationChangeRequests"
@@ -38848,20 +39813,23 @@ components:
38848
39813
  application/json:
38849
39814
  schema:
38850
39815
  description: |
38851
- API clients and agents can use `error.upgrade` to identify the
38852
- unavailable feature, required plan, and upgrade URL.
39816
+ `error.upgrade` identifies the unavailable feature, the minimum required
39817
+ plan, and the URL of the relevant plan settings.
38853
39818
 
38854
- Call `getOrganizationSubscription` (`GET /orgs/{organizationId}/subscription`),
38855
- or the MCP `get_subscription_information` tool, to check the current plan
38856
- and `canManageBilling`. If false, ask an organization administrator to upgrade.
39819
+ `error.upgrade.requiredPlanName` is the human-readable plan name, such as
39820
+ "Pro", "Essential", or "Ultimate", suitable for display to users.
39821
+ `error.upgrade.requiredPlan` is the internal plan identifier for
39822
+ programmatic use, such as "pro_2024" or "premium".
38857
39823
 
38858
- Before initiating an upgrade, verify billing permissions and obtain
38859
- explicit approval of the price and billing changes at `error.upgrade.url`.
39824
+ The required plan describes feature availability, not a price quote.
38860
39825
 
38861
- The required plan is not a price quote; it's the plan needed to be
38862
- able to perform the original operation.
39826
+ `getOrganizationSubscription` (`GET /orgs/{organizationId}/subscription`)
39827
+ provides the current plan and `canManageBilling`, which indicates whether
39828
+ the caller can manage billing. Otherwise, an organization administrator
39829
+ must perform the upgrade. Upgrades require billing permissions and approval
39830
+ of any price or billing changes.
38863
39831
 
38864
- Retry the original operation after the upgrade is complete.
39832
+ The original operation can be retried after the upgrade is complete.
38865
39833
  type: object
38866
39834
  required:
38867
39835
  - error