@gitbook/api 0.124.0 → 0.126.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
@@ -45,10 +45,10 @@ tags:
45
45
  Use this API to create and revoke invitations for new members. By automating invite flows, you can maintain a cohesive onboarding experience for collaborators and speed up team expansion.
46
46
  - name: organization-ask
47
47
  x-page-title: Organization AI ask
48
- x-page-description: Unlock AI-driven answers for your organization’s content and data.
48
+ x-page-description: Unlock AI-driven answers for your organization's content and data.
49
49
  x-parent: organizations
50
50
  description: |
51
- Enhance your team’s knowledge base with the Organization AI ask endpoint, which allows you to query AI models trained on your organization’s GitBook content for quick, intelligent responses.
51
+ Enhance your team's knowledge base with the Organization AI ask endpoint, which allows you to query AI models trained on your organization's GitBook content for quick, intelligent responses.
52
52
  - name: sites
53
53
  x-page-icon: globe
54
54
  x-page-title: Docs sites
@@ -94,13 +94,13 @@ tags:
94
94
  x-page-description: Fetch an up-to-date preview of your site before publishing.
95
95
  x-parent: sites
96
96
  description: |
97
- Quickly generate a preview of how your site’s content and layout will appear once published, allowing for final checks and refinement prior to going live.
97
+ Quickly generate a preview of how your site's content and layout will appear once published, allowing for final checks and refinement prior to going live.
98
98
  - name: site-customization
99
99
  x-page-title: Site customization
100
100
  x-page-description: Customize the look and feel of your docs site.
101
101
  x-parent: sites
102
102
  description: |
103
- Update your site’s branding, styling, and layout to match your organization’s identity. This includes theming elements like color palette, logos, and more.
103
+ Update your site's branding, styling, and layout to match your organization's identity. This includes theming elements like color palette, logos, and more.
104
104
 
105
105
  {% openapi-schemas spec="gitbook" schemas="SiteCustomizationSettings" grouped="false" %}
106
106
  The SiteCustomizationSettings object
@@ -110,7 +110,7 @@ tags:
110
110
  x-page-description: Control which spaces are linked and displayed in a docs site.
111
111
  x-parent: sites
112
112
  description: |
113
- Associate or dissociate your organization’s spaces to keep your content organized. This is particularly useful for larger organizations with numerous spaces.
113
+ Associate or dissociate your organization's spaces to keep your content organized. This is particularly useful for larger organizations with numerous spaces.
114
114
 
115
115
  {% openapi-schemas spec="gitbook" schemas="SiteSpace" grouped="false" %}
116
116
  The SiteSpace object
@@ -120,7 +120,7 @@ tags:
120
120
  x-page-description: Create and organize high-level sections for your docs site.
121
121
  x-parent: sites
122
122
  description: |
123
- Sections help partition your site’s content at the top level. They can be modified, deleted, or reorganized to reflect your site’s changing structure.
123
+ Sections help partition your site's content at the top level. They can be modified, deleted, or reorganized to reflect your site's changing structure.
124
124
 
125
125
  {% openapi-schemas spec="gitbook" schemas="SiteSection" grouped="false" %}
126
126
  The SiteSection object
@@ -140,17 +140,27 @@ tags:
140
140
  x-page-description: Establish redirects for pages that have moved or changed in your docs site.
141
141
  x-parent: sites
142
142
  description: |
143
- Keep your site’s content fresh without breaking old links. This API allows you to create and manage redirection rules.
143
+ Keep your site's content fresh without breaking old links. This API allows you to create and manage redirection rules.
144
144
 
145
145
  {% openapi-schemas spec="gitbook" schemas="SiteRedirect" grouped="false" %}
146
146
  The SiteRedirect object
147
147
  {% endopenapi-schemas %}
148
+ - name: site-mcp-servers
149
+ x-page-title: Site MCP servers
150
+ x-page-description: Configure external MCP servers used by your site.
151
+ x-parent: sites
152
+ description: |
153
+ Manage Model Context Protocol (Mcp) servers used by your site.
154
+
155
+ {% openapi-schemas spec="gitbook" schemas="SiteMcpServer" grouped="false" %}
156
+ The SiteMcpServer object
157
+ {% endopenapi-schemas %}
148
158
  - name: site-ads
149
159
  x-page-title: Site ads
150
160
  x-page-description: Control and customize ad placements on your docs site.
151
161
  x-parent: sites
152
162
  description: |
153
- Manage the advertisement strategy within your docs. You can specify ad placements, track usage, and adjust settings to best fit your organization’s needs.
163
+ Manage the advertisement strategy within your docs. You can specify ad placements, track usage, and adjust settings to best fit your organization's needs.
154
164
  - name: site-users
155
165
  x-page-title: Site users
156
166
  x-page-description: Manage which users can access or contribute to a docs site.
@@ -168,7 +178,7 @@ tags:
168
178
  x-page-description: Allow AI-driven queries within a specific docs site.
169
179
  x-parent: sites
170
180
  description: |
171
- Give your users a way to ask content-aware AI queries that are scoped entirely to the site’s published documents.
181
+ Give your users a way to ask content-aware AI queries that are scoped entirely to the site's published documents.
172
182
  - name: collections
173
183
  x-page-icon: folder
174
184
  x-page-title: Collections
@@ -184,7 +194,7 @@ tags:
184
194
  x-page-description: Handle permissions and user management for a specific collection.
185
195
  x-parent: collections
186
196
  description: |
187
- Control which users have access to a collection’s spaces. This ensures only the right individuals can view or modify sensitive content.
197
+ Control which users have access to a collection's spaces. This ensures only the right individuals can view or modify sensitive content.
188
198
  - name: collection-teams
