@gitbook/api 0.198.0 → 0.200.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
@@ -5865,6 +5865,12 @@ paths:
5865
5865
  schema:
5866
5866
  type: string
5867
5867
  description: If defined, only change requests linked to this site topic will be returned.
5868
+ - name: styleguideRun
5869
+ in: query
5870
+ required: false
5871
+ schema:
5872
+ type: string
5873
+ description: If defined, only change requests opened by this style guide check run will be returned.
5868
5874
  - name: finding
5869
5875
  in: query
5870
5876
  required: false
@@ -6848,6 +6854,104 @@ paths:
6848
6854
  application/json:
6849
6855
  schema:
6850
6856
  $ref: "#/components/schemas/OrganizationAgentInstructions"
6857
+ /orgs/{organizationId}/agent/conversations:
6858
+ get:
6859
+ operationId: listOrganizationAgentConversations
6860
+ summary: List AI agent conversations in an organization
6861
+ description: "Returns a paginated list of the calling user's AI agent conversations with the organization agent. Unlike change request conversations, these are not tied to a single change request: the agent works across the organization and only attaches a change request when it needs to edit content. A conversation belongs to the user who started it and is never visible to anyone else."
6862
+ x-gitbook-mcp: true
6863
+ tags:
6864
+ - organizations
6865
+ - agents
6866
+ security:
6867
+ - user: []
6868
+ - oauth:
6869
+ - organization:read
6870
+ parameters:
6871
+ - $ref: "#/components/parameters/organizationId"
6872
+ - $ref: "#/components/parameters/listPage"
6873
+ - $ref: "#/components/parameters/listLimit"
6874
+ responses:
6875
+ "200":
6876
+ description: A list of agent conversations
6877
+ content:
6878
+ application/json:
6879
+ schema:
6880
+ allOf:
6881
+ - $ref: "#/components/schemas/List"
6882
+ - type: object
6883
+ required:
6884
+ - items
6885
+ properties:
6886
+ items:
6887
+ type: array
6888
+ items:
6889
+ $ref: "#/components/schemas/AgentConversation"
6890
+ /orgs/{organizationId}/agent/conversations/{conversationId}:
6891
+ put:
6892
+ operationId: provisionOrganizationAgentConversation
6893
+ summary: Provision an AI agent conversation in an organization
6894
+ description: Prepares a conversation so the client can connect to it, giving the agent the credentials it acts with. Call this before opening a conversation; connecting to one that was never provisioned yields an agent whose tools all fail. The conversation itself is only recorded once the user sends a first message, so opening the agent and closing it again leaves nothing behind. Safe to call again to refresh an expiring session.
6895
+ tags:
6896
+ - organizations
6897
+ - agents
6898
+ security:
6899
+ - user: []
6900
+ parameters:
6901
+ - $ref: "#/components/parameters/organizationId"
6902
+ - $ref: "#/components/parameters/conversationId"
6903
+ responses:
6904
+ "204":
6905
+ description: The conversation is ready to be connected to.
6906
+ patch:
6907
+ operationId: updateOrganizationAgentConversation
6908
+ summary: Update an AI agent conversation in an organization
6909
+ description: Updates one of the calling user's conversations with the organization agent. Use this to rename it.
6910
+ x-gitbook-mcp: true
6911
+ tags:
6912
+ - organizations
6913
+ - agents
6914
+ security:
6915
+ - user: []
6916
+ - oauth:
6917
+ - organization:write
6918
+ parameters:
6919
+ - $ref: "#/components/parameters/organizationId"
6920
+ - $ref: "#/components/parameters/conversationId"
6921
+ requestBody:
6922
+ required: true
6923
+ content:
6924
+ application/json:
6925
+ schema:
6926
+ type: object
6927
+ required:
6928
+ - title
6929
+ properties:
6930
+ title:
6931
+ type: string
6932
+ description: The new title of the conversation.
6933
+ responses:
6934
+ "200":
6935
+ description: The updated conversation.
6936
+ content:
6937
+ application/json:
6938
+ schema:
6939
+ $ref: "#/components/schemas/AgentConversation"
6940
+ delete:
6941
+ operationId: deleteOrganizationAgentConversation
6942
+ summary: Delete an agent conversation in an organization
6943
+ description: Deletes one of the calling user's conversations with the organization agent, destroying the messages it holds. This cannot be undone.
6944
+ tags:
6945
+ - organizations
6946
+ - agents
6947
+ security:
6948
+ - user: []
6949
+ parameters:
6950
+ - $ref: "#/components/parameters/organizationId"
6951
+ - $ref: "#/components/parameters/conversationId"
6952
+ responses:
6953
+ "205":
6954
+ description: The conversation has been deleted.
6851
6955
  /orgs/{organizationId}/translations:
6852
6956
  get:
6853
6957
  operationId: listTranslations
@@ -9348,7 +9452,9 @@ paths:
9348
9452
  /orgs/{organizationId}/sites/{siteId}/findings:
9349
9453
  get:
9350
9454
  operationId: listSiteFindings
9351
- summary: List all site context findings
9455
+ summary: List documentation issues GitBook has found on a site
9456
+ 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.
9457
+ x-gitbook-mcp: true
9352
9458
  tags:
9353
9459
  - site-context
9354
9460
  security:
@@ -9437,7 +9543,9 @@ paths:
9437
9543
  /orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}:
9438
9544
  get:
9439
9545
  operationId: getSiteFindingById
9440
- summary: Get a site finding by ID
9546
+ summary: Get details of a single documentation issue
9547
+ 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.
9548
+ x-gitbook-mcp: true
9441
9549
  tags:
9442
9550
  - site-context
9443
9551
  security:
@@ -9457,7 +9565,9 @@ paths:
9457
9565
  $ref: "#/components/schemas/SiteFinding"
