@gitbook/api 0.199.0 → 0.201.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
@@ -1369,6 +1369,7 @@ paths:
1369
1369
  - $ref: "#/components/parameters/documentEvaluated"
1370
1370
  - $ref: "#/components/parameters/documentDereferenced"
1371
1371
  - $ref: "#/components/parameters/revisionMetadata"
1372
+ - $ref: "#/components/parameters/revisionCachedMetadata"
1372
1373
  - $ref: "#/components/parameters/revisionComputed"
1373
1374
  responses:
1374
1375
  "200":
@@ -2932,6 +2933,7 @@ paths:
2932
2933
  - $ref: "#/components/parameters/documentEvaluated"
2933
2934
  - $ref: "#/components/parameters/documentDereferenced"
2934
2935
  - $ref: "#/components/parameters/revisionMetadata"
2936
+ - $ref: "#/components/parameters/revisionCachedMetadata"
2935
2937
  - $ref: "#/components/parameters/revisionComputed"
2936
2938
  responses:
2937
2939
  "200":
@@ -2986,6 +2988,7 @@ paths:
2986
2988
  - $ref: "#/components/parameters/documentEvaluated"
2987
2989
  - $ref: "#/components/parameters/documentDereferenced"
2988
2990
  - $ref: "#/components/parameters/revisionMetadata"
2991
+ - $ref: "#/components/parameters/revisionCachedMetadata"
2989
2992
  - $ref: "#/components/parameters/revisionComputed"
2990
2993
  responses:
2991
2994
  "200":
@@ -5865,6 +5868,12 @@ paths:
5865
5868
  schema:
5866
5869
  type: string
5867
5870
  description: If defined, only change requests linked to this site topic will be returned.
5871
+ - name: styleguideRun
5872
+ in: query
5873
+ required: false
5874
+ schema:
5875
+ type: string
5876
+ description: If defined, only change requests opened by this style guide check run will be returned.
5868
5877
  - name: finding
5869
5878
  in: query
5870
5879
  required: false
@@ -9446,7 +9455,9 @@ paths:
9446
9455
  /orgs/{organizationId}/sites/{siteId}/findings:
9447
9456
  get:
9448
9457
  operationId: listSiteFindings
9449
- summary: List all site context findings
9458
+ summary: List documentation issues GitBook has found on a site
9459
+ description: Lists the quality issues GitBook's AI has identified on a site by comparing its content against real usage and external sources — content gaps, outdated or incorrect content, and broken or outbound links. Use this when asked to find, audit, or fix problems in a site's docs.
9460
+ x-gitbook-mcp: true
9450
9461
  tags:
9451
9462
  - site-context
9452
9463
  security:
@@ -9535,7 +9546,9 @@ paths:
9535
9546
  /orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}:
9536
9547
  get:
9537
9548
  operationId: getSiteFindingById
9538
- summary: Get a site finding by ID
9549
+ summary: Get details of a single documentation issue
9550
+ description: Retrieves the full detail of one documentation issue found by GitBook's AI. Use this after `listSiteFindings` to inspect a specific issue before deciding to fix, dismiss, or investigate it further.
9551
+ x-gitbook-mcp: true
9539
9552
  tags:
9540
9553
  - site-context
9541
9554
  security:
@@ -9555,7 +9568,9 @@ paths:
9555
9568
  $ref: "#/components/schemas/SiteFinding"
9556
9569
  patch:
9557
9570
  operationId: updateSiteFindingById
9558
- summary: Update a site finding
9571
+ summary: Resolve, dismiss, or reopen a documentation issue
9572
+ 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.
9573
+ x-gitbook-mcp: true
9559
9574
  tags:
9560
9575
  - site-context
9561
9576
  security:
@@ -9587,7 +9602,9 @@ paths:
9587
9602
  /orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/change-requests:
9588
9603
  get:
9589
9604
  operationId: listChangeRequestsForSiteFinding
9590
- summary: List change requests linked to a site finding
9605
+ summary: List content fixes already proposed for a documentation issue
9606
+ description: Lists the change requests created to fix a documentation issue. Use this to check whether an issue already has a pending or merged fix before triggering a new one.
9607
+ x-gitbook-mcp: true
9591
9608
  tags:
9592
9609
  - site-context
9593
9610
  security:
@@ -9618,7 +9635,9 @@ paths:
9618
9635
  $ref: "#/components/schemas/ChangeRequest"
9619
9636
  post:
9620
9637
  operationId: triggerChangeRequestsForSiteFinding
9621
- summary: Process a site finding into change requests
9638
+ summary: Fix a documentation issue by generating a change request
9639
+ description: "Starts GitBook's AI on fixing a documentation issue directly: it drafts the content change and opens it as a change request for review, rather than editing content in place. This is the primary way to act on \"fix issues/gaps/broken links in my docs\" requests once `listSiteFindings` has surfaced the relevant findings. Processing is asynchronous; poll `listChangeRequestsForSiteFinding` for the resulting change request, then review and merge it with `submitOrMergeChangeRequest`."
9640
+ x-gitbook-mcp: true
9622
9641
  tags:
9623
9642
  - site-context
9624
9643
  security:
@@ -9635,7 +9654,9 @@ paths:
9635
9654
  /orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/pages:
9636
9655
  get:
9637
9656
  operationId: listPagesForSiteFinding
9638
- summary: List pages linked to a site finding
9657
+ summary: List the pages affected by a documentation issue
9658
+ description: Lists the site pages a documentation issue relates to. Use this to locate which page(s) to edit when fixing an issue manually instead of via `triggerChangeRequestsForSiteFinding`.
9659
+ x-gitbook-mcp: true
9639
9660
  tags:
9640
9661
  - site-context
9641
9662
  security:
@@ -9667,7 +9688,9 @@ paths:
9667
9688
  /orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/questions:
9668
9689
  get:
9669
9690
  operationId: listQuestionsForSiteFinding
9670
- summary: List questions linked to a site finding
9691
+ summary: List the Ask-AI questions evidencing a documentation issue
9692
+ description: Lists the questions end users asked GitBook's Ask-AI assistant that were used as evidence for a documentation issue. Use this to see what users actually wanted to know before deciding how to fix the issue.
9693
+ x-gitbook-mcp: true
9671
9694
  tags:
9672
9695
  - site-context
9673
9696
  security:
@@ -9699,7 +9722,9 @@ paths:
9699
9722
  /orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/records:
9700
9723
  get:
9701
9724
  operationId: listRecordsForSiteFinding
9702
- summary: List records linked to a site finding
9725
+ summary: List the source content evidencing a documentation issue
9726
+ description: Lists the context records that GitBook's AI used as evidence for a documentation issue. Use this to see what real-world signal led to the finding before deciding how to fix it.
9727
+ x-gitbook-mcp: true
9703
9728
  tags:
9704
9729
  - site-context
9705
9730
  security:
@@ -9731,8 +9756,9 @@ paths:
9731
9756
  /orgs/{organizationId}/sites/{siteId}/stats/findings:
9732
9757
  get:
9733
9758
  operationId: getSiteFindingStats
9734
- summary: Get aggregate statistics about the findings identified on a site
9735
- description: Returns aggregate statistics about the findings GitBook identified on a site — how many were found, how they break down by status and severity, which connectors surfaced them, and how many change requests created to fix them have been merged. Accepts the same filters as the finding list endpoint, so the stats can follow the list the user is looking at. Use it for a high-level view before drilling into individual findings.
9759
+ summary: Get a summary of documentation issues found on a site
9760
+ description: Returns aggregate statistics about the documentation issues GitBook identified on a site. Accepts the same filters as `listSiteFindings`. Use this to answer "how healthy are my docs" before drilling into individual findings.
9761
+ x-gitbook-mcp: true
9736
9762
  tags:
9737
9763
  - site-context
9738
9764
  security:
@@ -10058,7 +10084,9 @@ paths:
10058
10084
  /orgs/{organizationId}/sites/{siteId}/topics/{siteTopicId}/findings:
10059
10085
  delete:
10060
10086
  operationId: deleteSiteTopicFindings
10061
- summary: Delete all findings for a topic
10087
+ summary: Delete all documentation issues found under a topic
10088
+ 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.
10089
+ x-gitbook-mcp: true
10062
10090
  tags:
10063
10091
  - site-context
10064
10092
  security:
@@ -10856,7 +10884,7 @@ paths:
10856
10884
  - string
10857
10885
  - "null"
10858
10886
  description: The copyright text that is displayed in the footer. Set to null to reset the override.
10859
- maxLength: 300
10887
+ maxLength: 512
10860
10888
  themes:
10861
10889
  type: object
10862
10890
  properties:
@@ -11458,6 +11486,89 @@ paths:
11458
11486
  $ref: "#/components/schemas/Space"
11459
11487
  "404":
11460
11488
  $ref: "#/components/responses/NotFoundError"