189
199
  x-page-title: Collection teams
190
200
  x-page-description: Allocate team-based permissions to your collections.
@@ -265,7 +275,7 @@ tags:
265
275
  Retrieve or update the pages and files tied to an open change request. This lets you preview alterations and merge them when ready.
266
276
  - name: change-request-contributors
267
277
  x-page-title: Change request contributors
268
- x-page-description: See who’s participating in the change request.
278
+ x-page-description: See who's participating in the change request.
269
279
  x-parent: change-requests
270
280
  description: |
271
281
  Quickly access the full list of collaborators and their contributions within a change request for better traceability and communication.
@@ -296,7 +306,7 @@ tags:
296
306
  - name: analytics
297
307
  x-page-icon: chart-line
298
308
  x-page-title: Analytics
299
- x-page-description: Tap into metrics that reveal your content’s performance and usage patterns.
309
+ x-page-description: Tap into metrics that reveal your content's performance and usage patterns.
300
310
  description: |
301
311
  Gather data-driven insights on how users interact with your spaces, pages, or entire site. Analytics can highlight trends and guide future content improvements.
302
312
  - name: translations
@@ -426,7 +436,7 @@ tags:
426
436
  - name: sso
427
437
  x-page-icon: lock
428
438
  x-page-title: SSO
429
- x-page-description: Configure Single Sign-On solutions to unify your organization’s authentication.
439
+ x-page-description: Configure Single Sign-On solutions to unify your organization's authentication.
430
440
  description: |
431
441
  Tie GitBook into your corporate identity management and authentication providers (like SAML or OAuth). This centralizes user authentication and improves security.
432
442
 
@@ -438,7 +448,7 @@ tags:
438
448
  x-page-title: Storage
439
449
  x-page-description: Upload and store files directly within your GitBook organization.
440
450
  description: |
441
- Whether you’re hosting images, documents, or other assets, Storage endpoints allow you to integrate those files into your documentation and spaces seamlessly.
451
+ Whether you're hosting images, documents, or other assets, Storage endpoints allow you to integrate those files into your documentation and spaces seamlessly.
442
452
  - name: custom-hostnames
443
453
  x-page-icon: server
444
454
  x-page-title: Custom hostnames
@@ -454,7 +464,7 @@ tags:
454
464
  x-page-title: System info
455
465
  x-page-description: Programmatically check GitBook API system status and version details.
456
466
  description: |
457
- Use these endpoints to monitor the overall health of GitBook’s infrastructure or to retrieve version information for debugging and compliance purposes.
467
+ Use these endpoints to monitor the overall health of GitBook's infrastructure or to retrieve version information for debugging and compliance purposes.
458
468
  paths:
459
469
  /:
460
470
  get:
@@ -638,6 +648,8 @@ paths:
638
648
  parameters:
639
649
  - $ref: "#/components/parameters/spaceId"
640
650
  responses:
651
+ "204":
652
+ description: Space did not exist
641
653
  "205":
642
654
  description: Space has been deleted
643
655
  "/spaces/{spaceId}/duplicate":
@@ -936,14 +948,13 @@ paths:
936
948
  - $ref: "#/components/parameters/spaceId"
937
949
  - $ref: "#/components/parameters/teamId"
938
950
  responses:
951
+ "204":
952
+ description: The team was not found in the space
939
953
  "205":
940
954
  description: The team has been removed from the space
941
955
  "400":
942
956
  description: Team does not have access to space
943
957
  $ref: "#/components/responses/BadRequestError"
944
- "404":
945
- description: No team found with the given ID
946
- $ref: "#/components/responses/NotFoundError"
947
958
  "/spaces/{spaceId}/permissions/users":
948
959
  get:
949
960
  operationId: listUserPermissionsInSpace
@@ -1012,11 +1023,10 @@ paths:
1012
1023
  - $ref: "#/components/parameters/spaceId"
1013
1024
  - $ref: "#/components/parameters/userId"
1014
1025
  responses:
1026
+ "204":
1027
+ description: The user was not found in the space
1015
1028
  "205":
1016
1029
  description: The user has been removed from the space
1017
- "404":
1018
- description: No user found with the given ID
1019
- $ref: "#/components/responses/NotFoundError"
1020
1030
  "/spaces/{spaceId}/permissions/teams":
1021
1031
  get:
1022
1032
  operationId: listTeamPermissionsInSpace
@@ -1812,11 +1822,10 @@ paths:
1812
1822
  - $ref: "#/components/parameters/changeRequestId"
1813
1823
  - $ref: "#/components/parameters/userId"
1814
1824
  responses:
1825
+ "204":
1826
+ description: Reviewer was not found
1815
1827
  "205":
1816
1828
  description: The reviewer has been removed from the change request
1817
- "404":
1818
- description: The reviewer could not be found
1819
- $ref: "#/components/responses/NotFoundError"
1820
1829
  "/spaces/{spaceId}/change-requests/{changeRequestId}/links":
1821
1830
  get:
1822
1831
  operationId: listChangeRequestLinks
@@ -1956,6 +1965,8 @@ paths:
1956
1965
  - $ref: "#/components/parameters/changeRequestId"
1957
1966
  - $ref: "#/components/parameters/commentId"
1958
1967
  responses:
1968
+ "204":
1969
+ description: Comment did not exist.
1959
1970
  "205":
1960
1971
  description: The comment has been deleted.
1961
1972
  put:
@@ -2097,6 +2108,8 @@ paths:
2097
2108
  - $ref: "#/components/parameters/commentId"