9458
9566
  patch:
9459
9567
  operationId: updateSiteFindingById
9460
- summary: Update a site finding
9568
+ summary: Resolve, dismiss, or reopen a documentation issue
9569
+ 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.
9570
+ x-gitbook-mcp: true
9461
9571
  tags:
9462
9572
  - site-context
9463
9573
  security:
@@ -9489,7 +9599,9 @@ paths:
9489
9599
  /orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/change-requests:
9490
9600
  get:
9491
9601
  operationId: listChangeRequestsForSiteFinding
9492
- summary: List change requests linked to a site finding
9602
+ summary: List content fixes already proposed for a documentation issue
9603
+ 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.
9604
+ x-gitbook-mcp: true
9493
9605
  tags:
9494
9606
  - site-context
9495
9607
  security:
@@ -9520,7 +9632,9 @@ paths:
9520
9632
  $ref: "#/components/schemas/ChangeRequest"
9521
9633
  post:
9522
9634
  operationId: triggerChangeRequestsForSiteFinding
9523
- summary: Process a site finding into change requests
9635
+ summary: Fix a documentation issue by generating a change request
9636
+ 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`."
9637
+ x-gitbook-mcp: true
9524
9638
  tags:
9525
9639
  - site-context
9526
9640
  security:
@@ -9537,7 +9651,9 @@ paths:
9537
9651
  /orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/pages:
9538
9652
  get:
9539
9653
  operationId: listPagesForSiteFinding
9540
- summary: List pages linked to a site finding
9654
+ summary: List the pages affected by a documentation issue
9655
+ 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`.
9656
+ x-gitbook-mcp: true
9541
9657
  tags:
9542
9658
  - site-context
9543
9659
  security:
@@ -9569,7 +9685,9 @@ paths:
9569
9685
  /orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/questions:
9570
9686
  get:
9571
9687
  operationId: listQuestionsForSiteFinding
9572
- summary: List questions linked to a site finding
9688
+ summary: List the Ask-AI questions evidencing a documentation issue
9689
+ 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.
9690
+ x-gitbook-mcp: true
9573
9691
  tags:
9574
9692
  - site-context
9575
9693
  security:
@@ -9601,7 +9719,9 @@ paths:
9601
9719
  /orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/records:
9602
9720
  get:
9603
9721
  operationId: listRecordsForSiteFinding
9604
- summary: List records linked to a site finding
9722
+ summary: List the source content evidencing a documentation issue
9723
+ 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.
9724
+ x-gitbook-mcp: true
9605
9725
  tags:
9606
9726
  - site-context
9607
9727
  security:
@@ -9633,8 +9753,9 @@ paths:
9633
9753
  /orgs/{organizationId}/sites/{siteId}/stats/findings:
9634
9754
  get:
9635
9755
  operationId: getSiteFindingStats
9636
- summary: Get aggregate statistics about the findings identified on a site
9637
- 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.
9756
+ summary: Get a summary of documentation issues found on a site
9757
+ 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.
9758
+ x-gitbook-mcp: true
9638
9759
  tags:
9639
9760
  - site-context
9640
9761
  security:
@@ -9960,7 +10081,9 @@ paths:
9960
10081
  /orgs/{organizationId}/sites/{siteId}/topics/{siteTopicId}/findings:
9961
10082
  delete:
9962
10083
  operationId: deleteSiteTopicFindings
9963
- summary: Delete all findings for a topic
10084
+ summary: Delete all documentation issues found under a topic
10085
+ 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.
10086
+ x-gitbook-mcp: true
9964
10087
  tags:
9965
10088
  - site-context
9966
10089
  security:
@@ -11360,6 +11483,89 @@ paths:
11360
11483
  $ref: "#/components/schemas/Space"
11361
11484
  "404":
11362
11485
  $ref: "#/components/responses/NotFoundError"
11486
+ /orgs/{organizationId}/sites/{siteId}/styleguide/runs:
11487
+ post:
11488
+ operationId: createSiteStyleguideRun
11489
+ summary: Start a style guide check run for a site
11490
+ 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."
11491
+ x-gitbook-mcp: true
11492
+ tags:
11493
+ - sites
11494
+ security:
11495
+ - user: []
11496
+ - oauth:
11497
+ - site:write
11498
+ parameters:
11499
+ - $ref: "#/components/parameters/organizationId"
11500
+ - $ref: "#/components/parameters/siteId"
11501
+ requestBody:
11502
+ required: true
11503
+ content:
11504
+ application/json:
11505
+ schema:
11506
+ type: object
11507
+ properties:
11508
+ spaces:
11509
+ type: array
11510
+ 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.
11511
+ items:
11512
+ type: string
11513
+ minItems: 1
11514
+ maxItems: 3
11515
+ required:
11516
+ - spaces
11517
+ responses:
11518
+ "201":
11519
+ description: Style guide check run started
11520
+ content:
11521
+ application/json:
11522
+ schema:
11523
+ type: object
11524
+ properties:
11525
+ run:
11526
+ $ref: "#/components/schemas/SiteStyleguideRun"
11527
+ changeRequests:
11528
+ type: array
11529
+ description: The change requests opened by the run, one per space that could be started.
11530
+ items:
11531
+ $ref: "#/components/schemas/ChangeRequest"
11532
+ required:
11533
+ - run
11534
+ - changeRequests
11535
+ "404":
11536
+ $ref: "#/components/responses/NotFoundError"
11537
+ get:
11538
+ operationId: listSiteStyleguideRuns
11539
+ summary: List the style guide check runs of a site
11540
+ 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.
11541
+ x-gitbook-mcp: true
11542
+ tags:
11543
+ - sites
11544
+ security:
11545
+ - user: []
11546
+ - oauth:
11547
+ - site:read
11548
+ parameters:
11549
+ - $ref: "#/components/parameters/organizationId"
11550
+ - $ref: "#/components/parameters/siteId"
11551
+ - $ref: "#/components/parameters/listPage"
11552
+ - $ref: "#/components/parameters/listLimit"
11553
+ responses:
11554
+ "200":
11555
+ description: OK
11556
+ content:
11557
+ application/json:
11558
+ schema:
11559
+ allOf:
11560
+ - $ref: "#/components/schemas/List"
11561
+ - type: object
11562
+ required:
11563
+ - items
11564
+ properties:
11565
+ items:
11566
+ type: array
11567
+ items:
11568
+ $ref: "#/components/schemas/SiteStyleguideRun"
11363
11569
  /orgs/{organizationId}/sites/{siteId}/insights/events:
11364
11570
  post:
11365
11571
  operationId: trackEventsInSiteById
@@ -11502,6 +11708,10 @@ paths:
11502
11708
  type: boolean
11503
11709
  default: false
11504
11710
  description: Whether the redirect is draft and not live.
11711
+ permanent:
11712
+ type: boolean
11713
+ default: false
11714
+ description: Whether the redirect is permanent for public live traffic.
11505
11715
  destination:
11506
11716
  $ref: "#/components/schemas/SiteRedirectInputDestination"
11507
11717
  required:
@@ -11572,6 +11782,9 @@ paths:
11572
11782
  type: boolean
11573
11783
  default: false
11574
11784
  description: Capture and append the wildcard-matched suffix to the destination URL.
11785
+ permanent:
11786
+ type: boolean
11787
+ description: Whether the redirect is permanent for public live traffic.
11575
11788
  destination:
11576
11789
  description: If set to null, the redirect matching the source+intent target will be deleted.
11577
11790
  oneOf:
@@ -11771,6 +11984,9 @@ paths:
11771
11984
  draft:
11772
11985
  type: boolean
11773
11986
  description: When true, it can be used to promote a draft redirect to live.
11987
+ permanent:
11988
+ type: boolean
11989
+ description: Whether the redirect is permanent for public live traffic.
11774
11990
  destination:
11775
11991
  $ref: "#/components/schemas/SiteRedirectDestination"
11776
11992
  responses:
@@ -15722,109 +15938,6 @@ components:
15722
15938
  - type
15723
15939
  - data
15724
15940
  - isVoid
15725
- DocumentBlockHint:
15726
- type: object
15727
- properties:
15728
- object:
15729
- type: string
15730
- enum:
15731
- - block
15732
- type:
15733
- type: string
15734
- enum:
15735
- - hint
15736
- key:
15737
- type: string
15738
- data:
15739
- type: object
15740
- properties:
15741
- style:
15742
- type: string
15743
- enum:
15744
- - info
15745
- - warning
15746
- - danger
15747
- - success
15748
- icon:
15749
- $ref: "#/components/schemas/Icon"
15750
- required:
15751
- - style
15752
- nodes:
15753
- type: array
15754
- items:
15755
- oneOf:
15756
- - $ref: "#/components/schemas/DocumentBlocksEssentials"
15757
- - $ref: "#/components/schemas/DocumentBlockEmbed"
15758
- - $ref: "#/components/schemas/DocumentBlockIntegration"
15759
- isVoid:
15760
- type: boolean
15761
- enum:
15762
- - false
15763
- required:
15764
- - object
15765
- - type
15766
- - data
15767
- - nodes
15768
- DocumentBlockQuote:
15769
- type: object
15770
- properties:
15771
- object:
15772
- type: string
15773
- enum:
15774
- - block
15775
- type:
15776
- type: string
15777
- enum:
15778
- - blockquote
15779
- key:
15780
- type: string
15781
- nodes:
15782
- type: array
15783
- items:
15784
- oneOf:
15785
- - $ref: "#/components/schemas/DocumentBlocksEssentials"
15786
- - $ref: "#/components/schemas/DocumentBlockQuote"
15787
- isVoid:
15788
- type: boolean
15789
- enum:
15790
- - false
15791
- data:
15792
- type: object
15793
- properties: {}
15794
- additionalProperties: false
15795
- required:
15796
- - object
15797
- - type
15798
- - nodes
15799
- DocumentBlockMath:
15800
- type: object
15801
- properties:
15802
- object:
15803
- type: string
15804
- enum:
15805
- - block
15806
- type:
15807
- type: string
15808
- enum:
15809
- - math
15810
- key:
15811
- type: string
15812
- data:
15813
- type: object
15814
- properties:
15815
- formula:
15816
- type: string
15817
- required:
15818
- - formula
15819
- isVoid:
15820
- type: boolean
15821
- enum:
15822
- - true
15823
- required:
15824
- - object
15825
- - type
15826
- - data
15827
- - isVoid
15828
15941
  DocumentTableViewGrid:
15829
15942
  type: object
15830
15943
  properties:
@@ -16116,6 +16229,36 @@ components:
16116
16229
  - $ref: "#/components/schemas/DocumentTableDefinitionSelect"
16117
16230
  - $ref: "#/components/schemas/DocumentTableDefinitionContentRef"
16118
16231
  - $ref: "#/components/schemas/DocumentTableDefinitionImage"