11489
+ /orgs/{organizationId}/sites/{siteId}/styleguide/runs:
11490
+ post:
11491
+ operationId: createSiteStyleguideRun
11492
+ summary: Start a style guide check run for a site
11493
+ description: "Starts a style guide check: GitBook Agent reviews the given spaces against the site's style guide and proposes fixes. One draft change request is opened per space, each marked as belonging to the returned run. Fails if the site has no style guide."
11494
+ x-gitbook-mcp: true
11495
+ tags:
11496
+ - sites
11497
+ security:
11498
+ - user: []
11499
+ - oauth:
11500
+ - site:write
11501
+ parameters:
11502
+ - $ref: "#/components/parameters/organizationId"
11503
+ - $ref: "#/components/parameters/siteId"
11504
+ requestBody:
11505
+ required: true
11506
+ content:
11507
+ application/json:
11508
+ schema:
11509
+ type: object
11510
+ properties:
11511
+ spaces:
11512
+ type: array
11513
+ description: IDs of the site's spaces to check. Each must be an editable content space of the site, and not the style guide itself.
11514
+ items:
11515
+ type: string
11516
+ minItems: 1
11517
+ maxItems: 3
11518
+ required:
11519
+ - spaces
11520
+ responses:
11521
+ "201":
11522
+ description: Style guide check run started
11523
+ content:
11524
+ application/json:
11525
+ schema:
11526
+ type: object
11527
+ properties:
11528
+ run:
11529
+ $ref: "#/components/schemas/SiteStyleguideRun"
11530
+ changeRequests:
11531
+ type: array
11532
+ description: The change requests opened by the run, one per space that could be started.
11533
+ items:
11534
+ $ref: "#/components/schemas/ChangeRequest"
11535
+ required:
11536
+ - run
11537
+ - changeRequests
11538
+ "404":
11539
+ $ref: "#/components/responses/NotFoundError"
11540
+ get:
11541
+ operationId: listSiteStyleguideRuns
11542
+ summary: List the style guide check runs of a site
11543
+ description: Returns the site's style guide check runs, most recent first. Use the `styleguideRun` filter on the organization change requests endpoint to get the change requests a run opened.
11544
+ x-gitbook-mcp: true
11545
+ tags:
11546
+ - sites
11547
+ security:
11548
+ - user: []
11549
+ - oauth:
11550
+ - site:read
11551
+ parameters:
11552
+ - $ref: "#/components/parameters/organizationId"
11553
+ - $ref: "#/components/parameters/siteId"
11554
+ - $ref: "#/components/parameters/listPage"
11555
+ - $ref: "#/components/parameters/listLimit"
11556
+ responses:
11557
+ "200":
11558
+ description: OK
11559
+ content:
11560
+ application/json:
11561
+ schema:
11562
+ allOf:
11563
+ - $ref: "#/components/schemas/List"
11564
+ - type: object
11565
+ required:
11566
+ - items
11567
+ properties:
11568
+ items:
11569
+ type: array
11570
+ items:
11571
+ $ref: "#/components/schemas/SiteStyleguideRun"
11461
11572
  /orgs/{organizationId}/sites/{siteId}/insights/events:
11462
11573
  post:
11463
11574
  operationId: trackEventsInSiteById
@@ -11600,6 +11711,10 @@ paths:
11600
11711
  type: boolean
11601
11712
  default: false
11602
11713
  description: Whether the redirect is draft and not live.
11714
+ permanent:
11715
+ type: boolean
11716
+ default: false
11717
+ description: Whether the redirect is permanent for public live traffic.
11603
11718
  destination:
11604
11719
  $ref: "#/components/schemas/SiteRedirectInputDestination"
11605
11720
  required:
@@ -11670,6 +11785,9 @@ paths:
11670
11785
  type: boolean
11671
11786
  default: false
11672
11787
  description: Capture and append the wildcard-matched suffix to the destination URL.
11788
+ permanent:
11789
+ type: boolean
11790
+ description: Whether the redirect is permanent for public live traffic.
11673
11791
  destination:
11674
11792
  description: If set to null, the redirect matching the source+intent target will be deleted.
11675
11793
  oneOf:
@@ -11869,6 +11987,9 @@ paths:
11869
11987
  draft:
11870
11988
  type: boolean
11871
11989
  description: When true, it can be used to promote a draft redirect to live.
11990
+ permanent:
11991
+ type: boolean
11992
+ description: Whether the redirect is permanent for public live traffic.
11872
11993
  destination:
11873
11994
  $ref: "#/components/schemas/SiteRedirectDestination"
11874
11995
  responses:
@@ -12977,28 +13098,28 @@ components:
12977
13098
  tokenUrl: https://oauth.gitbook.com/token
12978
13099
  scopes:
12979
13100
  user:read: Read your GitBook user profile.
12980
- organization:read: Read organization settings and metadata.
12981
- organization:write: Create and update organization settings.
12982
- organization:members:read: Read organization members, invites and link invites.
12983
- organization:members:write: Manage organization members, invites and link invites.
13101
+ organization:read: Read the organizations you belong to, their settings and metadata, and their AI agent conversations.
13102
+ organization:write: Create organizations, and update organization settings and AI agent conversations.
13103
+ organization:members:read: Read organization members, teams, invites and link invites.
13104
+ organization:members:write: Manage organization members, teams, invites and link invites.
12984
13105
  organization:ask: Ask AI questions across an organization's content.
12985
13106
  organization:search: Search across an organization's content.
12986
- space:read: Read spaces and their content.
12987
- space:write: Create, update and delete spaces and their content, including imports.
12988
- space:permissions:read: Read space permissions.
12989
- space:permissions:write: Manage space permissions.
12990
- change-request:merge: Merge change requests, publishing their changes to the space.
12991
- site:read: Read sites and their settings.
12992
- site:write: Create, update and delete sites, sections and their settings.
13107
+ space:read: Read spaces and their content, including pages, change requests and their reviews, comments, files and revision history.
13108
+ space:write: Create, update and delete spaces and their content, including change requests (create, edit, review), comments, and content imports and exports. Merging a change request also requires change-request:merge.
13109
+ space:permissions:read: Read the users and teams who have access to spaces and collections.
13110
+ space:permissions:write: Manage who has access to spaces and collections, including inviting users and teams.
13111
+ change-request:merge: Merge change requests, publishing their changes to the space. Creating, editing and reviewing change requests only requires space:write.
13112
+ site:read: Read sites and their settings, including navigation structure, linked spaces, customization, redirects, topics, AI configuration and documentation issues.
13113
+ site:write: Create, update and delete sites and their settings, including navigation structure (sections, linked spaces, external links), customization, redirects, topics and AI configuration.
12993
13114
  site:publish: Publish and unpublish sites, controlling their public exposure.
