@gitbook/api 0.124.0 → 0.125.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:
@@ -2450,6 +2460,34 @@ paths:
2450
2460
  application/json:
2451
2461
  schema:
2452
2462
  $ref: "#/components/schemas/RevisionReusableContent"
2463
+ "/spaces/{spaceId}/change-requests/{changeRequestId}/changes":
2464
+ get:
2465
+ operationId: getChangeRequestChanges
2466
+ summary: Get change request semantic changes
2467
+ description: Return the semantic changes between a change request and its base revision.
2468
+ tags:
2469
+ - change-request-content
2470
+ security:
2471
+ - user: []
2472
+ parameters:
2473
+ - $ref: "#/components/parameters/spaceId"
2474
+ - $ref: "#/components/parameters/changeRequestId"
2475
+ - name: limit
2476
+ in: query
2477
+ description: Limit the number of changes returned
2478
+ schema:
2479
+ type: number
2480
+ default: 10
2481
+ responses:
2482
+ "200":
2483
+ description: OK
2484
+ content:
2485
+ application/json:
2486
+ schema:
2487
+ $ref: "#/components/schemas/RevisionSemanticChanges"
2488
+ "404":
2489
+ description: The change request could not be found.
2490
+ $ref: "#/components/responses/NotFoundError"
2453
2491
  "/spaces/{spaceId}/change-requests/{changeRequestId}/pdf":
2454
2492
  get:
2455
2493
  operationId: getChangeRequestPDF
@@ -8636,6 +8674,135 @@ paths:
8636
8674
  - target
8637
8675
  "404":
8638
8676
  $ref: "#/components/responses/NotFoundError"
8677
+ "/orgs/{organizationId}/sites/{siteId}/mcp-servers":
8678
+ get:
8679
+ operationId: listSiteMcpServers
8680
+ summary: List all MCP servers for a site
8681
+ tags:
8682
+ - site-mcp-servers
8683
+ security:
8684
+ - user: []
8685
+ parameters:
8686
+ - $ref: "#/components/parameters/organizationId"
8687
+ - $ref: "#/components/parameters/siteId"
8688
+ - $ref: "#/components/parameters/listPage"
8689
+ - $ref: "#/components/parameters/listLimit"
8690
+ responses:
8691
+ "200":
8692
+ description: OK
8693
+ content:
8694
+ application/json:
8695
+ schema:
8696
+ allOf:
8697
+ - $ref: "#/components/schemas/List"
8698
+ - type: object
8699
+ required:
8700
+ - items
8701
+ properties:
8702
+ items:
8703
+ type: array
8704
+ items:
8705
+ $ref: "#/components/schemas/SiteMcpServer"
8706
+ post:
8707
+ operationId: createSiteMcpServer
8708
+ summary: Create a new MCP server
8709
+ tags:
8710
+ - site-mcp-servers
8711
+ security:
8712
+ - user: []
8713
+ parameters:
8714
+ - $ref: "#/components/parameters/organizationId"
8715
+ - $ref: "#/components/parameters/siteId"
8716
+ requestBody:
8717
+ required: true
8718
+ content:
8719
+ application/json:
8720
+ schema:
8721
+ type: object
8722
+ properties:
8723
+ name:
8724
+ $ref: "#/components/schemas/SiteMcpServerName"
8725
+ url:
8726
+ $ref: "#/components/schemas/URL"
8727
+ headers:
8728
+ $ref: "#/components/schemas/SiteMcpServerHeaders"
8729
+ required:
8730
+ - name
8731
+ - url
8732
+ - headers
8733
+ responses:
8734
+ "201":
8735
+ description: MCP server created
8736
+ content:
8737
+ application/json:
8738
+ schema:
8739
+ $ref: "#/components/schemas/SiteMcpServer"
8740
+ "/orgs/{organizationId}/sites/{siteId}/mcp-servers/{siteMcpServerId}":
8741
+ get:
8742
+ operationId: getSiteMcpServerById
8743
+ summary: Get a site MCP server
8744
+ tags:
8745
+ - site-mcp-servers
8746
+ security:
8747
+ - user: []
8748
+ parameters:
8749
+ - $ref: "#/components/parameters/organizationId"
8750
+ - $ref: "#/components/parameters/siteId"
8751
+ - $ref: "#/components/parameters/siteMcpServerId"
8752
+ responses:
8753
+ "200":
8754
+ description: OK
8755
+ content:
8756
+ application/json:
8757
+ schema:
8758
+ $ref: "#/components/schemas/SiteMcpServer"
8759
+ patch:
8760
+ operationId: updateSiteMcpServerById
8761
+ summary: Update a site MCP server
8762
+ tags:
8763
+ - site-mcp-servers
8764
+ security:
8765
+ - user: []
8766
+ parameters:
8767
+ - $ref: "#/components/parameters/organizationId"
8768
+ - $ref: "#/components/parameters/siteId"
8769
+ - $ref: "#/components/parameters/siteMcpServerId"
8770
+ requestBody:
8771
+ required: true
8772
+ content:
8773
+ application/json:
8774
+ schema:
8775
+ type: object
8776
+ properties:
8777
+ name:
8778
+ $ref: "#/components/schemas/SiteMcpServerName"
8779
+ url:
8780
+ type: string
8781
+ format: uri
8782
+ maxLength: 2048
8783
+ headers:
8784
+ $ref: "#/components/schemas/SiteMcpServerHeaders"
8785
+ responses:
8786
+ "200":
8787
+ description: OK
8788
+ content:
8789
+ application/json:
8790
+ schema:
8791
+ $ref: "#/components/schemas/SiteMcpServer"
8792
+ delete:
8793
+ operationId: deleteSiteMcpServerById
8794
+ summary: Delete a site MCP server
8795
+ tags:
8796
+ - site-mcp-servers
8797
+ security:
8798
+ - user: []
8799
+ parameters:
8800
+ - $ref: "#/components/parameters/organizationId"
8801
+ - $ref: "#/components/parameters/siteId"
8802
+ - $ref: "#/components/parameters/siteMcpServerId"
8803
+ responses:
8804
+ "205":
8805
+ description: MCP server deleted
8639
8806
  "/subdomains/{subdomain}":