16232
+ DocumentTableCellSpan:
16233
+ description: Number of rows or columns covered by a table cell merge
16234
+ type: integer
16235
+ minimum: 1
16236
+ maximum: 50
16237
+ DocumentTableCellMerge:
16238
+ description: Positional table cell merge range. The anchor and spans are resolved against the current sorted record order and visible column order. The current document model applies only non-overlapping horizontal or vertical merges of adjacent Text or Number body cells; unsupported ranges are removed during normalization.
16239
+ type: object
16240
+ properties:
16241
+ anchor:
16242
+ type: object
16243
+ description: Cell at the top-left of the merged range
16244
+ properties:
16245
+ record:
16246
+ type: string
16247
+ description: ID of the anchor record
16248
+ column:
16249
+ type: string
16250
+ description: ID of the anchor column
16251
+ required:
16252
+ - record
16253
+ - column
16254
+ rowSpan:
16255
+ $ref: "#/components/schemas/DocumentTableCellSpan"
16256
+ colSpan:
16257
+ $ref: "#/components/schemas/DocumentTableCellSpan"
16258
+ required:
16259
+ - anchor
16260
+ - rowSpan
16261
+ - colSpan
16119
16262
  DocumentFragment:
16120
16263
  type: object
16121
16264
  properties:
@@ -16168,6 +16311,11 @@ components:
16168
16311
  type: object
16169
16312
  additionalProperties:
16170
16313
  $ref: "#/components/schemas/DocumentTableDefinition"
16314
+ cellMerges:
16315
+ type: array
16316
+ description: Positional table cell merge ranges. The current document model retains only non-overlapping horizontal or vertical merges between adjacent Text or Number body cells. Anchors and spans are resolved against the table's current sorted record order and visible column order.
16317
+ items:
16318
+ $ref: "#/components/schemas/DocumentTableCellMerge"
16171
16319
  fullWidth:
16172
16320
  type: boolean
16173
16321
  description: Whether to render the block as a full width one
@@ -16175,19 +16323,123 @@ components:
16175
16323
  type: boolean
16176
16324
  description: Whether to show the search bar on the table. When unset, search is shown automatically on grid tables once they have enough rows.
16177
16325
  required:
16178
- - view
16179
- - records
16180
- - definition
16181
- fragments:
16182
- type: array
16183
- items:
16184
- $ref: "#/components/schemas/DocumentFragment"
16326
+ - view
16327
+ - records
16328
+ - definition
16329
+ fragments:
16330
+ type: array
16331
+ items:
16332
+ $ref: "#/components/schemas/DocumentFragment"
16333
+ required:
16334
+ - object
16335
+ - type
16336
+ - data
16337
+ - isVoid
16338
+ - fragments
16339
+ DocumentBlockHint:
16340
+ type: object
16341
+ properties:
16342
+ object:
16343
+ type: string
16344
+ enum:
16345
+ - block
16346
+ type:
16347
+ type: string
16348
+ enum:
16349
+ - hint
16350
+ key:
16351
+ type: string
16352
+ data:
16353
+ type: object
16354
+ properties:
16355
+ style:
16356
+ type: string
16357
+ enum:
16358
+ - info
16359
+ - warning
16360
+ - danger
16361
+ - success
16362
+ icon:
16363
+ $ref: "#/components/schemas/Icon"
16364
+ required:
16365
+ - style
16366
+ nodes:
16367
+ type: array
16368
+ items:
16369
+ oneOf:
16370
+ - $ref: "#/components/schemas/DocumentBlocksEssentials"
16371
+ - $ref: "#/components/schemas/DocumentBlockEmbed"
16372
+ - $ref: "#/components/schemas/DocumentBlockIntegration"
16373
+ - $ref: "#/components/schemas/DocumentBlockTable"
16374
+ isVoid:
16375
+ type: boolean
16376
+ enum:
16377
+ - false
16378
+ required:
16379
+ - object
16380
+ - type
16381
+ - data
16382
+ - nodes
16383
+ DocumentBlockQuote:
16384
+ type: object
16385
+ properties:
16386
+ object:
16387
+ type: string
16388
+ enum:
16389
+ - block
16390
+ type:
16391
+ type: string
16392
+ enum:
16393
+ - blockquote
16394
+ key:
16395
+ type: string
16396
+ nodes:
16397
+ type: array
16398
+ items:
16399
+ oneOf:
16400
+ - $ref: "#/components/schemas/DocumentBlocksEssentials"
16401
+ - $ref: "#/components/schemas/DocumentBlockQuote"
16402
+ isVoid:
16403
+ type: boolean
16404
+ enum:
16405
+ - false
16406
+ data:
16407
+ type: object
16408
+ properties: {}
16409
+ additionalProperties: false
16410
+ required:
16411
+ - object
16412
+ - type
16413
+ - nodes
16414
+ DocumentBlockMath:
16415
+ type: object
16416
+ properties:
16417
+ object:
16418
+ type: string
16419
+ enum:
16420
+ - block
16421
+ type:
16422
+ type: string
16423
+ enum:
16424
+ - math
16425
+ key:
16426
+ type: string
16427
+ data:
16428
+ type: object
16429
+ properties:
16430
+ formula:
16431
+ type: string
16432
+ required:
16433
+ - formula
16434
+ isVoid:
16435
+ type: boolean
16436
+ enum:
16437
+ - true
16185
16438
  required:
16186
16439
  - object
16187
16440
  - type
16188
16441
  - data
16189
16442
  - isVoid
16190
- - fragments
16191
16443
  DocumentBlockListItem:
16192
16444
  type: object
16193
16445
  properties:
@@ -18605,6 +18857,23 @@ components:
18605
18857
  required:
18606
18858
  - site
18607
18859
  - topic
18860
+ styleguide:
18861
+ type: object
18862
+ description: Style guide check run that opened the change request, when it came from one.
18863
+ properties:
18864
+ site:
18865
+ type: string
18866
+ description: ID of the site the style guide belongs to.
18867
+ run:
18868
+ type: string
18869
+ description: ID of the style guide check run that opened the change request.
18870
+ changedPages:
18871
+ type: number
18872
+ description: |
18873
+ Number of pages the check changed, recorded when it finished. Absent while it is still running, or when it never completed.
18874
+ required:
18875
+ - site
18876
+ - run
18608
18877
  outdated:
18609
18878
  type: boolean
18610
18879
  description: If true, the change request is not up-to-date with latest changes in the main content.
@@ -19076,7 +19345,10 @@ components:
19076
19345
  description: The title of the conversation, generated from the first message. Absent until generated.
19077
19346
  shared:
19078
19347
  type: boolean
19079
- description: Whether the conversation is shared with everyone who has access to the change request, rather than only its creator. Conversations are shared by default; a private conversation is only ever visible to its creator and stays private for good.
19348
+ description: Whether the conversation is shared with everyone who has access to its context, rather than only its creator. Conversations are shared by default; a private conversation is only ever visible to its creator and stays private for good.
19349
+ changeRequest:
19350
+ type: string
19351
+ description: The change request the conversation is currently editing in. Only set for organization agent conversations, which start without one and attach a change request the first time the agent needs to change content. Absent for change request conversations, whose change request is the conversation's context.
19080
19352
  createdAt:
19081
19353
  $ref: "#/components/schemas/Timestamp"
19082
19354
  updatedAt:
@@ -21515,6 +21787,11 @@ components:
21515
21787
  additionalProperties:
21516
21788
  type: string
21517
21789
  description: Whitelisted search parameters from the visitor authentication request.
21790
+ cookies:
21791
+ type: object
21792
+ additionalProperties:
21793
+ type: string
21794
+ description: Whitelisted cookies from the visitor authentication request.
21518
21795
  action:
21519
21796
  type: string
21520
21797
  enum:
@@ -24002,6 +24279,119 @@ components:
24002
24279
  required:
24003
24280
  - removeMembers
24004
24281
  - updateSites
24282
+ BillingCancellationComment:
24283
+ type: string
24284
+ description: Free-text detail a user typed alongside their cancellation reason.
24285
+ minLength: 1
24286
+ maxLength: 500
24287
+ BillingCancellationFeedback:
24288
+ type: object
24289
+ description: |
24290
+ 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.
24291
+ oneOf:
24292
+ - type: object
24293
+ properties:
24294
+ reason:
24295
+ type: string
24296
+ enum:
24297
+ - not_satisfied_with_product
24298
+ reasonDetail:
24299
+ description: The feature that was not satisfactory
24300
+ type: string
24301
+ enum:
24302
+ - editor
24303
+ - gitsync
24304
+ - ai_features
24305
+ additionalProperties: false
24306
+ required:
24307
+ - reason
24308
+ - reasonDetail
24309
+ - type: object
24310
+ properties:
24311
+ reason:
24312
+ type: string
24313
+ enum:
24314
+ - not_satisfied_with_product
24315
+ reasonDetail:
24316
+ description: The feature that was not satisfactory
24317
+ type: string
24318
+ enum:
24319
+ - other
24320
+ reasonComment:
24321
+ $ref: "#/components/schemas/BillingCancellationComment"
24322
+ additionalProperties: false
24323
+ required:
24324
+ - reason
24325
+ - reasonDetail
24326
+ - reasonComment
24327
+ - type: object
24328
+ properties:
24329
+ reason:
24330
+ type: string
24331
+ enum:
24332
+ - will_vibe_code_our_own_app
24333
+ reasonDetail:
24334
+ description: The tool the organization is moving to
24335
+ type: string
24336
+ enum:
24337
+ - claude
24338
+ - codex
24339
+ - replit
24340
+ additionalProperties: false
24341
+ required:
24342
+ - reason
24343
+ - reasonDetail
24344
+ - type: object
24345
+ properties:
24346
+ reason:
24347
+ type: string
24348
+ enum:
24349
+ - will_vibe_code_our_own_app
24350
+ reasonDetail:
24351
+ description: The tool the organization is moving to
24352
+ type: string
24353
+ enum:
24354
+ - other
24355
+ reasonComment:
24356
+ $ref: "#/components/schemas/BillingCancellationComment"
24357
+ additionalProperties: false
24358
+ required:
24359
+ - reason
24360
+ - reasonDetail
24361
+ - reasonComment
24362
+ - type: object
24363
+ properties:
24364
+ reason:
24365
+ type: string
24366
+ enum:
24367
+ - found_better_alternative
24368
+ reasonComment:
24369
+ $ref: "#/components/schemas/BillingCancellationComment"
24370
+ additionalProperties: false
24371
+ required:
24372
+ - reason
24373
+ - reasonComment
24374
+ - type: object
24375
+ properties:
24376
+ reason:
24377
+ type: string
24378
+ enum:
24379
+ - company_shutdown
24380
+ additionalProperties: false
24381
+ required:
24382
+ - reason
24383
+ - type: object
24384
+ properties:
24385
+ reason:
24386
+ type: string
24387
+ enum:
24388
+ - other_reason
24389
+ reasonComment:
24390
+ $ref: "#/components/schemas/BillingCancellationComment"
24391
+ additionalProperties: false
24392
+ required:
24393
+ - reason
24394
+ - reasonComment
24005
24395
  BillingCoupon:
24006
24396
  type: string
24007
24397
  description: Coupon or promotion code to apply to billing operations.
@@ -24026,6 +24416,8 @@ components:
24026
24416
  reason:
24027
24417
  type: string
24028
24418
  description: Reason that triggered the billing upgrade
24419
+ cancellationFeedback:
24420
+ $ref: "#/components/schemas/BillingCancellationFeedback"
24029
24421
  coupon:
24030
24422
  $ref: "#/components/schemas/BillingCoupon"
24031
24423
  description: Coupon or promotion code to apply to the subscription
@@ -28947,6 +29339,10 @@ components:
28947
29339
  description: The base revision ID used to compare the page change in the current conversation.
28948
29340
  page:
28949
29341
  $ref: "#/components/schemas/ChangedRevisionPage"