12994
- site:permissions:read: Read site permissions.
12995
- site:permissions:write: Manage site permissions.
12996
- site:auth:read: Read site authentication and security configuration.
12997
- site:auth:write: Manage site authentication and security configuration.
12998
- site:insights:read: Read site analytics and insights.
13115
+ site:permissions:read: Read the users and teams who have access to sites.
13116
+ site:permissions:write: Manage who has access to sites, including inviting users and teams.
13117
+ site:auth:read: Read how visitors authenticate on a site and its security configuration, including private share links.
13118
+ site:auth:write: Manage how visitors authenticate on a site and its security configuration, including private share links.
13119
+ site:insights:read: Read site analytics and insights, including the questions visitors asked Ask AI and the answers they received.
12999
13120
  site:ask: Ask AI questions across a site's content.
13000
13121
  site:search: Search across a site's content.
13001
- integration:read: Read integrations and where they are installed.
13122
+ integration:read: Read integrations, their status and where they are installed.
13002
13123
  integration:installations:read: Read integration installations and their configuration, which can include credentials for third-party services.
13003
13124
  integration:installations:write: Install and configure integrations on an organization, its spaces and its sites.
13004
13125
  integration:publish: Publish integrations, which can request their own permissions on your content, and route their events to a development tunnel.
@@ -13141,6 +13262,13 @@ components:
13141
13262
  description: The path of the page in the revision.
13142
13263
  schema:
13143
13264
  type: string
13265
+ revisionCachedMetadata:
13266
+ name: cachedMetadata
13267
+ in: query
13268
+ description: If `true` is passed, mutable Git metadata may be served from a cache.
13269
+ schema:
13270
+ type: boolean
13271
+ default: false
13144
13272
  reusableContentId:
13145
13273
  name: reusableContentId
13146
13274
  in: path
@@ -15820,109 +15948,6 @@ components:
15820
15948
  - type
15821
15949
  - data
15822
15950
  - isVoid
15823
- DocumentBlockHint:
15824
- type: object
15825
- properties:
15826
- object:
15827
- type: string
15828
- enum:
15829
- - block
15830
- type:
15831
- type: string
15832
- enum:
15833
- - hint
15834
- key:
15835
- type: string
15836
- data:
15837
- type: object
15838
- properties:
15839
- style:
15840
- type: string
15841
- enum:
15842
- - info
15843
- - warning
15844
- - danger
15845
- - success
15846
- icon:
15847
- $ref: "#/components/schemas/Icon"
15848
- required:
15849
- - style
15850
- nodes:
15851
- type: array
15852
- items:
15853
- oneOf:
15854
- - $ref: "#/components/schemas/DocumentBlocksEssentials"
15855
- - $ref: "#/components/schemas/DocumentBlockEmbed"
15856
- - $ref: "#/components/schemas/DocumentBlockIntegration"
15857
- isVoid:
15858
- type: boolean
15859
- enum:
15860
- - false
15861
- required:
15862
- - object
15863
- - type
15864
- - data
15865
- - nodes
15866
- DocumentBlockQuote:
15867
- type: object
15868
- properties:
15869
- object:
15870
- type: string
15871
- enum:
15872
- - block
15873
- type:
15874
- type: string
15875
- enum:
15876
- - blockquote
15877
- key:
15878
- type: string
15879
- nodes:
15880
- type: array
15881
- items:
15882
- oneOf:
15883
- - $ref: "#/components/schemas/DocumentBlocksEssentials"
15884
- - $ref: "#/components/schemas/DocumentBlockQuote"
15885
- isVoid:
15886
- type: boolean
15887
- enum:
15888
- - false
15889
- data:
15890
- type: object
15891
- properties: {}
15892
- additionalProperties: false
15893
- required:
15894
- - object
15895
- - type
15896
- - nodes
15897
- DocumentBlockMath:
15898
- type: object
15899
- properties:
15900
- object:
15901
- type: string
15902
- enum:
15903
- - block
15904
- type:
15905
- type: string
15906
- enum:
15907
- - math
15908
- key:
15909
- type: string
15910
- data:
15911
- type: object
15912
- properties:
15913
- formula:
15914
- type: string
15915
- required:
15916
- - formula
15917
- isVoid:
15918
- type: boolean
15919
- enum:
15920
- - true
15921
- required:
15922
- - object
15923
- - type
15924
- - data
15925
- - isVoid
15926
15951
  DocumentTableViewGrid:
15927
15952
  type: object
15928
15953
  properties:
@@ -16321,6 +16346,110 @@ components:
16321
16346
  - data
16322
16347
  - isVoid
16323
16348
  - fragments