2098
2109
  - $ref: "#/components/parameters/commentReplyId"
2099
2110
  responses:
2111
+ "204":
2112
+ description: Comment reply did not exist.
2100
2113
  "205":
2101
2114
  description: The comment has been deleted.
2102
2115
  "/spaces/{spaceId}/change-requests/{changeRequestId}/contributors":
@@ -2450,6 +2463,34 @@ paths:
2450
2463
  application/json:
2451
2464
  schema:
2452
2465
  $ref: "#/components/schemas/RevisionReusableContent"
2466
+ "/spaces/{spaceId}/change-requests/{changeRequestId}/changes":
2467
+ get:
2468
+ operationId: getChangeRequestChanges
2469
+ summary: Get change request semantic changes
2470
+ description: Return the semantic changes between a change request and its base revision.
2471
+ tags:
2472
+ - change-request-content
2473
+ security:
2474
+ - user: []
2475
+ parameters:
2476
+ - $ref: "#/components/parameters/spaceId"
2477
+ - $ref: "#/components/parameters/changeRequestId"
2478
+ - name: limit
2479
+ in: query
2480
+ description: Limit the number of changes returned
2481
+ schema:
2482
+ type: number
2483
+ default: 10
2484
+ responses:
2485
+ "200":
2486
+ description: OK
2487
+ content:
2488
+ application/json:
2489
+ schema:
2490
+ $ref: "#/components/schemas/RevisionSemanticChanges"
2491
+ "404":
2492
+ description: The change request could not be found.
2493
+ $ref: "#/components/responses/NotFoundError"
2453
2494
  "/spaces/{spaceId}/change-requests/{changeRequestId}/pdf":
2454
2495
  get:
2455
2496
  operationId: getChangeRequestPDF
@@ -2785,6 +2826,8 @@ paths:
2785
2826
  - $ref: "#/components/parameters/spaceId"
2786
2827
  - $ref: "#/components/parameters/commentId"
2787
2828
  responses:
2829
+ "204":
2830
+ description: Comment did not exist.
2788
2831
  "205":
2789
2832
  description: The comment has been deleted.
2790
2833
  put:
@@ -2919,6 +2962,8 @@ paths:
2919
2962
  - $ref: "#/components/parameters/commentId"
2920
2963
  - $ref: "#/components/parameters/commentReplyId"
2921
2964
  responses:
2965
+ "204":
2966
+ description: Comment reply did not exist.
2922
2967
  "205":
2923
2968
  description: The comment has been deleted.
2924
2969
  "/spaces/{spaceId}/commenters":
@@ -3209,6 +3254,8 @@ paths:
3209
3254
  parameters:
3210
3255
  - $ref: "#/components/parameters/collectionId"
3211
3256
  responses:
3257
+ "204":
3258
+ description: Collection did not exist
3212
3259
  "205":
3213
3260
  description: Collection has been deleted
3214
3261
  "/collections/{collectionId}/spaces":
@@ -3414,11 +3461,10 @@ paths:
3414
3461
  - $ref: "#/components/parameters/collectionId"
3415
3462
  - $ref: "#/components/parameters/teamId"
3416
3463
  responses:
3464
+ "204":
3465
+ description: The team was not found in the collection
3417
3466
  "205":
3418
3467
  description: The team has been removed from the collection
3419
- "404":
3420
- description: No team found with the given ID
3421
- $ref: "#/components/responses/NotFoundError"
3422
3468
  "/collections/{collectionId}/permissions/users":
3423
3469
  get:
3424
3470
  operationId: listUserPermissionsInCollection
@@ -3487,11 +3533,10 @@ paths:
3487
3533
  - $ref: "#/components/parameters/collectionId"
3488
3534
  - $ref: "#/components/parameters/userId"
3489
3535
  responses:
3536
+ "204":
3537
+ description: The user was not found in the collection
3490
3538
  "205":
3491
3539
  description: The user has been removed from the collection
3492
- "404":
3493
- description: No user found with the given ID
3494
- $ref: "#/components/responses/NotFoundError"
3495
3540
  "/collections/{collectionId}/permissions/aggregate":
3496
3541
  get:
3497
3542
  operationId: listPermissionsAggregateInCollection
@@ -3612,6 +3657,8 @@ paths:
3612
3657
  - $ref: "#/components/parameters/integrationName"
3613
3658
  responses:
3614
3659
  "204":
3660
+ description: Integration did not exist
3661
+ "205":
3615
3662
  description: Integration has been deleted
3616
3663
  "/integrations/{integrationName}/installations":
3617
3664
  get:
@@ -3986,9 +4033,9 @@ paths:
3986
4033
  - $ref: "#/components/parameters/installationId"
3987
4034
  responses:
3988
4035
  "204":
4036
+ description: Integration installation did not exist
4037
+ "205":
3989
4038
  description: Integration uninstalled successfully
3990
- "404":
3991
- $ref: "#/components/responses/NotFoundError"
3992
4039
  "/integrations/{integrationName}/installations/{installationId}/tokens":
3993
4040
  post:
3994
4041
  operationId: createIntegrationInstallationToken
@@ -4147,6 +4194,8 @@ paths:
4147
4194
  - $ref: "#/components/parameters/spaceId"
4148
4195
  responses:
4149
4196
  "204":
4197
+ description: The space installation did not exist.
4198
+ "205":
4150
4199
  description: The space installation has been deleted.
4151
4200
  "/integrations/{integrationName}/installations/{installationId}/sites":
4152
4201
  get:
@@ -4285,6 +4334,8 @@ paths:
4285
4334
  - $ref: "#/components/parameters/siteId"
4286
4335
  responses:
4287
4336
  "204":
4337
+ description: The site installation did not exist.
4338
+ "205":
4288
4339
  description: The site installation has been deleted.
4289
4340
  /orgs:
4290
4341
  get:
@@ -4496,6 +4547,8 @@ paths:
4496
4547
  - $ref: "#/components/parameters/userId"
4497
4548
  responses:
4498
4549
  "204":
4550
+ description: Member did not exist in the organization.
4551
+ "205":
4499
4552
  description: The member was deleted from the organization.
4500
4553
  "/orgs/{organizationId}/ping":
4501
4554
  post:
@@ -4736,6 +4789,8 @@ paths:
4736
4789
  - $ref: "#/components/parameters/teamId"
4737
4790
  responses:
4738
4791
  "204":
4792
+ description: The team did not exist in the organization.
4793
+ "205":
4739
4794
  description: The team was deleted from the organization.
4740
4795
  "/orgs/{organizationId}/teams/{teamId}/members":
4741
4796
  put:
@@ -4829,6 +4884,8 @@ paths:
4829
4884
  - $ref: "#/components/parameters/userId"
4830
4885
  responses:
4831
4886
  "204":
4887
+ description: Member was not part of the team
4888
+ "205":
4832
4889
  description: Member has been deleted from the team
4833
4890
  "/orgs/{organizationId}/invites":
4834
4891
  post:
@@ -5007,6 +5064,8 @@ paths:
5007
5064
  - $ref: "#/components/parameters/organizationId"
5008
5065
  - $ref: "#/components/parameters/inviteId"
5009
5066
  responses:
5067
+ "204":
5068
+ description: Organization invite did not exist
5010
5069
  "205":
5011
5070
  description: The organization invite has been deleted
5012
5071
  "/orgs/{organizationId}/search":
@@ -5434,6 +5493,8 @@ paths:
5434
5493
  - $ref: "#/components/parameters/samlProviderId"
5435
5494
  responses:
5436
5495
  "204":
5496
+ description: SAML provider did not exist
5497
+ "205":
5437
5498
  description: SAML provider has been deleted
5438
5499
  "/orgs/{organizationId}/sso":
5439
5500
  get:
@@ -5681,6 +5742,8 @@ paths:
5681
5742
  - $ref: "#/components/parameters/organizationId"
5682
5743
  - $ref: "#/components/parameters/openapiSpecSlug"
5683
5744
  responses:
5745
+ "204":
5746
+ description: Specification did not exist
5684
5747
  "205":
5685
5748
  description: OpenAPI specification has been deleted
5686
5749
  "/orgs/{organizationId}/openapi/{specSlug}/versions":
@@ -6172,6 +6235,8 @@ paths:
6172
6235
  - $ref: "#/components/parameters/organizationId"
6173
6236
  - $ref: "#/components/parameters/translationSettingsId"
6174
6237
  responses:
6238
+ "204":
6239
+ description: Translation settings did not exist
6175
6240
  "205":
6176
6241
  description: Translation settings has been deleted
6177
6242
  "/orgs/{organizationId}/translations/{translationSettingsId}/languages":
@@ -6280,11 +6345,10 @@ paths:
6280
6345
  - $ref: "#/components/parameters/translationSettingsId"
6281
6346
  - $ref: "#/components/parameters/translationLanguage"
6282
6347
  responses:
6348
+ "204":
6349
+ description: Translation language settings not found
6283
6350
  "205":
6284
6351
  description: Language successfully removed
6285
- "404":
6286
- description: No matching translation language settings found
6287
- $ref: "#/components/responses/NotFoundError"
6288
6352
  "/orgs/{organizationId}/storage/upload":
6289
6353
  post:
6290
6354
  operationId: generateStorageUploadURL
@@ -6481,10 +6545,9 @@ paths:
6481
6545
  - $ref: "#/components/parameters/fontId"
6482
6546
  responses:
6483
6547
  "204":
6484
- description: Custom font deleted successfully.
6485
- "404":
6486
6548
  description: Organization or font not found.
6487
- $ref: "#/components/responses/NotFoundError"
6549
+ "205":
6550
+ description: Custom font deleted successfully.
6488
6551
  "/orgs/{organizationId}/sites":
6489
6552
  get:
6490
6553
  operationId: listSites
@@ -6667,6 +6730,8 @@ paths:
6667
6730
  - $ref: "#/components/parameters/organizationId"
6668
6731
  - $ref: "#/components/parameters/siteId"
6669
6732
  responses:
6733
+ "204":
6734
+ description: Site did not exist
6670
6735
  "205":
6671
6736
  description: Site has been deleted
6672
6737
  "/orgs/{organizationId}/sites/{siteId}/adaptive-schema":
@@ -6926,6 +6991,8 @@ paths:
6926
6991
  - $ref: "#/components/parameters/siteId"
6927
6992
  - $ref: "#/components/parameters/shareLinkId"
6928
6993
  responses:
6994
+ "204":
6995
+ description: Site share link did not exist
6929
6996
  "205":
6930
6997
  description: Site share link has been deleted
6931
6998
  "/orgs/{organizationId}/sites/{siteId}/structure":
@@ -7386,6 +7453,8 @@ paths:
7386
7453
  - $ref: "#/components/parameters/siteId"
7387
7454
  - $ref: "#/components/parameters/siteSectionGroupId"
7388
7455
  responses:
7456
+ "204":
7457
+ description: Site section group did not exist
7389
7458
  "205":
7390
7459
  description: Site section group has been deleted
7391
7460
  "/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}/sections":
@@ -7438,6 +7507,8 @@ paths:
7438
7507
  - $ref: "#/components/parameters/siteSectionGroupId"