29342
+ changeRequestId:
29343
+ type: string
29344
+ description: |
29345
+ The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits.
28950
29346
  required:
28951
29347
  - tool
28952
29348
  - spaceId
@@ -28967,6 +29363,10 @@ components:
28967
29363
  description: The base revision ID used to compare the page change in the current conversation.
28968
29364
  page:
28969
29365
  $ref: "#/components/schemas/ChangedRevisionPage"
29366
+ changeRequestId:
29367
+ type: string
29368
+ description: |
29369
+ The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits.
28970
29370
  required:
28971
29371
  - tool
28972
29372
  - spaceId
@@ -28987,6 +29387,10 @@ components:
28987
29387
  description: The base revision ID used to compare the page deletion in the current conversation.
28988
29388
  page:
28989
29389
  $ref: "#/components/schemas/ChangedRevisionPage"
29390
+ changeRequestId:
29391
+ type: string
29392
+ description: |
29393
+ The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits.
28990
29394
  required:
28991
29395
  - tool
28992
29396
  - spaceId
@@ -29007,6 +29411,10 @@ components:
29007
29411
  description: The base revision ID used to compare the page rename in the current conversation.
29008
29412
  page:
29009
29413
  $ref: "#/components/schemas/ChangedRevisionPage"
29414
+ changeRequestId:
29415
+ type: string
29416
+ description: |
29417
+ The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits.
29010
29418
  title:
29011
29419
  type: string
29012
29420
  description: The new title of the page.
@@ -29031,6 +29439,10 @@ components:
29031
29439
  description: The base revision ID used to compare the page move in the current conversation.
29032
29440
  page:
29033
29441
  $ref: "#/components/schemas/ChangedRevisionPage"
29442
+ changeRequestId:
29443
+ type: string
29444
+ description: |
29445
+ The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits.
29034
29446
  to:
29035
29447
  $ref: "#/components/schemas/ChangedRevisionPage"
29036
29448
  moveType:
@@ -29777,6 +30189,11 @@ components:
29777
30189
  $ref: "#/components/schemas/AIMessageTask"
29778
30190
  response:
29779
30191
  $ref: "#/components/schemas/AIMessageResponseMetadata"
30192
+ createdAt:
30193
+ type: string
30194
+ format: date-time
30195
+ description: |
30196
+ When the message was added to the conversation. Absent on messages recorded before this field existed.
29780
30197
  required:
29781
30198
  - id
29782
30199
  - role
@@ -30400,6 +30817,40 @@ components:
30400
30817
  - object
30401
30818
  - urls
30402
30819
  - $ref: "#/components/schemas/SiteAgentSettingsInput"
30820
+ SiteStyleguideRun:
30821
+ type: object
30822
+ 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."
30823
+ properties:
30824
+ object:
30825
+ type: string
30826
+ enum:
30827
+ - styleguide-run
30828
+ id:
30829
+ type: string
30830
+ description: The ID of the run
30831
+ site:
30832
+ type: string
30833
+ description: ID of the site the run belongs to
30834
+ styleguide:
30835
+ type: string
30836
+ description: ID of the style guide space the run checked against
30837
+ spaces:
30838
+ type: array
30839
+ 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.
30840
+ items:
30841
+ type: string
30842
+ createdAt:
30843
+ $ref: "#/components/schemas/Timestamp"
30844
+ createdBy:
30845
+ $ref: "#/components/schemas/User"
30846
+ required:
30847
+ - object
30848
+ - id
30849
+ - site
30850
+ - styleguide
30851
+ - spaces
30852
+ - createdAt
30853
+ - createdBy
30403
30854
  SiteInsightsEventSession:
30404
30855
  allOf:
30405
30856
  - $ref: "#/components/schemas/SiteInsightsSession"
@@ -30533,6 +30984,11 @@ components:
30533
30984
  - page_view
30534
30985
  required:
30535
30986
  - type
30987
+ SiteInsightsMarkdownSource:
30988
+ description: How a page's markdown was requested. `page-action` means a reader used the site's page-actions menu — its copy or view-as-markdown action — rather than a client fetching the URL directly.
30989
+ type: string
30990
+ enum:
30991
+ - page-action
30536
30992
  SiteInsightsEventPageMarkdownRequest:
30537
30993
  allOf:
30538
30994
  - $ref: "#/components/schemas/SiteInsightsEventBase"
@@ -30542,6 +30998,8 @@ components:
30542
30998
  type: string
30543
30999
  enum:
30544
31000
  - page_markdown_request
31001
+ markdownSource:
31002
+ $ref: "#/components/schemas/SiteInsightsMarkdownSource"
30545
31003
  required:
30546
31004
  - type
30547
31005
  SiteInsightsEventSearchOpen:
@@ -31153,6 +31611,14 @@ components:
31153
31611
  type: string
31154
31612
  enum:
31155
31613
  - eventPageNotFoundType
31614
+ - type: object
31615
+ required:
31616
+ - column
31617
+ properties:
31618
+ column:
31619
+ type: string
31620
+ enum:
31621
+ - eventMarkdownSource
31156
31622
  - type: object
31157
31623
  required:
31158
31624
  - column
@@ -31728,6 +32194,21 @@ components:
31728
32194
  oneOf:
31729
32195
  - type: "null"
31730
32196
  - $ref: "#/components/schemas/SiteInsightsPageNotFoundType"
32197
+ - type: object
32198
+ required:
32199
+ - column
32200
+ - values
32201
+ properties:
32202
+ column:
32203
+ type: string
32204
+ enum:
32205
+ - eventMarkdownSource
32206
+ values:
32207
+ type: array
32208
+ items:
32209
+ oneOf:
32210
+ - type: "null"
32211
+ - $ref: "#/components/schemas/SiteInsightsMarkdownSource"
31731
32212
  - type: object