16349
+ DocumentBlockHint:
16350
+ type: object
16351
+ properties:
16352
+ object:
16353
+ type: string
16354
+ enum:
16355
+ - block
16356
+ type:
16357
+ type: string
16358
+ enum:
16359
+ - hint
16360
+ key:
16361
+ type: string
16362
+ data:
16363
+ type: object
16364
+ properties:
16365
+ style:
16366
+ type: string
16367
+ enum:
16368
+ - info
16369
+ - warning
16370
+ - danger
16371
+ - success
16372
+ icon:
16373
+ $ref: "#/components/schemas/Icon"
16374
+ required:
16375
+ - style
16376
+ nodes:
16377
+ type: array
16378
+ items:
16379
+ oneOf:
16380
+ - $ref: "#/components/schemas/DocumentBlocksEssentials"
16381
+ - $ref: "#/components/schemas/DocumentBlockEmbed"
16382
+ - $ref: "#/components/schemas/DocumentBlockIntegration"
16383
+ - $ref: "#/components/schemas/DocumentBlockTable"
16384
+ isVoid:
16385
+ type: boolean
16386
+ enum:
16387
+ - false
16388
+ required:
16389
+ - object
16390
+ - type
16391
+ - data
16392
+ - nodes
16393
+ DocumentBlockQuote:
16394
+ type: object
16395
+ properties:
16396
+ object:
16397
+ type: string
16398
+ enum:
16399
+ - block
16400
+ type:
16401
+ type: string
16402
+ enum:
16403
+ - blockquote
16404
+ key:
16405
+ type: string
16406
+ nodes:
16407
+ type: array
16408
+ items:
16409
+ oneOf:
16410
+ - $ref: "#/components/schemas/DocumentBlocksEssentials"
16411
+ - $ref: "#/components/schemas/DocumentBlockQuote"
16412
+ isVoid:
16413
+ type: boolean
16414
+ enum:
16415
+ - false
16416
+ data:
16417
+ type: object
16418
+ properties: {}
16419
+ additionalProperties: false
16420
+ required:
16421
+ - object
16422
+ - type
16423
+ - nodes
16424
+ DocumentBlockMath:
16425
+ type: object
16426
+ properties:
16427
+ object:
16428
+ type: string
16429
+ enum:
16430
+ - block
16431
+ type:
16432
+ type: string
16433
+ enum:
16434
+ - math
16435
+ key:
16436
+ type: string
16437
+ data:
16438
+ type: object
16439
+ properties:
16440
+ formula:
16441
+ type: string
16442
+ required:
16443
+ - formula
16444
+ isVoid:
16445
+ type: boolean
16446
+ enum:
16447
+ - true
16448
+ required:
16449
+ - object
16450
+ - type
16451
+ - data
16452
+ - isVoid
16324
16453
  DocumentBlockListItem:
16325
16454
  type: object
16326
16455
  properties:
@@ -18583,7 +18712,7 @@ components:
18583
18712
  properties:
18584
18713
  id:
18585
18714
  type: string
18586
- description: The ID of an existing link, as served on the change request. Pass it back to update that link; omit it to add a new one. Links created before links were stored individually have no ID and are matched on their URL instead.
18715
+ description: The ID of an existing link, as served on the change request. Pass it back to update that link, or omit it to add a new one.
18587
18716
  ref:
18588
18717
  $ref: "#/components/schemas/ContentRefURL"
18589
18718
  title:
@@ -18662,10 +18791,12 @@ components:
18662
18791
  properties:
18663
18792
  id:
18664
18793
  type: string
18665
- description: The ID of the link. Absent on links not yet stored relationally.
18794
+ description: The ID of the link.
18666
18795
  expanded:
18667
18796
  $ref: "#/components/schemas/ChangeRequestLinkExpanded"
18668
18797
  readOnly: true
18798
+ required:
18799
+ - id
18669
18800
  ChangeRequestLinks:
18670
18801
  type: array
18671
18802
  description: External links associated with the change request.
@@ -18738,6 +18869,23 @@ components:
18738
18869
  required:
18739
18870
  - site
18740
18871
  - topic
18872
+ styleguide:
18873
+ type: object
18874
+ description: Style guide check run that opened the change request, when it came from one.
18875
+ properties:
18876
+ site:
18877
+ type: string
18878
+ description: ID of the site the style guide belongs to.
18879
+ run:
18880
+ type: string
18881
+ description: ID of the style guide check run that opened the change request.
18882
+ changedPages:
18883
+ type: number
18884
+ description: |
18885
+ Number of pages the check changed, recorded when it finished. Absent while it is still running, or when it never completed.
18886
+ required:
18887
+ - site
18888
+ - run
18741
18889
  outdated:
18742
18890
  type: boolean
18743
18891
  description: If true, the change request is not up-to-date with latest changes in the main content.
@@ -24143,6 +24291,119 @@ components:
24143
24291
  required:
24144
24292
  - removeMembers
24145
24293
  - updateSites