7439
7508
  - $ref: "#/components/parameters/siteSectionId"
7440
7509
  responses:
7510
+ "204":
7511
+ description: Section was not part of the group
7441
7512
  "205":
7442
7513
  description: Section has been removed from the section group
7443
7514
  "/orgs/{organizationId}/sites/{siteId}/sections":
@@ -7585,6 +7656,8 @@ paths:
7585
7656
  - $ref: "#/components/parameters/siteId"
7586
7657
  - $ref: "#/components/parameters/siteSectionId"
7587
7658
  responses:
7659
+ "204":
7660
+ description: Site section did not exist
7588
7661
  "205":
7589
7662
  description: Site section has been deleted
7590
7663
  "/orgs/{organizationId}/sites/{siteId}/search":
@@ -7787,6 +7860,8 @@ paths:
7787
7860
  - $ref: "#/components/parameters/siteId"
7788
7861
  - $ref: "#/components/parameters/siteSpaceId"
7789
7862
  responses:
7863
+ "204":
7864
+ description: Site space did not exist
7790
7865
  "205":
7791
7866
  description: Site space has been deleted
7792
7867
  "/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/customization":
@@ -8182,6 +8257,8 @@ paths:
8182
8257
  - $ref: "#/components/parameters/siteId"
8183
8258
  - $ref: "#/components/parameters/siteSpaceId"
8184
8259
  responses:
8260
+ "204":
8261
+ description: Customization settings did not exist
8185
8262
  "205":
8186
8263
  description: Site space customization removed
8187
8264
  "400":
@@ -8325,7 +8402,7 @@ paths:
8325
8402
  operationId: streamAIResponseInSite
8326
8403
  summary: Generate an AI response in a site
8327
8404
  description: |
8328
- Experimental operation to generate an AI response in a site.
8405
+ Generate an AI response in a conversation.
8329
8406
  tags:
8330
8407
  - sites
8331
8408
  x-internal: true
@@ -8339,27 +8416,44 @@ paths:
8339
8416
  content:
8340
8417
  application/json:
8341
8418
  schema:
8342
- type: object
8343
- required:
8344
- - input
8345
- - output
8346
- properties:
8347
- previousResponseId:
8348
- type: string
8349
- description: The ID of the previous response to continue from
8350
- instructions:
8351
- type: string
8352
- description: Instructions for the AI
8353
- input:
8354
- type: array
8355
- items:
8356
- $ref: "#/components/schemas/AIMessageInput"
8357
- output:
8358
- $ref: "#/components/schemas/AIOutputFormat"
8359
- model:
8360
- $ref: "#/components/schemas/AIModel"
8361
- tools:
8362
- $ref: "#/components/schemas/AIToolCapabilities"
8419
+ allOf:
8420
+ - type: object
8421
+ required:
8422
+ - input
8423
+ - output
8424
+ properties:
8425
+ previousResponseId:
8426
+ type: string
8427
+ description: The ID of the previous response to continue from
8428
+ input:
8429
+ type: array
8430
+ items:
8431
+ $ref: "#/components/schemas/AIMessageInput"
8432
+ output:
8433
+ $ref: "#/components/schemas/AIOutputFormat"
8434
+ model:
8435
+ $ref: "#/components/schemas/AIModel"
8436
+ - oneOf:
8437
+ - type: object
8438
+ required:
8439
+ - mode
8440
+ - instructions
8441
+ properties:
8442
+ mode:
8443
+ type: string
8444
+ enum:
8445
+ - custom
8446
+ instructions:
8447
+ type: string
8448
+ description: Custom instructions for the AI
8449
+ - type: object
8450
+ required:
8451
+ - mode
8452
+ properties:
8453
+ mode:
8454
+ type: string
8455
+ enum:
8456
+ - assistant
8363
8457
  responses:
8364
8458
  "200":
8365
8459
  description: OK
@@ -8598,6 +8692,8 @@ paths:
8598
8692
  - $ref: "#/components/parameters/siteId"
8599
8693
  - $ref: "#/components/parameters/siteRedirectId"
8600
8694
  responses:
8695
+ "204":
8696
+ description: Site redirect did not exist
8601
8697
  "205":
8602
8698
  description: Site redirect deleted
8603
8699
  "/orgs/{organizationId}/sites/{siteId}/redirect":
@@ -8636,6 +8732,137 @@ paths:
8636
8732
  - target
8637
8733
  "404":
8638
8734
  $ref: "#/components/responses/NotFoundError"