8640
8807
  get:
8641
8808
  operationId: getSubdomain
@@ -9409,6 +9576,13 @@ components:
9409
9576
  description: The unique id of the site redirect
9410
9577
  schema:
9411
9578
  type: string
9579
+ siteMcpServerId:
9580
+ name: siteMcpServerId
9581
+ in: path
9582
+ required: true
9583
+ description: The unique id of the MCP server
9584
+ schema:
9585
+ type: string
9412
9586
  subdomain:
9413
9587
  name: subdomain
9414
9588
  in: path
@@ -13461,9 +13635,7 @@ components:
13461
13635
  - zip
13462
13636
  - confluence
13463
13637
  - github-wiki
13464
- - dropbox-paper
13465
13638
  - notion
13466
- - quip
13467
13639
  - google-docs
13468
13640
  ImportContent:
13469
13641
  type: object
@@ -13559,15 +13731,6 @@ components:
13559
13731
  - free
13560
13732
  - plus
13561
13733
  - 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
13734
  BillingInterval:
13572
13735
  type: string
13573
13736
  description: Interval for a billing subscription
@@ -20714,6 +20877,27 @@ components:
20714
20877
  - spaceId
20715
20878
  - action
20716
20879
  - task
20880
+ AIToolCallMCP:
20881
+ type: object
20882
+ description: Tool called from an MCP server
20883
+ properties:
20884
+ tool:
20885
+ type: string
20886
+ enum:
20887
+ - mcp
20888
+ mcpServerId:
20889
+ type: string
20890
+ description: The ID of the MCP server that has been called.
20891
+ mcpToolName:
20892
+ type: string
20893
+ description: The name of the tool that has been called.
20894
+ mcpToolTitle:
20895
+ type: string
20896
+ description: The title of the tool that has been called.
20897
+ required:
20898
+ - tool
20899
+ - mcpServerId
20900
+ - mcpToolName
20717
20901
  AIToolCall:
20718
20902
  oneOf:
20719
20903
  - $ref: "#/components/schemas/AIToolCallGetPageContent"