24294
+ BillingCancellationComment:
24295
+ type: string
24296
+ description: Free-text detail a user typed alongside their cancellation reason.
24297
+ minLength: 1
24298
+ maxLength: 500
24299
+ BillingCancellationFeedback:
24300
+ type: object
24301
+ description: |
24302
+ Why an organization is cancelling its subscription, as answered by the user in the app. Recorded for analytics only: it never changes how the cancellation is applied.
24303
+ oneOf:
24304
+ - type: object
24305
+ properties:
24306
+ reason:
24307
+ type: string
24308
+ enum:
24309
+ - not_satisfied_with_product
24310
+ reasonDetail:
24311
+ description: The feature that was not satisfactory
24312
+ type: string
24313
+ enum:
24314
+ - editor
24315
+ - gitsync
24316
+ - ai_features
24317
+ additionalProperties: false
24318
+ required:
24319
+ - reason
24320
+ - reasonDetail
24321
+ - type: object
24322
+ properties:
24323
+ reason:
24324
+ type: string
24325
+ enum:
24326
+ - not_satisfied_with_product
24327
+ reasonDetail:
24328
+ description: The feature that was not satisfactory
24329
+ type: string
24330
+ enum:
24331
+ - other
24332
+ reasonComment:
24333
+ $ref: "#/components/schemas/BillingCancellationComment"
24334
+ additionalProperties: false
24335
+ required:
24336
+ - reason
24337
+ - reasonDetail
24338
+ - reasonComment
24339
+ - type: object
24340
+ properties:
24341
+ reason:
24342
+ type: string
24343
+ enum:
24344
+ - will_vibe_code_our_own_app
24345
+ reasonDetail:
24346
+ description: The tool the organization is moving to
24347
+ type: string
24348
+ enum:
24349
+ - claude
24350
+ - codex
24351
+ - replit
24352
+ additionalProperties: false
24353
+ required:
24354
+ - reason
24355
+ - reasonDetail
24356
+ - type: object
24357
+ properties:
24358
+ reason:
24359
+ type: string
24360
+ enum:
24361
+ - will_vibe_code_our_own_app
24362
+ reasonDetail:
24363
+ description: The tool the organization is moving to
24364
+ type: string
24365
+ enum:
24366
+ - other
24367
+ reasonComment:
24368
+ $ref: "#/components/schemas/BillingCancellationComment"
24369
+ additionalProperties: false
24370
+ required:
24371
+ - reason
24372
+ - reasonDetail
24373
+ - reasonComment
24374
+ - type: object
24375
+ properties:
24376
+ reason:
24377
+ type: string
24378
+ enum:
24379
+ - found_better_alternative
24380
+ reasonComment:
24381
+ $ref: "#/components/schemas/BillingCancellationComment"
24382
+ additionalProperties: false
24383
+ required:
24384
+ - reason
24385
+ - reasonComment
24386
+ - type: object
24387
+ properties:
24388
+ reason:
24389
+ type: string
24390
+ enum:
24391
+ - company_shutdown
24392
+ additionalProperties: false
24393
+ required:
24394
+ - reason
24395
+ - type: object
24396
+ properties:
24397
+ reason:
24398
+ type: string
24399
+ enum:
24400
+ - other_reason
24401
+ reasonComment:
24402
+ $ref: "#/components/schemas/BillingCancellationComment"
24403
+ additionalProperties: false
24404
+ required:
24405
+ - reason
24406
+ - reasonComment
24146
24407
  BillingCoupon:
24147
24408
  type: string
24148
24409
  description: Coupon or promotion code to apply to billing operations.
@@ -24167,6 +24428,8 @@ components:
24167
24428
  reason:
24168
24429
  type: string
24169
24430
  description: Reason that triggered the billing upgrade
24431
+ cancellationFeedback:
24432
+ $ref: "#/components/schemas/BillingCancellationFeedback"
24170
24433
  coupon:
24171
24434
  $ref: "#/components/schemas/BillingCoupon"
24172
24435
  description: Coupon or promotion code to apply to the subscription
@@ -24618,6 +24881,21 @@ components:
24618
24881
  required:
24619
24882
  - total
24620
24883
  - entries
24884
+ OrganizationFeature:
24885
+ type: string
24886
+ description: An organization feature used for plan access and upgrade prompts.
24887
+ enum:
24888
+ - max-members
24889
+ - ai-lens
24890
+ - pdf-export
24891
+ - ai-writing
24892
+ - reusable-content
24893
+ - translations
24894
+ - members-advanced-roles
24895
+ - members-teams
24896
+ - members-team-owners
24897
+ - security-saml
24898
+ - change-requests-merge-rules
24621
24899
  SearchSpaceResult:
24622
24900
  type: object
24623
24901
  description: Search result representing a space.
@@ -26780,7 +27058,7 @@ components:
26780
27058
  $ref: "#/components/schemas/CustomizationFooterGroup"
26781
27059
  copyright:
26782
27060
  type: string
26783
- maxLength: 300
27061
+ maxLength: 512
26784
27062
  required:
26785
27063
  - groups
26786
27064
  announcement:
@@ -27254,6 +27532,10 @@ components:
27254
27532
  type: string
27255
27533
  maxLength: 512