8735
+ "/orgs/{organizationId}/sites/{siteId}/mcp-servers":
8736
+ get:
8737
+ operationId: listSiteMcpServers
8738
+ summary: List all MCP servers for a site
8739
+ tags:
8740
+ - site-mcp-servers
8741
+ security:
8742
+ - user: []
8743
+ parameters:
8744
+ - $ref: "#/components/parameters/organizationId"
8745
+ - $ref: "#/components/parameters/siteId"
8746
+ - $ref: "#/components/parameters/listPage"
8747
+ - $ref: "#/components/parameters/listLimit"
8748
+ responses:
8749
+ "200":
8750
+ description: OK
8751
+ content:
8752
+ application/json:
8753
+ schema:
8754
+ allOf:
8755
+ - $ref: "#/components/schemas/List"
8756
+ - type: object
8757
+ required:
8758
+ - items
8759
+ properties:
8760
+ items:
8761
+ type: array
8762
+ items:
8763
+ $ref: "#/components/schemas/SiteMcpServer"
8764
+ post:
8765
+ operationId: createSiteMcpServer
8766
+ summary: Create a new MCP server
8767
+ tags:
8768
+ - site-mcp-servers
8769
+ security:
8770
+ - user: []
8771
+ parameters:
8772
+ - $ref: "#/components/parameters/organizationId"
8773
+ - $ref: "#/components/parameters/siteId"
8774
+ requestBody:
8775
+ required: true
8776
+ content:
8777
+ application/json:
8778
+ schema:
8779
+ type: object
8780
+ properties:
8781
+ name:
8782
+ $ref: "#/components/schemas/SiteMcpServerName"
8783
+ url:
8784
+ $ref: "#/components/schemas/URL"
8785
+ headers:
8786
+ $ref: "#/components/schemas/SiteMcpServerHeaders"
8787
+ required:
8788
+ - name
8789
+ - url
8790
+ - headers
8791
+ responses:
8792
+ "201":
8793
+ description: MCP server created
8794
+ content:
8795
+ application/json:
8796
+ schema:
8797
+ $ref: "#/components/schemas/SiteMcpServer"
8798
+ "/orgs/{organizationId}/sites/{siteId}/mcp-servers/{siteMcpServerId}":
8799
+ get:
8800
+ operationId: getSiteMcpServerById
8801
+ summary: Get a site MCP server
8802
+ tags:
8803
+ - site-mcp-servers
8804
+ security:
8805
+ - user: []
8806
+ parameters:
8807
+ - $ref: "#/components/parameters/organizationId"
8808
+ - $ref: "#/components/parameters/siteId"
8809
+ - $ref: "#/components/parameters/siteMcpServerId"
8810
+ responses:
8811
+ "200":
8812
+ description: OK
8813
+ content:
8814
+ application/json:
8815
+ schema:
8816
+ $ref: "#/components/schemas/SiteMcpServer"
8817
+ patch:
8818
+ operationId: updateSiteMcpServerById
8819
+ summary: Update a site MCP server
8820
+ tags:
8821
+ - site-mcp-servers
8822
+ security:
8823
+ - user: []
8824
+ parameters:
8825
+ - $ref: "#/components/parameters/organizationId"
8826
+ - $ref: "#/components/parameters/siteId"
8827
+ - $ref: "#/components/parameters/siteMcpServerId"
8828
+ requestBody:
8829
+ required: true
8830
+ content:
8831
+ application/json:
8832
+ schema:
8833
+ type: object
8834
+ properties:
8835
+ name:
8836
+ $ref: "#/components/schemas/SiteMcpServerName"
8837
+ url:
8838
+ type: string
8839
+ format: uri
8840
+ maxLength: 2048
8841
+ headers:
8842
+ $ref: "#/components/schemas/SiteMcpServerHeaders"
8843
+ responses:
8844
+ "200":
8845
+ description: OK
8846
+ content:
8847
+ application/json:
8848
+ schema:
8849
+ $ref: "#/components/schemas/SiteMcpServer"
8850
+ delete:
8851
+ operationId: deleteSiteMcpServerById
8852
+ summary: Delete a site MCP server
8853
+ tags:
8854
+ - site-mcp-servers
8855
+ security:
8856
+ - user: []
8857
+ parameters:
8858
+ - $ref: "#/components/parameters/organizationId"
8859
+ - $ref: "#/components/parameters/siteId"
8860
+ - $ref: "#/components/parameters/siteMcpServerId"
8861
+ responses:
8862
+ "204":
8863
+ description: MCP server did not exist
8864
+ "205":
8865
+ description: MCP server deleted
8639
8866
  "/subdomains/{subdomain}":
8640
8867
  get:
8641
8868
  operationId: getSubdomain
@@ -8700,6 +8927,8 @@ paths:
8700
8927
  parameters:
8701
8928
  - $ref: "#/components/parameters/hostname"
8702
8929
  responses:
8930
+ "204":
8931
+ description: Custom hostname did not exist
8703
8932
  "205":
8704
8933
  description: Custom hostname has been removed
8705
8934
  "/email-domains/{emailDomain}/orgs":
@@ -9409,6 +9638,13 @@ components:
9409
9638
  description: The unique id of the site redirect
9410
9639
  schema:
9411
9640
  type: string
9641
+ siteMcpServerId:
9642
+ name: siteMcpServerId
9643
+ in: path
9644
+ required: true
9645
+ description: The unique id of the MCP server
9646
+ schema:
9647
+ type: string
9412
9648
  subdomain:
9413
9649
  name: subdomain
9414
9650
  in: path
@@ -13002,6 +13238,12 @@ components:
13002
13238
  required:
13003
13239
  - oid
13004
13240
  - path
13241
+ RevisionPageLayoutOptionsWidth:
13242
+ type: string
13243
+ description: Width of the page.
13244
+ enum:
13245
+ - default
13246
+ - wide
13005
13247
  RevisionPageLayoutOptionsCoverSize:
13006
13248
  type: string
13007
13249
  description: Size of the cover image.
@@ -13011,6 +13253,8 @@ components:
13011
13253
  RevisionPageLayoutOptions:
13012
13254
  type: object
13013
13255
  properties:
13256
+ width:
13257
+ $ref: "#/components/schemas/RevisionPageLayoutOptionsWidth"
13014
13258
  cover:
13015
13259
  type: boolean
13016
13260
  description: Should the cover be visible?
@@ -13461,9 +13705,7 @@ components:
13461
13705
  - zip
13462
13706
  - confluence
13463
13707
  - github-wiki
13464
- - dropbox-paper
13465
13708
  - notion
13466
- - quip
13467
13709
  - google-docs
13468
13710
  ImportContent:
13469
13711
  type: object