@@ -20727,6 +20911,7 @@ components:
20727
20911
  - $ref: "#/components/schemas/AIToolCallListModifiedPages"
20728
20912
  - $ref: "#/components/schemas/AIToolCallGetPageDiff"
20729
20913
  - $ref: "#/components/schemas/AIToolCallCreateAgentTask"
20914
+ - $ref: "#/components/schemas/AIToolCallMCP"
20730
20915
  AIStreamResponseToolCall:
20731
20916
  type: object
20732
20917
  description: |
@@ -21678,7 +21863,11 @@ components:
21678
21863
  values:
21679
21864
  type: array
21680
21865
  items:
21681
- $ref: "#/components/schemas/SiteInsightsVisitorBot"
21866
+ oneOf:
21867
+ - $ref: "#/components/schemas/SiteInsightsVisitorBot"
21868
+ - type: string
21869
+ enum:
21870
+ - ""
21682
21871
  - type: object
21683
21872
  required:
21684
21873
  - column
@@ -22263,6 +22452,51 @@ components:
22263
22452
  - id
22264
22453
  - source
22265
22454
  - destination
22455
+ SiteMcpServerName:
22456
+ type: string
22457
+ description: Name of the MCP server
22458
+ minLength: 1
22459
+ maxLength: 100
22460
+ SiteMcpServerHeaders:
22461
+ type: object
22462
+ additionalProperties:
22463
+ type: string
22464
+ minLength: 1
22465
+ maxLength: 512
22466
+ description: HTTP headers sent with requests to this server
22467
+ SiteMcpServer:
22468
+ type: object
22469
+ properties:
22470
+ object:
22471
+ type: string
22472
+ enum:
22473
+ - site-mcp-server
22474
+ id:
22475
+ type: string
22476
+ description: Unique identifier for the MCP server
22477
+ name:
22478
+ $ref: "#/components/schemas/SiteMcpServerName"
22479
+ url:
22480
+ $ref: "#/components/schemas/URL"
22481
+ headers:
22482
+ $ref: "#/components/schemas/SiteMcpServerHeaders"
22483
+ urls:
22484
+ type: object
22485
+ description: URLs associated with the object
22486
+ properties:
22487
+ location:
22488
+ type: string
22489
+ description: URL of the MCP server in the API
22490
+ format: uri
22491
+ required:
22492
+ - location
22493
+ required:
22494
+ - object
22495
+ - id
22496
+ - name
22497
+ - url
22498
+ - headers
22499
+ - urls
22266
22500
  Subdomain:
22267
22501
  type: object
22268
22502
  properties:
@@ -24055,6 +24289,33 @@ components:
24055
24289
  - channel
24056
24290
  - site
24057
24291
  - siteShareLink
24292
+ SiteMcpServersChannel:
24293
+ type: object
24294
+ properties:
24295
+ channel:
24296
+ type: string
24297
+ enum:
24298
+ - site-mcp-servers
24299
+ site:
24300
+ type: string
24301
+ required:
24302
+ - channel
24303
+ - site
24304
+ SiteMcpServerChannel:
24305
+ type: object
24306
+ properties:
24307
+ channel:
24308
+ type: string
24309
+ enum:
24310
+ - site-mcp-server
24311
+ site:
24312
+ type: string
24313
+ siteMcpServer:
24314
+ type: string
24315
+ required:
24316
+ - channel
24317
+ - site
24318
+ - siteMcpServer
24058
24319
  SiteSectionChannel:
24059
24320
  type: object
24060
24321
  properties:
@@ -24235,6 +24496,8 @@ components:
24235
24496
  - $ref: "#/components/schemas/SitePublishingAuthChannel"
24236
24497
  - $ref: "#/components/schemas/SiteShareLinksChannel"
24237
24498
  - $ref: "#/components/schemas/SiteShareLinkChannel"
24499
+ - $ref: "#/components/schemas/SiteMcpServersChannel"
24500
+ - $ref: "#/components/schemas/SiteMcpServerChannel"
24238
24501
  - $ref: "#/components/schemas/SiteSectionChannel"
24239
24502
  - $ref: "#/components/schemas/CustomHostnameChannel"
24240
24503
  - $ref: "#/components/schemas/GitSyncSettingsChannel"