31732
32213
  required:
31733
32214
  - column
@@ -32347,6 +32828,9 @@ components:
32347
32828
  captureWildcard:
32348
32829
  type: boolean
32349
32830
  description: Capture and append the wildcard-matched suffix to the destination URL.
32831
+ permanent:
32832
+ type: boolean
32833
+ 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.
32350
32834
  destination:
32351
32835
  $ref: "#/components/schemas/SiteRedirectDestination"
32352
32836
  createdAt:
@@ -32363,6 +32847,7 @@ components:
32363
32847
  - source
32364
32848
  - draft
32365
32849
  - captureWildcard
32850
+ - permanent
32366
32851
  - destination
32367
32852
  - createdAt
32368
32853
  SiteRedirectInputDestination:
@@ -33863,7 +34348,32 @@ components:
33863
34348
  - stage
33864
34349
  - startedAt
33865
34350
  - updatedAt
33866
- - spaces
34351
+ GitSyncRunOperation:
34352
+ type: string
34353
+ description: Operation performed by a durable Git Sync run.
34354
+ enum:
34355
+ - import
34356
+ - export
34357
+ - check
34358
+ - merge
34359
+ - recovery
34360
+ GitSyncRunState:
34361
+ type: string
34362
+ description: Lifecycle state of a durable Git Sync run.
34363
+ enum:
34364
+ - queued
34365
+ - running
34366
+ - success
34367
+ - failure
34368
+ - timeout
34369
+ - cancelled
34370
+ GitProviderChangeState:
34371
+ type: string
34372
+ description: Lifecycle state of a pull or merge request on the Git provider.
34373
+ enum:
34374
+ - open
34375
+ - closed
34376
+ - merged
33867
34377
  GitSyncSiteStructureSectionGroup:
33868
34378
  type: object
33869
34379
  additionalProperties: false
@@ -33896,11 +34406,12 @@ components:
33896
34406
  description: Whether the section group is draft and not live.
33897
34407
  children:
33898
34408
  type: array
33899
- description: Section or section group nodes nested under this group.
34409
+ description: Section, section group, or external link nodes nested under this group.
33900
34410
  items:
33901
34411
  oneOf:
33902
34412
  - $ref: "#/components/schemas/GitSyncSiteStructureSectionGroup"
33903
34413
  - $ref: "#/components/schemas/GitSyncSiteStructureSection"
34414
+ - $ref: "#/components/schemas/GitSyncSiteStructureExternalLink"
33904
34415
  required:
33905
34416
  - type
33906
34417
  - key
@@ -34032,24 +34543,85 @@ components:
34032
34543
  - key
34033
34544
  - title
34034
34545
  - path
34546
+ SiteExternalLinkTitle:
34547
+ type: string
34548
+ description: Title of the external link
34549
+ minLength: 2
34550
+ maxLength: 128
34551
+ SiteExternalLinkDescription:
34552
+ type: string
34553
+ description: Description of the external link
34554
+ minLength: 0
34555
+ maxLength: 256
34556
+ GitSyncSiteStructureExternalLink:
34557
+ type: object
34558
+ additionalProperties: false
34559
+ description: |
34560
+ An external link — a leaf that navigates away from the site to an absolute
34561
+ HTTP(S) URL. Discriminated by `type: external-link`.
34562
+
34563
+ An external link only exists in a section-based site structure: it may sit
34564
+ at the root alongside sections and section groups, or nested under a
34565
+ section group, but never inside a section.
34566
+ properties:
34567
+ type:
34568
+ type: string
34569
+ enum:
34570
+ - external-link
34571
+ description: Discriminator for an external link node.
34572
+ key:
34573
+ type: string
34574
+ description: |
34575
+ Stable identifier for this external link, used as the Git Sync key.
34576
+ Must be unique amongst all other nodes of the site. For example:
34577
+ `link-status` or `link-1`.
34578
+ minLength: 1
34579
+ title:
34580
+ $ref: "#/components/schemas/SiteExternalLinkTitle"
34581
+ localizedTitle:
34582
+ $ref: "#/components/schemas/LocalizedString128"
34583
+ description:
34584
+ $ref: "#/components/schemas/SiteExternalLinkDescription"
34585
+ localizedDescription:
34586
+ $ref: "#/components/schemas/LocalizedString256"
34587
+ icon:
34588
+ $ref: "#/components/schemas/Icon"
34589
+ url:
34590
+ $ref: "#/components/schemas/URL"
34591
+ description: Absolute HTTP or HTTPS URL opened by the external link.
34592
+ draft:
34593
+ type: boolean
34594
+ description: Whether the external link is draft and not live.
34595
+ condition:
34596
+ $ref: "#/components/schemas/Expression"
34597
+ required:
34598
+ - type
34599
+ - key
34600
+ - title
34601
+ - url
34035
34602
  GitSyncSiteStructureNode:
34036
34603
  description: |
34037
34604
  A single node in a Git Sync site structure tree — a section group, a
34038
- section, or a space, discriminated by `type`.
34605
+ section, a space, or an external link, discriminated by `type`.
34039
34606
  oneOf:
34040
34607
  - $ref: "#/components/schemas/GitSyncSiteStructureSectionGroup"
34041
34608
  - $ref: "#/components/schemas/GitSyncSiteStructureSection"
34042
34609
  - $ref: "#/components/schemas/GitSyncSiteStructureSpace"
34610
+ - $ref: "#/components/schemas/GitSyncSiteStructureExternalLink"
34043
34611
  GitSyncSiteStructure:
34044
34612
  type: array
34045
34613
  description: |
34046
34614
  Hierarchical structure of a site in a Git Sync YAML. Each entry is one of
34047
- three node types: a section group, a section, or a space.
34615
+ four node types: a section group, a section, a space, or an external link.
34048
34616
 