@@ -13559,15 +13801,6 @@ components:
13559
13801
  - free
13560
13802
  - plus
13561
13803
  - pro
13562
- - team
13563
- - business
13564
- - legacy
13565
- - startup
13566
- - enterprise
13567
- - community
13568
- - team_oct_2019_free
13569
- - team_dec_2021
13570
- - business_dec_2021
13571
13804
  BillingInterval:
13572
13805
  type: string
13573
13806
  description: Interval for a billing subscription
@@ -20257,74 +20490,6 @@ components:
20257
20490
  - permission
20258
20491
  - user
20259
20492
  - origin
20260
- AIMessageRole:
20261
- type: string
20262
- enum:
20263
- - user
20264
- - assistant
20265
- - developer
20266
- AIMessageAttachmentSearch:
20267
- type: object
20268
- description: Attachment to attach search results to a message.
20269
- properties:
20270
- type:
20271
- type: string
20272
- enum:
20273
- - search
20274
- query:
20275
- type: string
20276
- description: The query to use to extract the knowledge.
20277
- required:
20278
- - type
20279
- - query
20280
- AIMessageAttachmentVisitorProfile:
20281
- type: object
20282
- description: Attachment representing the profile of the visitor
20283
- properties:
20284
- type:
20285
- type: string
20286
- enum:
20287
- - visitor_profile
20288
- required:
20289
- - type
20290
- AIMessageAttachmentPage:
20291
- type: object
20292
- description: Attachment to extract and pass the content of a page to the AI.
20293
- properties:
20294
- type:
20295
- type: string
20296
- enum:
20297
- - page
20298
- spaceId:
20299
- type: string
20300
- description: The ID of the space to extract the content from.
20301
- pageId:
20302
- type: string
20303
- description: The ID of the page to extract the content from.
20304
- required:
20305
- - type
20306
- - spaceId
20307
- - pageId
20308
- AIMessageAttachmentPages:
20309
- type: object
20310
- description: Attachment to pass the tree of pages to the AI
20311
- properties:
20312
- type:
20313
- type: string
20314
- enum:
20315
- - pages
20316
- spaceId:
20317
- type: string
20318
- description: The ID of the space to extract the content from.
20319
- required:
20320
- - type
20321
- - spaceId
20322
- AIMessageAttachment:
20323
- oneOf:
20324
- - $ref: "#/components/schemas/AIMessageAttachmentSearch"
20325
- - $ref: "#/components/schemas/AIMessageAttachmentVisitorProfile"
20326
- - $ref: "#/components/schemas/AIMessageAttachmentPage"
20327
- - $ref: "#/components/schemas/AIMessageAttachmentPages"
20328
20493
  AIMessageContext:
20329
20494
  type: object
20330
20495
  description: Context about the current user sending a message.
@@ -20346,16 +20511,14 @@ components:
20346
20511
  description: Input version of an AI message.
20347
20512
  properties:
20348
20513
  role:
20349
- $ref: "#/components/schemas/AIMessageRole"
20514
+ type: string
20515
+ enum:
20516
+ - user
20350
20517
  content:
20351
20518
  oneOf:
20352
20519
  - type: string
20353
20520
  maxLength: 2048
20354
20521
  - $ref: "#/components/schemas/JSONDocument"
20355
- attachments:
20356
- type: array
20357
- items:
20358
- $ref: "#/components/schemas/AIMessageAttachment"
20359
20522
  context:
20360
20523
  $ref: "#/components/schemas/AIMessageContext"
20361
20524
  required:
@@ -20398,19 +20561,6 @@ components:
20398
20561
  - reasoning-low
20399
20562
  - reasoning-medium
20400
20563
  - reasoning-high
20401
- AIToolCapabilities:
20402
- type: object
20403
- description: Tools provided to the AI
20404
- properties:
20405
- getPageContent:
20406
- type: boolean
20407
- description: Whether the AI can read the content of a page
20408
- getPages:
20409
- type: boolean
20410
- description: Whether the AI can read the table of contents of a space
20411
- search:
20412
- type: boolean
20413
- description: Whether the AI can search for content
20414
20564
  AIStreamResponseFinish:
20415
20565
  type: object
20416
20566
  description: |
@@ -20714,6 +20864,27 @@ components:
20714
20864
  - spaceId
20715
20865
  - action
20716
20866
  - task
20867
+ AIToolCallMCP:
20868
+ type: object
20869
+ description: Tool called from an MCP server
20870
+ properties:
20871
+ tool:
20872
+ type: string
20873
+ enum:
20874
+ - mcp
20875
+ mcpServerId:
20876
+ type: string
20877
+ description: The ID of the MCP server that has been called.
20878
+ mcpToolName:
20879
+ type: string
20880
+ description: The name of the tool that has been called.
20881
+ mcpToolTitle:
20882
+ type: string
20883
+ description: The title of the tool that has been called.
20884
+ required:
20885
+ - tool
20886
+ - mcpServerId
20887
+ - mcpToolName
20717
20888
  AIToolCall:
20718
20889
  oneOf:
20719
20890
  - $ref: "#/components/schemas/AIToolCallGetPageContent"
@@ -20727,6 +20898,7 @@ components:
20727
20898
  - $ref: "#/components/schemas/AIToolCallListModifiedPages"
20728
20899
  - $ref: "#/components/schemas/AIToolCallGetPageDiff"
20729
20900
  - $ref: "#/components/schemas/AIToolCallCreateAgentTask"
20901
+ - $ref: "#/components/schemas/AIToolCallMCP"
20730
20902
  AIStreamResponseToolCall:
20731
20903
  type: object
20732
20904
  description: |