27256
27534
  description: User-Agent the agent itself presented, for example `claude-code/1.2.3`. It is what identifies the harness the agent ran in.
27535
+ correlationId:
27536
+ type: string
27537
+ maxLength: 100
27538
+ description: Identifier the surface gave the agent for the call being reported, used to find that call in the surface's own logs. Not an identifier of this report.
27257
27539
  onDemand:
27258
27540
  type: boolean
27259
27541
  default: false
@@ -30566,6 +30848,40 @@ components:
30566
30848
  - object
30567
30849
  - urls
30568
30850
  - $ref: "#/components/schemas/SiteAgentSettingsInput"
30851
+ SiteStyleguideRun:
30852
+ type: object
30853
+ description: "A style guide check run: one time a user asked GitBook Agent to check a set of the site's spaces against the site's style guide, opening a change request for each."
30854
+ properties:
30855
+ object:
30856
+ type: string
30857
+ enum:
30858
+ - styleguide-run
30859
+ id:
30860
+ type: string
30861
+ description: The ID of the run
30862
+ site:
30863
+ type: string
30864
+ description: ID of the site the run belongs to
30865
+ styleguide:
30866
+ type: string
30867
+ description: ID of the style guide space the run checked against
30868
+ spaces:
30869
+ type: array
30870
+ description: IDs of the spaces the run was asked to check. A change request may have failed to open for one of them, so this is the intent rather than the result.
30871
+ items:
30872
+ type: string
30873
+ createdAt:
30874
+ $ref: "#/components/schemas/Timestamp"
30875
+ createdBy:
30876
+ $ref: "#/components/schemas/User"
30877
+ required:
30878
+ - object
30879
+ - id
30880
+ - site
30881
+ - styleguide
30882
+ - spaces
30883
+ - createdAt
30884
+ - createdBy
30569
30885
  SiteInsightsEventSession:
30570
30886
  allOf:
30571
30887
  - $ref: "#/components/schemas/SiteInsightsSession"
@@ -32543,6 +32859,9 @@ components:
32543
32859
  captureWildcard:
32544
32860
  type: boolean
32545
32861
  description: Capture and append the wildcard-matched suffix to the destination URL.
32862
+ permanent:
32863
+ type: boolean
32864
+ description: Whether the redirect is configured as permanent. Permanent redirects are served as HTTP 308 for public live traffic and HTTP 307 in non-public contexts.
32546
32865
  destination:
32547
32866
  $ref: "#/components/schemas/SiteRedirectDestination"
32548
32867
  createdAt:
@@ -32559,6 +32878,7 @@ components:
32559
32878
  - source
32560
32879
  - draft
32561
32880
  - captureWildcard
32881
+ - permanent
32562
32882
  - destination
32563
32883
  - createdAt
32564
32884
  SiteRedirectInputDestination:
@@ -34117,11 +34437,12 @@ components:
34117
34437
  description: Whether the section group is draft and not live.
34118
34438
  children:
34119
34439
  type: array
34120
- description: Section or section group nodes nested under this group.
34440
+ description: Section, section group, or external link nodes nested under this group.
34121
34441
  items:
34122
34442
  oneOf:
34123
34443
  - $ref: "#/components/schemas/GitSyncSiteStructureSectionGroup"
34124
34444
  - $ref: "#/components/schemas/GitSyncSiteStructureSection"
34445
+ - $ref: "#/components/schemas/GitSyncSiteStructureExternalLink"
34125
34446
  required:
34126
34447
  - type
34127
34448
  - key
@@ -34253,24 +34574,85 @@ components:
34253
34574
  - key
34254
34575
  - title
34255
34576
  - path
34577
+ SiteExternalLinkTitle:
34578
+ type: string
34579
+ description: Title of the external link
34580
+ minLength: 2
34581
+ maxLength: 128
34582
+ SiteExternalLinkDescription:
34583
+ type: string
34584
+ description: Description of the external link
34585
+ minLength: 0
34586
+ maxLength: 256
34587
+ GitSyncSiteStructureExternalLink:
34588
+ type: object
34589
+ additionalProperties: false
34590
+ description: |
34591
+ An external link — a leaf that navigates away from the site to an absolute
34592
+ HTTP(S) URL. Discriminated by `type: external-link`.
34593
+
34594
+ An external link only exists in a section-based site structure: it may sit
34595
+ at the root alongside sections and section groups, or nested under a
34596
+ section group, but never inside a section.
34597
+ properties:
34598
+ type:
34599
+ type: string
34600
+ enum:
34601
+ - external-link
34602
+ description: Discriminator for an external link node.
34603
+ key:
34604
+ type: string
34605
+ description: |
34606
+ Stable identifier for this external link, used as the Git Sync key.
34607
+ Must be unique amongst all other nodes of the site. For example:
34608
+ `link-status` or `link-1`.
34609
+ minLength: 1
34610
+ title:
34611
+ $ref: "#/components/schemas/SiteExternalLinkTitle"
34612
+ localizedTitle:
34613
+ $ref: "#/components/schemas/LocalizedString128"
34614
+ description:
34615
+ $ref: "#/components/schemas/SiteExternalLinkDescription"
34616
+ localizedDescription:
34617
+ $ref: "#/components/schemas/LocalizedString256"
34618
+ icon:
34619
+ $ref: "#/components/schemas/Icon"
34620
+ url:
34621
+ $ref: "#/components/schemas/URL"
34622
+ description: Absolute HTTP or HTTPS URL opened by the external link.
34623
+ draft:
34624
+ type: boolean
34625
+ description: Whether the external link is draft and not live.
34626
+ condition:
34627
+ $ref: "#/components/schemas/Expression"
34628
+ required:
34629
+ - type
34630
+ - key
34631
+ - title
34632
+ - url
34256
34633
  GitSyncSiteStructureNode:
34257
34634
  description: |
34258
34635
  A single node in a Git Sync site structure tree — a section group, a
34259
- section, or a space, discriminated by `type`.
34636
+ section, a space, or an external link, discriminated by `type`.
34260
34637
  oneOf:
34261
34638
  - $ref: "#/components/schemas/GitSyncSiteStructureSectionGroup"
34262
34639
  - $ref: "#/components/schemas/GitSyncSiteStructureSection"
34263
34640
  - $ref: "#/components/schemas/GitSyncSiteStructureSpace"
34641
+ - $ref: "#/components/schemas/GitSyncSiteStructureExternalLink"
34264
34642
  GitSyncSiteStructure:
34265
34643
  type: array
34266
34644
  description: |
34267
34645
  Hierarchical structure of a site in a Git Sync YAML. Each entry is one of
34268
- three node types: a section group, a section, or a space.
34646
+ four node types: a section group, a section, a space, or an external link.
34269
34647
 
34270
34648
  A **space** is a leaf holding content, pointed at a repository directory. A
34271
34649
  **section** gathers spaces behind one top-level navigation entry. A
34272
- **section group** gathers sections. A site either uses sections or lists its
34273
- spaces at the top level, never both.
34650
+ **section group** gathers sections. An **external link** is a leaf that
34651
+ navigates away from the site to an absolute HTTP(S) URL — it may sit at the
34652
+ root or under a section group, but never inside a section, and only exists
34653
+ in a site that also has at least one section. A site either uses sections
34654
+ (optionally alongside external links) or lists its spaces at the top level,
34655
+ never both.
34274
34656
 
34275
34657
  ```yaml
34276
34658
  structure:
@@ -34333,8 +34715,12 @@ components:
34333
34715
  - A site declaring any section marks exactly one of those sections
34334
34716
  `default: true`, and lists no space at the top level: once a section
34335
34717
  exists, every space belongs inside one.
34336
- - Sections hold only spaces. Section groups hold only sections, or one
34337
- further level of section groups — nothing nests deeper than that.
34718
+ - Sections hold only spaces. Section groups hold only sections, nested
34719
+ section groups (one further level), or external links — nothing nests
34720
+ deeper than that.
34721
+ - External links are only valid at the root or nested in a section group,
34722
+ never inside a section. A site containing an external link must use
34723
+ sections, with at least one section declared.
34338
34724
  - Spaces pointed at the same `content.directory` declare the same
34339
34725
  `content.language`. One directory is read once, so it cannot produce two
34340
34726
  languages at the same time.
@@ -35919,6 +36305,17 @@ components:
35919
36305
  The ID of the change request the edits are made in. Absent when the space itself is the target, through its unlocked live edits.
35920
36306
  required:
35921
36307
  - spaceId
36308
+ AgentEditScope:
36309
+ type: string
36310
+ description: |
36311
+ Steering on how far an agent should reach when it changes content.
36312
+ Only `read-only` is a hard boundary: the editing tools are not given to the agent, so it cannot change content whatever it is asked. The other values are guidance the agent follows — they steer where the work belongs. Agents can still make small edits elsewhere when the change it was asked for would otherwise leave the documentation broken (e.g. an inbound link to a page it renamed).
36313
+ `all` sets no specific focus, which is the default. `read-only` reads, searches and comments without editing. `current-page` focuses on the page the user is on and its subpages. `modified-pages` focuses on the pages a change request has already touched.
36314
+ enum:
36315
+ - all
36316
+ - read-only
36317
+ - current-page
36318
+ - modified-pages
35922
36319
  AgentState:
35923
36320
  type: object
35924
36321
  properties:
@@ -35953,6 +36350,14 @@ components:
35953
36350
  $ref: "#/components/schemas/AgentEditTarget"
35954
36351
  description: |
35955
36352
  Where the agent currently edits content. Absent until something is attached: the organization agent starts read-only, while a change request agent always edits the change request it belongs to.
36353
+ editScope:
36354
+ $ref: "#/components/schemas/AgentEditScope"
36355
+ description: |
36356
+ How far this conversation should reach when it changes content.
36357
+ consultOnly:
36358
+ type: boolean
36359
+ description: |
36360
+ Whether this conversation can only be read. Set on a transcript the agent produced on its own — an agent review — which is published for its requester to consult rather than to be continued: the client shows no composer and the agent refuses a message sent to it anyway.
35956
36361
  required:
35957
36362
  - status
35958
36363
  - suggestions