34049
34617
  A **space** is a leaf holding content, pointed at a repository directory. A
34050
34618
  **section** gathers spaces behind one top-level navigation entry. A
34051
- **section group** gathers sections. A site either uses sections or lists its
34052
- spaces at the top level, never both.
34619
+ **section group** gathers sections. An **external link** is a leaf that
34620
+ navigates away from the site to an absolute HTTP(S) URL — it may sit at the
34621
+ root or under a section group, but never inside a section, and only exists
34622
+ in a site that also has at least one section. A site either uses sections
34623
+ (optionally alongside external links) or lists its spaces at the top level,
34624
+ never both.
34053
34625
 
34054
34626
  ```yaml
34055
34627
  structure:
@@ -34112,8 +34684,12 @@ components:
34112
34684
  - A site declaring any section marks exactly one of those sections
34113
34685
  `default: true`, and lists no space at the top level: once a section
34114
34686
  exists, every space belongs inside one.
34115
- - Sections hold only spaces. Section groups hold only sections, or one
34116
- further level of section groups — nothing nests deeper than that.
34687
+ - Sections hold only spaces. Section groups hold only sections, nested
34688
+ section groups (one further level), or external links — nothing nests
34689
+ deeper than that.
34690
+ - External links are only valid at the root or nested in a section group,
34691
+ never inside a section. A site containing an external link must use
34692
+ sections, with at least one section declared.
34117
34693
  - Spaces pointed at the same `content.directory` declare the same
34118
34694
  `content.language`. One directory is read once, so it cannot produce two
34119
34695
  languages at the same time.
@@ -35611,6 +36187,24 @@ components:
35611
36187
  - idle
35612
36188
  - processing
35613
36189
  - errored
36190
+ AgentQueuedMessage:
36191
+ type: object
36192
+ description: |
36193
+ A message waiting for the agent's current response to finish, held in the order it will be processed. The identifier addresses the entry to remove it from the queue or run it immediately.
36194
+ properties:
36195
+ id:
36196
+ type: string
36197
+ description: Identifier of the queue entry, unique within the conversation.
36198
+ message:
36199
+ $ref: "#/components/schemas/AIMessageInput"
36200
+ queuedAt:
36201
+ type: string
36202
+ format: date-time
36203
+ description: When the message entered the queue.
36204
+ required:
36205
+ - id
36206
+ - message
36207
+ - queuedAt
35614
36208
  AgentActivity:
35615
36209
  type: object
35616
36210
  description: |
@@ -35628,6 +36222,10 @@ components:
35628
36222
  type: string
35629
36223
  description: |
35630
36224
  When `type` is `tool`, the name of the tool being called (matches `AIToolCall.tool`).
36225
+ label:
36226
+ type: string
36227
+ description: |
36228
+ What to show the user instead of a label derived from `tool`, for a tool whose name means nothing to them — an MCP server's, say, where it reads "Searching documentation".
35631
36229
  required:
35632
36230
  - type
35633
36231
  AgentQuestionOption:
@@ -35662,6 +36260,31 @@ components:
35662
36260
  - toolCallId
35663
36261
  - question
35664
36262
  - options
36263
+ AgentEditTarget:
36264
+ type: object
36265
+ description: |
36266
+ Where the agent's content edits land. Usually a change request, which is how published content is changed; a space whose live edits are unlocked is the exception, and is edited in place. Carries identifiers only: the client resolves the change request's number and subject, or the space's title, through the API.
36267
+ properties:
36268
+ spaceId:
36269
+ type: string
36270
+ description: The ID of the space the edits are made in.
36271
+ changeRequestId:
36272
+ type: string
36273
+ description: |
36274
+ The ID of the change request the edits are made in. Absent when the space itself is the target, through its unlocked live edits.
36275
+ required:
36276
+ - spaceId
36277
+ AgentEditScope:
36278
+ type: string
36279
+ description: |
36280
+ Steering on how far an agent should reach when it changes content.
36281
+ 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).
36282
+ `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.
36283
+ enum:
36284
+ - all
36285
+ - read-only
36286
+ - current-page
36287
+ - modified-pages
35665
36288
  AgentState:
35666
36289
  type: object
35667
36290
  properties:
@@ -35674,9 +36297,16 @@ components:
35674
36297
  type: string
35675
36298
  queuedMessages:
35676
36299
  type: array
35677
- description: List of messages sent by the users queued to processed.
36300
+ description: |
36301
+ List of messages sent by the users queued to processed. Superseded by `queue`, which carries the same messages with the identifiers needed to act on them; kept for compatibility with clients that predate it.
35678
36302
  items:
35679
36303
  $ref: "#/components/schemas/AIMessageInput"
36304
+ queue:
36305
+ type: array
36306
+ description: |
36307
+ Messages waiting for the current response to finish, in the order they will be processed.
36308
+ items:
36309
+ $ref: "#/components/schemas/AgentQueuedMessage"
35680
36310
  activity:
35681
36311
  $ref: "#/components/schemas/AgentActivity"
35682
36312
  description: |
@@ -35685,6 +36315,18 @@ components:
35685
36315
  $ref: "#/components/schemas/AgentPendingQuestion"
35686
36316
  description: |
35687
36317
  A question the agent is waiting for the user to answer. While set, the client replaces the prompt with a choice control.
36318
+ editTarget:
36319
+ $ref: "#/components/schemas/AgentEditTarget"
36320
+ description: |
36321
+ 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.
36322
+ editScope:
36323
+ $ref: "#/components/schemas/AgentEditScope"
36324
+ description: |
36325
+ How far this conversation should reach when it changes content.
36326
+ consultOnly:
36327
+ type: boolean
36328
+ description: |
36329
+ 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.
35688
36330
  required:
35689
36331
  - status
35690
36332
  - suggestions