@@ -20751,12 +20923,36 @@ components:
20751
20923
  - messageId
20752
20924
  - stepIndex
20753
20925
  - toolCall
20926
+ AIStreamResponseFollowupSuggestion:
20927
+ type: object
20928
+ description: |
20929
+ Message emitted by the server to suggest a followup message the user could respond with.
20930
+ properties:
20931
+ type:
20932
+ type: string
20933
+ enum:
20934
+ - response_followup_suggestion
20935
+ messageId:
20936
+ type: string
20937
+ description: |
20938
+ The ID of the message that this event is composing.
20939
+ suggestions:
20940
+ type: array
20941
+ items:
20942
+ type: string
20943
+ description: |
20944
+ A followup message the user could respond with.
20945
+ required:
20946
+ - type
20947
+ - messageId
20948
+ - suggestions
20754
20949
  AIStreamResponse:
20755
20950
  oneOf:
20756
20951
  - $ref: "#/components/schemas/AIStreamResponseFinish"
20757
20952
  - $ref: "#/components/schemas/AIStreamResponseDocument"
20758
20953
  - $ref: "#/components/schemas/AIStreamResponseObject"
20759
20954
  - $ref: "#/components/schemas/AIStreamResponseToolCall"
20955
+ - $ref: "#/components/schemas/AIStreamResponseFollowupSuggestion"
20760
20956
  SiteInsightsEventSession:
20761
20957
  type: object
20762
20958
  description: Analytics info on the GitBook's site session.
@@ -21678,7 +21874,11 @@ components:
21678
21874
  values:
21679
21875
  type: array
21680
21876
  items:
21681
- $ref: "#/components/schemas/SiteInsightsVisitorBot"
21877
+ oneOf:
21878
+ - $ref: "#/components/schemas/SiteInsightsVisitorBot"
21879
+ - type: string
21880
+ enum:
21881
+ - ""
21682
21882
  - type: object
21683
21883
  required:
21684
21884
  - column
@@ -22263,6 +22463,51 @@ components:
22263
22463
  - id
22264
22464
  - source
22265
22465
  - destination
22466
+ SiteMcpServerName:
22467
+ type: string
22468
+ description: Name of the MCP server
22469
+ minLength: 1
22470
+ maxLength: 100
22471
+ SiteMcpServerHeaders:
22472
+ type: object
22473
+ additionalProperties:
22474
+ type: string
22475
+ minLength: 1
22476
+ maxLength: 512
22477
+ description: HTTP headers sent with requests to this server
22478
+ SiteMcpServer:
22479
+ type: object
22480
+ properties:
22481
+ object:
22482
+ type: string
22483
+ enum:
22484
+ - site-mcp-server
22485
+ id:
22486
+ type: string
22487
+ description: Unique identifier for the MCP server
22488
+ name:
22489
+ $ref: "#/components/schemas/SiteMcpServerName"
22490
+ url:
22491
+ $ref: "#/components/schemas/URL"
22492
+ headers:
22493
+ $ref: "#/components/schemas/SiteMcpServerHeaders"
22494
+ urls:
22495
+ type: object
22496
+ description: URLs associated with the object
22497
+ properties:
22498
+ location:
22499
+ type: string
22500
+ description: URL of the MCP server in the API
22501
+ format: uri
22502
+ required:
22503
+ - location
22504
+ required:
22505
+ - object
22506
+ - id
22507
+ - name
22508
+ - url
22509
+ - headers
22510
+ - urls
22266
22511
  Subdomain:
22267
22512
  type: object
22268
22513
  properties:
@@ -24055,6 +24300,33 @@ components:
24055
24300
  - channel
24056
24301
  - site
24057
24302
  - siteShareLink
24303
+ SiteMcpServersChannel:
24304
+ type: object
24305
+ properties:
24306
+ channel:
24307
+ type: string
24308
+ enum:
24309
+ - site-mcp-servers
24310
+ site:
24311
+ type: string
24312
+ required:
24313
+ - channel
24314
+ - site
24315
+ SiteMcpServerChannel:
24316
+ type: object
24317
+ properties:
24318
+ channel:
24319
+ type: string
24320
+ enum:
24321
+ - site-mcp-server
24322
+ site:
24323
+ type: string
24324
+ siteMcpServer:
24325
+ type: string
24326
+ required:
24327
+ - channel
24328
+ - site
24329
+ - siteMcpServer
24058
24330
  SiteSectionChannel:
24059
24331
  type: object
24060
24332
  properties:
@@ -24235,6 +24507,8 @@ components:
24235
24507
  - $ref: "#/components/schemas/SitePublishingAuthChannel"
24236
24508
  - $ref: "#/components/schemas/SiteShareLinksChannel"
24237
24509
  - $ref: "#/components/schemas/SiteShareLinkChannel"
24510
+ - $ref: "#/components/schemas/SiteMcpServersChannel"
24511
+ - $ref: "#/components/schemas/SiteMcpServerChannel"
24238
24512
  - $ref: "#/components/schemas/SiteSectionChannel"
24239
24513
  - $ref: "#/components/schemas/CustomHostnameChannel"
24240
24514
  - $ref: "#/components/schemas/GitSyncSettingsChannel"
@@ -24383,6 +24657,12 @@ components:
24383
24657
  - member
24384
24658
  - createdAt
24385
24659
  - updatedAt
24660
+ AIMessageRole:
24661
+ type: string
24662
+ enum:
24663
+ - user
24664
+ - assistant
24665
+ - developer
24386
24666
  AIMessageStep:
24387
24667
  type: object
24388
24668
  description: A step in a message from the AI agent.