@gitbook/api 0.191.0 → 0.193.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
@@ -721,7 +721,7 @@ paths:
721
721
  post:
722
722
  operationId: duplicateSpace
723
723
  summary: Create a full copy of a space
724
- description: Creates a new space that is a complete copy of the specified space, including all pages and their content. The duplicate is created in the same organization. Returns the newly created space. Use this to create a template-based copy or to snapshot a space before making large changes.
724
+ description: Creates a new space that is a complete copy of the specified space, including all pages and their content. The duplicate is created in the same organization. It does not preserve or create a placement in a site. When duplicating from a site context, use duplicateSiteSpace instead. Use this operation for an organization-level or orphan-space copy.
725
725
  x-gitbook-mcp: true
726
726
  tags:
727
727
  - spaces
@@ -879,7 +879,7 @@ paths:
879
879
  post:
880
880
  operationId: importGitRepository
881
881
  summary: Pull content into a space from a connected Git repository
882
- description: Triggers an import from the linked Git repository into the space, updating the space's content to match the repository. This is an async operation — it runs in the background after the request returns 204. Use getSpaceGitInfo to check sync status. The space must already have a Git provider configured.
882
+ description: Triggers an import from provided Git repository into the space, updating the space's content to match the repository (if not standalone). This is an async operation — it runs in the background after the request returns 204.
883
883
  x-gitbook-mcp: true
884
884
  tags:
885
885
  - space-git
@@ -893,7 +893,7 @@ paths:
893
893
  - $ref: "#/components/parameters/spaceId"
894
894
  responses:
895
895
  "204":
896
- description: Operation to import the repository has been started.
896
+ description: Operation to import the repository has been queued.
897
897
  requestBody:
898
898
  required: true
899
899
  content:
@@ -904,7 +904,7 @@ paths:
904
904
  post:
905
905
  operationId: exportToGitRepository
906
906
  summary: Push space content to a connected Git repository
907
- description: Triggers an export of the space's current content to the linked Git repository. This is an async operation — the export runs in the background after the request returns 204. Use getSpaceGitInfo to check the current git sync status. The space must already have a Git provider configured.
907
+ description: Triggers an export of the space's current content to the provided Git repository. This is an async operation — the export runs in the background after the request returns 204.
908
908
  x-gitbook-mcp: true
909
909
  tags:
910
910
  - space-git
@@ -918,7 +918,7 @@ paths:
918
918
  - $ref: "#/components/parameters/spaceId"
919
919
  responses:
920
920
  "204":
921
- description: Operation to export the space has been started.
921
+ description: Operation to export the space has been queued.
922
922
  requestBody:
923
923
  required: true
924
924
  content:
@@ -2375,7 +2375,6 @@ paths:
2375
2375
  summary: Apply a batch of content changes to a change request
2376
2376
  description: |-
2377
2377
  Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request.
2378
-
2379
2378
  When page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by:
2380
2379
  - Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`).
2381
2380
  - Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>`
@@ -2390,6 +2389,16 @@ paths:
2390
2389
  extension (e.g. `./section`) resolve to that folder's page.
2391
2390
 
2392
2391
  External URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail.
2392
+ GitBook normalizes submitted content, so the stored page may differ from what was sent. To help callers reconcile local state with the stored result, the response can list each created and modified page with its resolved ID and a `urls.location` to fetch the page's persisted content.
2393
+
2394
+ **Response shape (`compat`)** — this endpoint is changing what it returns:
2395
+ - `compat=true` (current default) returns the updated change request, matching the endpoint's
2396
+ original behavior.
2397
+
2398
+ - `compat=false` returns the updated change request **and** the list of affected pages (see
2399
+ the response schema).
2400
+
2401
+ The default is `true` for now to preserve backwards compatibility, but **will switch to `false` in a future release**, at which point the affected-page list is always included. You should pass `compat=false` if you want the new behavior today and avoid unexpected errors when the default flips in the future.
2393
2402
  x-gitbook-mcp: true
2394
2403
  tags:
2395
2404
  - change-request-content
@@ -2400,6 +2409,12 @@ paths:
2400
2409
  parameters:
2401
2410
  - $ref: "#/components/parameters/spaceId"
2402
2411
  - $ref: "#/components/parameters/changeRequestId"
2412
+ - name: compat
2413
+ in: query
2414
+ description: When `true`, the updated change request is returned. When `false`, the updated change request and the list of affected pages are returned.
2415
+ schema:
2416
+ type: boolean
2417
+ default: true
2403
2418
  requestBody:
2404
2419
  required: true
2405
2420
  content:
@@ -2421,7 +2436,10 @@ paths:
2421
2436
  content:
2422
2437
  application/json:
2423
2438
  schema:
2424
- $ref: "#/components/schemas/ChangeRequest"
2439
+ description: The change request when `compat=true` (default), or the change request plus the list of affected pages when `compat=false`.
2440
+ oneOf:
2441
+ - $ref: "#/components/schemas/ChangeRequest"
2442
+ - $ref: "#/components/schemas/ChangeRequestContentUpdate"
2425
2443
  "404":
2426
2444
  description: The change request could not be found.
2427
2445
  $ref: "#/components/responses/NotFoundError"
@@ -7870,6 +7888,11 @@ paths:
7870
7888
  type: boolean
7871
7889
  default: false
7872
7890
  description: Whether the site space should be created as draft. Defaults to false.
7891
+ pageId:
7892
+ oneOf:
7893
+ - type: string
7894
+ - type: "null"
7895
+ description: Custom home page within the space, rendered at the site space's path root instead of the space's default landing page.
7873
7896
  required:
7874
7897
  - spaceId
7875
7898
  responses:
@@ -8663,6 +8686,11 @@ paths:
8663
8686
  oneOf:
8664
8687
  - $ref: "#/components/schemas/SiteTriageFilterQuestions"
8665
8688
  - $ref: "#/components/schemas/SiteTriageFilterConnections"
8689
+ - name: orderBy
8690
+ in: query
8691
+ description: Sort findings by the given field.
8692
+ schema:
8693
+ $ref: "#/components/schemas/SiteFindingOrderBy"
8666
8694
  responses:
8667
8695
  "200":
8668
8696
  description: OK
@@ -8875,6 +8903,61 @@ paths:
8875
8903
  type: array
8876
8904
  items:
8877
8905
  $ref: "#/components/schemas/ContextRecord"
8906
+ /orgs/{organizationId}/sites/{siteId}/stats/findings:
8907
+ get:
8908
+ operationId: getSiteFindingStats
8909
+ summary: Get aggregate statistics about the findings identified on a site
8910
+ 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.
8911
+ tags:
8912
+ - site-context
8913
+ security:
8914
+ - user: []
8915
+ - oauth:
8916
+ - site:read
8917
+ parameters:
8918
+ - $ref: "#/components/parameters/organizationId"
8919
+ - $ref: "#/components/parameters/siteId"
8920
+ - name: topic
8921
+ in: query
8922
+ description: Filter findings by associated site topic ID.
8923
+ schema:
8924
+ type: string
8925
+ - name: status
8926
+ in: query
8927
+ description: Filter findings by status.
8928
+ schema:
8929
+ $ref: "#/components/schemas/SiteFindingStatus"
8930
+ - name: type
8931
+ in: query
8932
+ description: Filter findings by type.
8933
+ schema:
8934
+ $ref: "#/components/schemas/SiteFindingType"
8935
+ - name: severity
8936
+ in: query
8937
+ description: Filter findings by estimated severity.
8938
+ schema:
8939
+ $ref: "#/components/schemas/SiteFindingSeverity"
8940
+ - name: hasChangeRequests
8941
+ in: query
8942
+ description: Filter findings that have at least one associated change request.
8943
+ schema:
8944
+ type: boolean
8945
+ - name: source
8946
+ in: query
8947
+ description: Filter findings by the source of their evidence. Each entry is either `connection:<connectionId>` (findings with at least one piece of evidence coming from the given connection) or `questions` (findings with at least one piece of evidence coming from a site question). When multiple entries are given, findings matching any of them are counted.
8948
+ schema:
8949
+ type: array
8950
+ items:
8951
+ oneOf:
8952
+ - $ref: "#/components/schemas/SiteTriageFilterQuestions"
8953
+ - $ref: "#/components/schemas/SiteTriageFilterConnections"
8954
+ responses:
8955
+ "200":
8956
+ description: OK
8957
+ content:
8958
+ application/json:
8959
+ schema:
8960
+ $ref: "#/components/schemas/SiteFindingStats"
8878
8961
  /orgs/{organizationId}/sites/{siteId}/context-connections:
8879
8962
  get:
8880
8963
  operationId: listSiteContextConnections
@@ -9634,6 +9717,11 @@ paths:
9634
9717
  oneOf:
9635
9718
  - $ref: "#/components/schemas/Expression"
9636
9719
  - type: "null"
9720
+ pageId:
9721
+ description: Custom home page within the space, rendered at the site space's path root instead of the space's default landing page. If not set, the page will remain unchanged unless spaceId is changed, in which case the custom home page will be removed. If set to null, the custom home page will be removed.
9722
+ oneOf:
9723
+ - type: string
9724
+ - type: "null"
9637
9725
  spaceId:
9638
9726
  type: string
9639
9727
  description: The content that this site space points to. If not set, the space will remain unchanged.
@@ -9668,6 +9756,46 @@ paths:
9668
9756
  description: Site space did not exist
9669
9757
  "205":
9670
9758
  description: Site space has been deleted
9759
+ /orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/duplicate:
9760
+ post:
9761
+ operationId: duplicateSiteSpace
9762
+ summary: Duplicate a space in a site
9763
+ description: Creates a full copy of the space linked by the specified site space. When the site space is the only variant in a section, the copy is placed in a new sibling section. Otherwise, it is added as a variant under the same parent. Prefer this operation over duplicateSpace whenever the request originates from a site or needs to preserve site placement.
9764
+ x-gitbook-mcp: true
9765
+ tags:
9766
+ - site-spaces
9767
+ - spaces
9768
+ security:
9769
+ - user: []
9770
+ - oauth:
9771
+ - space:write
9772
+ - site:write
9773
+ parameters:
9774
+ - $ref: "#/components/parameters/organizationId"
9775
+ - $ref: "#/components/parameters/siteId"
9776
+ - $ref: "#/components/parameters/siteSpaceId"
9777
+ requestBody:
9778
+ content:
9779
+ application/json:
9780
+ schema:
9781
+ type: object
9782
+ properties:
9783
+ draft:
9784
+ type: boolean
9785
+ default: false
9786
+ description: Whether the duplicated site space and any new section should be created as drafts.
9787
+ responses:
9788
+ "201":
9789
+ description: Space duplicated in the site structure
9790
+ headers:
9791
+ Location:
9792
+ description: API URL for the newly created site-space
9793
+ schema:
9794
+ type: string
9795
+ content:
9796
+ application/json:
9797
+ schema:
9798
+ $ref: "#/components/schemas/SiteSpace"
9671
9799
  /orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/customization:
9672
9800
  get:
9673
9801
  operationId: getSiteSpaceCustomizationById
@@ -10387,6 +10515,25 @@ paths:
10387
10515
  text/event-stream:
10388
10516
  schema:
10389
10517
  $ref: "#/components/schemas/AIStreamResponse"
10518
+ /orgs/{organizationId}/sites/{siteId}/template:
10519
+ post:
10520
+ operationId: applyTemplateToSite
10521
+ summary: Apply the default documentation template to a site
10522
+ description: Populates an empty site with GitBook's default documentation structure, content, and customization. Use this after creating a site without spaces to give it a ready-to-edit starting point.
10523
+ x-gitbook-mcp: true
10524
+ tags:
10525
+ - sites
10526
+ security:
10527
+ - user-internal: []
10528
+ - user: []
10529
+ - oauth:
10530
+ - site:write
10531
+ parameters:
10532
+ - $ref: "#/components/parameters/organizationId"
10533
+ - $ref: "#/components/parameters/siteId"
10534
+ responses:
10535
+ "200":
10536
+ description: Template applied to site.
10390
10537
  /orgs/{organizationId}/sites/{siteId}/agent-settings:
10391
10538
  get:
10392
10539
  operationId: getSiteAgentSettingsById
@@ -12833,6 +12980,11 @@ components:
12833
12980
  - failure
12834
12981
  - success
12835
12982
  - timeout
12983
+ GitSyncOperationDirection:
12984
+ type: string
12985
+ enum:
12986
+ - export
12987
+ - import
12836
12988
  GitSyncState:
12837
12989
  type: object
12838
12990
  properties:
@@ -12850,6 +13002,9 @@ components:
12850
13002
  installationId:
12851
13003
  type: string
12852
13004
  description: The ID of the Git Sync installation.
13005
+ parentInstallationId:
13006
+ type: string
13007
+ description: The ID of the parent Git Sync installation, if any.
12853
13008
  url:
12854
13009
  type: string
12855
13010
  description: The URL to the repository tree, used when rendering public content.
@@ -12859,11 +13014,26 @@ components:
12859
13014
  properties:
12860
13015
  state:
12861
13016
  $ref: "#/components/schemas/GitSyncOperationState"
13017
+ direction:
13018
+ $ref: "#/components/schemas/GitSyncOperationDirection"
13019
+ startedAt:
13020
+ $ref: "#/components/schemas/Timestamp"
13021
+ endedAt:
13022
+ $ref: "#/components/schemas/Timestamp"
13023
+ error:
13024
+ type: string
13025
+ description: Why the operation failed, when it did.
12862
13026
  required:
12863
13027
  - state
13028
+ - direction
13029
+ - startedAt
12864
13030
  updatedAt:
12865
13031
  description: When the Git provider details were last updated
12866
13032
  $ref: "#/components/schemas/Timestamp"
13033
+ required:
13034
+ - installationId
13035
+ - installationProvider
13036
+ - installationStatus
12867
13037
  VisitorAuthCustomBackend:
12868
13038
  type: object
12869
13039
  title: Custom backend for authenticated access
@@ -13232,6 +13402,12 @@ components:
13232
13402
  type: string
13233
13403
  score:
13234
13404
  $ref: "#/components/schemas/SearchResultScore"
13405
+ resultType:
13406
+ type: string
13407
+ description: Whether the result matched on the page fields (title, description) or on the section content. When "page", the section is an arbitrary section of the matching page.
13408
+ enum:
13409
+ - page
13410
+ - section
13235
13411
  body:
13236
13412
  type: string
13237
13413
  urls:
@@ -13263,6 +13439,12 @@ components:
13263
13439
  type: string
13264
13440
  score:
13265
13441
  $ref: "#/components/schemas/SearchResultScore"
13442
+ resultType:
13443
+ type: string
13444
+ description: Whether the page matched on its own fields (title, description) or on the content of one of its sections.
13445
+ enum:
13446
+ - page
13447
+ - section
13266
13448
  sections:
13267
13449
  type: array
13268
13450
  items:
@@ -14305,7 +14487,7 @@ components:
14305
14487
  - type
14306
14488
  - data
14307
14489
  - nodes
14308
- DocumentBlockHint:
14490
+ DocumentBlockEmbed:
14309
14491
  type: object
14310
14492
  properties:
14311
14493
  object:
@@ -14315,37 +14497,219 @@ components:
14315
14497
  type:
14316
14498
  type: string
14317
14499
  enum:
14318
- - hint
14500
+ - embed
14319
14501
  key:
14320
14502
  type: string
14321
14503
  data:
14322
14504
  type: object
14323
14505
  properties:
14324
- style:
14506
+ url:
14325
14507
  type: string
14326
- enum:
14327
- - info
14328
- - warning
14329
- - danger
14330
- - success
14331
- icon:
14332
- $ref: "#/components/schemas/Icon"
14508
+ fullWidth:
14509
+ type: boolean
14333
14510
  required:
14334
- - style
14335
- nodes:
14336
- type: array
14337
- items:
14338
- $ref: "#/components/schemas/DocumentBlocksEssentials"
14511
+ - url
14339
14512
  isVoid:
14340
14513
  type: boolean
14341
14514
  enum:
14342
- - false
14515
+ - true
14343
14516
  required:
14344
14517
  - object
14345
14518
  - type
14346
14519
  - data
14347
- - nodes
14348
- DocumentBlockQuote:
14520
+ - isVoid
14521
+ PlainObject:
14522
+ properties: {}
14523
+ additionalProperties:
14524
+ oneOf:
14525
+ - $ref: "#/components/schemas/PlainObject"
14526
+ - type: string
14527
+ - type: boolean
14528
+ - type: number
14529
+ - type: array
14530
+ items:
14531
+ oneOf:
14532
+ - type: string
14533
+ - type: boolean
14534
+ - type: number
14535
+ - $ref: "#/components/schemas/PlainObject"
14536
+ ContentKitDefaultAction:
14537
+ oneOf:
14538
+ - type: object
14539
+ description: Action to open an overlay modal defined by "componentId".
14540
+ properties:
14541
+ action:
14542
+ type: string
14543
+ enum:
14544
+ - "@ui.modal.open"
14545
+ componentId:
14546
+ type: string
14547
+ props:
14548
+ $ref: "#/components/schemas/PlainObject"
14549
+ required:
14550
+ - action
14551
+ - componentId
14552
+ - props
14553
+ - type: object
14554
+ description: Action when a modal overlay is closed, with a return value to the higher level component in the stack. This action will be triggered on the parent component instance.
14555
+ properties:
14556
+ action:
14557
+ type: string
14558
+ enum:
14559
+ - "@ui.modal.close"
14560
+ returnValue:
14561
+ $ref: "#/components/schemas/PlainObject"
14562
+ required:
14563
+ - action
14564
+ - returnValue
14565
+ - type: object
14566
+ description: Action to open an url.
14567
+ properties:
14568
+ action:
14569
+ type: string
14570
+ enum:
14571
+ - "@ui.url.open"
14572
+ url:
14573
+ type: string
14574
+ required:
14575
+ - action
14576
+ - url
14577
+ - type: object
14578
+ description: Action when a link is being unfurled into a block.
14579
+ properties:
14580
+ action:
14581
+ type: string
14582
+ enum:
14583
+ - "@link.unfurl"
14584
+ url:
14585
+ type: string
14586
+ required:
14587
+ - action
14588
+ - url
14589
+ - type: object
14590
+ description: Action to update the properties stored in the related node.
14591
+ properties:
14592
+ action:
14593
+ type: string
14594
+ enum:
14595
+ - "@editor.node.updateProps"
14596
+ props:
14597
+ $ref: "#/components/schemas/PlainObject"
14598
+ required:
14599
+ - action
14600
+ - props
14601
+ ContentKitAction:
14602
+ anyOf:
14603
+ - type: object
14604
+ description: Custom action to re-render the block.
14605
+ properties:
14606
+ action:
14607
+ type: string
14608
+ additionalProperties: true
14609
+ required:
14610
+ - action
14611
+ - $ref: "#/components/schemas/ContentKitDefaultAction"
14612
+ DocumentBlockIntegration:
14613
+ type: object
14614
+ properties:
14615
+ object:
14616
+ type: string
14617
+ enum:
14618
+ - block
14619
+ type:
14620
+ type: string
14621
+ enum:
14622
+ - integration
14623
+ key:
14624
+ type: string
14625
+ data:
14626
+ type: object
14627
+ properties:
14628
+ integration:
14629
+ type: string
14630
+ description: Name of the integration
14631
+ block:
14632
+ type: string
14633
+ description: ID of the block in the integration
14634
+ props:
14635
+ description: Properties passed to the block during rendering
14636
+ $ref: "#/components/schemas/PlainObject"
14637
+ action:
14638
+ $ref: "#/components/schemas/ContentKitAction"
14639
+ url:
14640
+ type: string
14641
+ description: |
14642
+ URL associated with the content represented by the block.
14643
+ This property is set when creating a block from a URL (unfurl) to ensure
14644
+ we can convert the block back to an embed.
14645
+ fullWidth:
14646
+ type: boolean
14647
+ required:
14648
+ - integration
14649
+ - block
14650
+ - props
14651
+ isVoid:
14652
+ type: boolean
14653
+ enum:
14654
+ - true
14655
+ meta:
14656
+ type: object
14657
+ properties:
14658
+ token:
14659
+ type: string
14660
+ description: A content token that can be used to authenticate requests for cross-space integration blocks.
14661
+ spaceId:
14662
+ type: string
14663
+ description: ID of the space the integration block originates from
14664
+ required:
14665
+ - object
14666
+ - type
14667
+ - data
14668
+ - isVoid
14669
+ DocumentBlockHint:
14670
+ type: object
14671
+ properties:
14672
+ object:
14673
+ type: string
14674
+ enum:
14675
+ - block
14676
+ type:
14677
+ type: string
14678
+ enum:
14679
+ - hint
14680
+ key:
14681
+ type: string
14682
+ data:
14683
+ type: object
14684
+ properties:
14685
+ style:
14686
+ type: string
14687
+ enum:
14688
+ - info
14689
+ - warning
14690
+ - danger
14691
+ - success
14692
+ icon:
14693
+ $ref: "#/components/schemas/Icon"
14694
+ required:
14695
+ - style
14696
+ nodes:
14697
+ type: array
14698
+ items:
14699
+ oneOf:
14700
+ - $ref: "#/components/schemas/DocumentBlocksEssentials"
14701
+ - $ref: "#/components/schemas/DocumentBlockEmbed"
14702
+ - $ref: "#/components/schemas/DocumentBlockIntegration"
14703
+ isVoid:
14704
+ type: boolean
14705
+ enum:
14706
+ - false
14707
+ required:
14708
+ - object
14709
+ - type
14710
+ - data
14711
+ - nodes
14712
+ DocumentBlockQuote:
14349
14713
  type: object
14350
14714
  properties:
14351
14715
  object:
@@ -15200,37 +15564,6 @@ components:
15200
15564
  - type
15201
15565
  - data
15202
15566
  - isVoid
15203
- DocumentBlockEmbed:
15204
- type: object
15205
- properties:
15206
- object:
15207
- type: string
15208
- enum:
15209
- - block
15210
- type:
15211
- type: string
15212
- enum:
15213
- - embed
15214
- key:
15215
- type: string
15216
- data:
15217
- type: object
15218
- properties:
15219
- url:
15220
- type: string
15221
- fullWidth:
15222
- type: boolean
15223
- required:
15224
- - url
15225
- isVoid:
15226
- type: boolean
15227
- enum:
15228
- - true
15229
- required:
15230
- - object
15231
- - type
15232
- - data
15233
- - isVoid
15234
15567
  DocumentBlockReusableContent:
15235
15568
  type: object
15236
15569
  properties:
@@ -15266,98 +15599,7 @@ components:
15266
15599
  - type
15267
15600
  - data
15268
15601
  - isVoid
15269
- PlainObject:
15270
- properties: {}
15271
- additionalProperties:
15272
- oneOf:
15273
- - $ref: "#/components/schemas/PlainObject"
15274
- - type: string
15275
- - type: boolean
15276
- - type: number
15277
- - type: array
15278
- items:
15279
- oneOf:
15280
- - type: string
15281
- - type: boolean
15282
- - type: number
15283
- - $ref: "#/components/schemas/PlainObject"
15284
- ContentKitDefaultAction:
15285
- oneOf:
15286
- - type: object
15287
- description: Action to open an overlay modal defined by "componentId".
15288
- properties:
15289
- action:
15290
- type: string
15291
- enum:
15292
- - "@ui.modal.open"
15293
- componentId:
15294
- type: string
15295
- props:
15296
- $ref: "#/components/schemas/PlainObject"
15297
- required:
15298
- - action
15299
- - componentId
15300
- - props
15301
- - type: object
15302
- description: Action when a modal overlay is closed, with a return value to the higher level component in the stack. This action will be triggered on the parent component instance.
15303
- properties:
15304
- action:
15305
- type: string
15306
- enum:
15307
- - "@ui.modal.close"
15308
- returnValue:
15309
- $ref: "#/components/schemas/PlainObject"
15310
- required:
15311
- - action
15312
- - returnValue
15313
- - type: object
15314
- description: Action to open an url.
15315
- properties:
15316
- action:
15317
- type: string
15318
- enum:
15319
- - "@ui.url.open"
15320
- url:
15321
- type: string
15322
- required:
15323
- - action
15324
- - url
15325
- - type: object
15326
- description: Action when a link is being unfurled into a block.
15327
- properties:
15328
- action:
15329
- type: string
15330
- enum:
15331
- - "@link.unfurl"
15332
- url:
15333
- type: string
15334
- required:
15335
- - action
15336
- - url
15337
- - type: object
15338
- description: Action to update the properties stored in the related node.
15339
- properties:
15340
- action:
15341
- type: string
15342
- enum:
15343
- - "@editor.node.updateProps"
15344
- props:
15345
- $ref: "#/components/schemas/PlainObject"
15346
- required:
15347
- - action
15348
- - props
15349
- ContentKitAction:
15350
- anyOf:
15351
- - type: object
15352
- description: Custom action to re-render the block.
15353
- properties:
15354
- action:
15355
- type: string
15356
- additionalProperties: true
15357
- required:
15358
- - action
15359
- - $ref: "#/components/schemas/ContentKitDefaultAction"
15360
- DocumentBlockIntegration:
15602
+ DocumentBlockExpandable:
15361
15603
  type: object
15362
15604
  properties:
15363
15605
  object:
@@ -15367,71 +15609,14 @@ components:
15367
15609
  type:
15368
15610
  type: string
15369
15611
  enum:
15370
- - integration
15612
+ - expandable
15371
15613
  key:
15372
15614
  type: string
15373
- data:
15374
- type: object
15375
- properties:
15376
- integration:
15377
- type: string
15378
- description: Name of the integration
15379
- block:
15380
- type: string
15381
- description: ID of the block in the integration
15382
- props:
15383
- description: Properties passed to the block during rendering
15384
- $ref: "#/components/schemas/PlainObject"
15385
- action:
15386
- $ref: "#/components/schemas/ContentKitAction"
15387
- url:
15388
- type: string
15389
- description: |
15390
- URL associated with the content represented by the block.
15391
- This property is set when creating a block from a URL (unfurl) to ensure
15392
- we can convert the block back to an embed.
15393
- fullWidth:
15394
- type: boolean
15395
- required:
15396
- - integration
15397
- - block
15398
- - props
15399
15615
  isVoid:
15400
15616
  type: boolean
15401
15617
  enum:
15402
15618
  - true
15403
- meta:
15404
- type: object
15405
- properties:
15406
- token:
15407
- type: string
15408
- description: A content token that can be used to authenticate requests for cross-space integration blocks.
15409
- spaceId:
15410
- type: string
15411
- description: ID of the space the integration block originates from
15412
- required:
15413
- - object
15414
- - type
15415
- - data
15416
- - isVoid
15417
- DocumentBlockExpandable:
15418
- type: object
15419
- properties:
15420
- object:
15421
- type: string
15422
- enum:
15423
- - block
15424
- type:
15425
- type: string
15426
- enum:
15427
- - expandable
15428
- key:
15429
- type: string
15430
- isVoid:
15431
- type: boolean
15432
- enum:
15433
- - true
15434
- data:
15619
+ data:
15435
15620
  type: object
15436
15621
  properties:
15437
15622
  defaultExpanded:
@@ -16151,9 +16336,11 @@ components:
16151
16336
  - data
16152
16337
  - isVoid
16153
16338
  DocumentAction:
16339
+ description: Action to perform when an inline button is clicked.
16154
16340
  type: object
16155
16341
  oneOf:
16156
16342
  - type: object
16343
+ description: Open a search input, optionally prefilled with a search query.
16157
16344
  properties:
16158
16345
  action:
16159
16346
  type: string
@@ -16161,10 +16348,12 @@ components:
16161
16348
  - search
16162
16349
  query:
16163
16350
  type: string
16351
+ description: The search query to prefill.
16164
16352
  required:
16165
16353
  - action
16166
16354
  additionalProperties: false
16167
16355
  - type: object
16356
+ description: Open an AI input, optionally prefilled with a question.
16168
16357
  properties:
16169
16358
  action:
16170
16359
  type: string
@@ -16172,8 +16361,23 @@ components:
16172
16361
  - ask
16173
16362
  query:
16174
16363
  type: string
16364
+ description: The question to prefill.
16365
+ required:
16366
+ - action
16367
+ additionalProperties: false
16368
+ - type: object
16369
+ description: Open a selection input for the option identified by its slug.
16370
+ properties:
16371
+ action:
16372
+ type: string
16373
+ enum:
16374
+ - select
16375
+ slug:
16376
+ type: string
16377
+ description: The slug of the option to select.
16175
16378
  required:
16176
16379
  - action
16380
+ - slug
16177
16381
  additionalProperties: false
16178
16382
  DocumentInlineButton:
16179
16383
  type: object
@@ -17939,6 +18143,9 @@ components:
17939
18143
  type: string
17940
18144
  minLength: 1
17941
18145
  description: Title of the page.
18146
+ slug:
18147
+ description: Slug of the page in its parent, used to build the page's path. When omitted, the slug is derived from the title. The slug must be unique among the page's siblings; any collision is rejected.
18148
+ $ref: "#/components/schemas/RevisionPageSlug"
17942
18149
  emoji:
17943
18150
  description: Emoji of the page. Set to an empty string to remove it.
17944
18151
  $ref: "#/components/schemas/Emoji"
@@ -17994,7 +18201,6 @@ components:
17994
18201
  - type: object
17995
18202
  required:
17996
18203
  - operation
17997
- - title
17998
18204
  - document
17999
18205
  properties:
18000
18206
  operation:
@@ -18008,6 +18214,9 @@ components:
18008
18214
  type: integer
18009
18215
  minimum: 0
18010
18216
  description: Zero-based index to insert the page at among its siblings. If omitted, the page is appended at the end.
18217
+ ref:
18218
+ type: string
18219
+ description: Temporary local reference for the page, used only for the lifetime of this request and never persisted. Other pages inserted in the same batch can link to this page by its ref (e.g. `[Page](./<ref>.md)`), which resolves to the page's ID at apply time — regardless of operation order or the page's eventual slug. A ref must be unique within the batch and must not collide with an existing page's path.
18011
18220
  document:
18012
18221
  description: Document for the new page. When provided as markdown, its frontmatter is read to set the page metadata.
18013
18222
  $ref: "#/components/schemas/Document"
@@ -18074,6 +18283,104 @@ components:
18074
18283
  insert_page: "#/components/schemas/ChangeRequestContentChangeInsertPage"
18075
18284
  delete_page: "#/components/schemas/ChangeRequestContentChangeDeletePage"
18076
18285
  revert_page: "#/components/schemas/ChangeRequestContentChangeRevertPage"
18286
+ ChangeRequestContentUpdatePageRef:
18287
+ type: object
18288
+ required:
18289
+ - object
18290
+ - id
18291
+ - urls
18292
+ properties:
18293
+ object:
18294
+ type: string
18295
+ description: Type of Object, always equals to "page".
18296
+ enum:
18297
+ - page
18298
+ id:
18299
+ type: string
18300
+ description: Unique identifier of the page.
18301
+ urls:
18302
+ type: object
18303
+ required:
18304
+ - location
18305
+ properties:
18306
+ location:
18307
+ description: API URL to fetch the page's full, normalized content.
18308
+ $ref: "#/components/schemas/URL"
18309
+ ChangeRequestContentUpdateInsertedPage:
18310
+ type: object
18311
+ description: A page created by the operation with its resolved ID, ref as passed by the caller, and a URL to fetch its content.
18312
+ required:
18313
+ - object
18314
+ - page
18315
+ properties:
18316
+ object:
18317
+ type: string
18318
+ description: Type of Object, always equals to "created_page".
18319
+ enum:
18320
+ - created_page
18321
+ ref:
18322
+ type: string
18323
+ description: The batch-local `ref` provided on the insert operation, echoed so the caller can map their reference to the created page's ID. Absent when the operation had no ref.
18324
+ page:
18325
+ description: Reference to the created page, with a URL to fetch its normalized content.
18326
+ $ref: "#/components/schemas/ChangeRequestContentUpdatePageRef"
18327
+ ChangeRequestContentUpdateUpdatedPage:
18328
+ type: object
18329
+ description: A page updated by the operation, with a URL to fetch its content.
18330
+ required:
18331
+ - object
18332
+ - page
18333
+ properties:
18334
+ object:
18335
+ type: string
18336
+ description: Type of Object, always equals to "updated_page".
18337
+ enum:
18338
+ - updated_page
18339
+ page:
18340
+ description: Reference to the updated page, with a URL to fetch its normalized content.
18341
+ $ref: "#/components/schemas/ChangeRequestContentUpdatePageRef"
18342
+ ChangeRequestContentUpdateDeletedPage:
18343
+ type: object
18344
+ description: A page deleted by the batch. Only its ID is returned, as it no longer has content.
18345
+ required:
18346
+ - object
18347
+ - page
18348
+ properties:
18349
+ object:
18350
+ type: string
18351
+ description: Type of Object, always equals to "deleted_page".
18352
+ enum:
18353
+ - deleted_page
18354
+ page:
18355
+ type: string
18356
+ description: ID of the deleted page.
18357
+ ChangeRequestContentUpdateChange:
18358
+ description: An outcome of a content change.
18359
+ oneOf:
18360
+ - $ref: "#/components/schemas/ChangeRequestContentUpdateInsertedPage"
18361
+ - $ref: "#/components/schemas/ChangeRequestContentUpdateUpdatedPage"
18362
+ - $ref: "#/components/schemas/ChangeRequestContentUpdateDeletedPage"
18363
+ discriminator:
18364
+ propertyName: object
18365
+ mapping:
18366
+ created_page: "#/components/schemas/ChangeRequestContentUpdateInsertedPage"
18367
+ updated_page: "#/components/schemas/ChangeRequestContentUpdateUpdatedPage"
18368
+ deleted_page: "#/components/schemas/ChangeRequestContentUpdateDeletedPage"
18369
+ ChangeRequestContentUpdate:
18370
+ type: object
18371
+ description: The result of applying a batch of content changes.
18372
+ required:
18373
+ - changeRequest
18374
+ - changes
18375
+ properties:
18376
+ changeRequest:
18377
+ description: The change request after the batch was applied.
18378
+ $ref: "#/components/schemas/ChangeRequest"
18379
+ changes:
18380
+ type: array
18381
+ description: One entry per affected page (deduplicated), in the order the pages were first touched by the batch.
18382
+ items:
18383
+ $ref: "#/components/schemas/ChangeRequestContentUpdateChange"
18077
18384
  RevisionPageType:
18078
18385
  type: string
18079
18386
  enum:
@@ -21743,6 +22050,11 @@ components:
21743
22050
  condition:
21744
22051
  description: Conditional expression used to evaluate whether the site space should be shown to the site's visitor.
21745
22052
  $ref: "#/components/schemas/Expression"
22053
+ pageId:
22054
+ oneOf:
22055
+ - type: string
22056
+ - type: "null"
22057
+ description: Custom home page within the space, rendered at the site space's path root instead of the space's default landing page.
21746
22058
  draft:
21747
22059
  type: boolean
21748
22060
  description: Whether the site space is draft and not live.
@@ -23829,6 +24141,102 @@ components:
23829
24141
  - siteId
23830
24142
  discriminator:
23831
24143
  propertyName: type
24144
+ GitSyncInstallationProvider:
24145
+ type: string
24146
+ description: The provider of the Git Sync installation.
24147
+ enum:
24148
+ - github
24149
+ - gitlab
24150
+ GitRepositoryConnection:
24151
+ type: object
24152
+ properties:
24153
+ object:
24154
+ type: string
24155
+ enum:
24156
+ - git-repository-connection
24157
+ id:
24158
+ type: string
24159
+ description: Unique identifier of the repository connection.
24160
+ provider:
24161
+ $ref: "#/components/schemas/GitSyncInstallationProvider"
24162
+ repositoryId:
24163
+ type: string
24164
+ description: Repository identifier assigned by the provider.
24165
+ repositoryName:
24166
+ type: string
24167
+ description: Full repository name assigned by the provider.
24168
+ repositoryUrl:
24169
+ type: string
24170
+ format: uri
24171
+ description: URL of the repository on the provider.
24172
+ defaultBranch:
24173
+ type: string
24174
+ description: Default branch reported by the provider.
24175
+ authState:
24176
+ type: string
24177
+ enum:
24178
+ - pending
24179
+ - active
24180
+ - unauthenticated
24181
+ capabilities:
24182
+ type: object
24183
+ description: Provider operations available to this repository connection.
24184
+ properties:
24185
+ pullRequests:
24186
+ type: boolean
24187
+ description: Whether the connection can create and update GitHub pull requests or GitLab merge requests.
24188
+ commitStatuses:
24189
+ type: boolean
24190
+ description: Whether the connection can publish GitBook synchronization results as provider commit statuses.
24191
+ required:
24192
+ - pullRequests
24193
+ - commitStatuses
24194
+ createdAt:
24195
+ $ref: "#/components/schemas/Timestamp"
24196
+ updatedAt:
24197
+ $ref: "#/components/schemas/Timestamp"
24198
+ required:
24199
+ - object
24200
+ - id
24201
+ - provider
24202
+ - repositoryId
24203
+ - repositoryName
24204
+ - repositoryUrl
24205
+ - authState
24206
+ - capabilities
24207
+ - createdAt
24208
+ - updatedAt
24209
+ GitRepositoryRef:
24210
+ type: object
24211
+ properties:
24212
+ object:
24213
+ type: string
24214
+ enum:
24215
+ - git-repository-ref
24216
+ id:
24217
+ type: string
24218
+ description: Unique identifier of the repository ref.
24219
+ name:
24220
+ type: string
24221
+ description: Fully qualified provider ref name.
24222
+ type:
24223
+ type: string
24224
+ enum:
24225
+ - branch
24226
+ - tag
24227
+ - change-request-head
24228
+ latestObservedCommitId:
24229
+ type: string
24230
+ latestImportedCommitId:
24231
+ type: string
24232
+ updatedAt:
24233
+ $ref: "#/components/schemas/Timestamp"
24234
+ required:
24235
+ - object
24236
+ - id
24237
+ - name
24238
+ - type
24239
+ - updatedAt
23832
24240
  GitSyncInstallation:
23833
24241
  allOf:
23834
24242
  - $ref: "#/components/schemas/GitSyncInstallationSetup"
@@ -23841,10 +24249,17 @@ components:
23841
24249
  id:
23842
24250
  type: string
23843
24251
  description: Unique identifier of the Git Sync installation.
24252
+ parentInstallationId:
24253
+ type: string
24254
+ description: The ID of the parent Git Sync installation, if any.
23844
24255
  target:
23845
24256
  $ref: "#/components/schemas/GitSyncInstallationTarget"
23846
24257
  status:
23847
24258
  $ref: "#/components/schemas/GitSyncInstallationStatus"
24259
+ repositoryConnection:
24260
+ $ref: "#/components/schemas/GitRepositoryConnection"
24261
+ repositoryRef:
24262
+ $ref: "#/components/schemas/GitRepositoryRef"
23848
24263
  createdAt:
23849
24264
  $ref: "#/components/schemas/Timestamp"
23850
24265
  createdBy:
@@ -24415,6 +24830,10 @@ components:
24415
24830
  items:
24416
24831
  $ref: "#/components/schemas/CustomizationSuggestedQuestion"
24417
24832
  maxItems: 5
24833
+ CustomizationAIInstructions:
24834
+ type: string
24835
+ description: Additional instructions for the AI Assistant, injected after the base system prompt. Use them to adjust tone of voice and contribute site-specific knowledge. These instructions refine, but never override, the assistant's built-in guardrails. Only available to site admins and never exposed on the published site.
24836
+ maxLength: 10000
24418
24837
  CustomizationPageActionType:
24419
24838
  type: string
24420
24839
  description: Type of a built-in page action that can be displayed in the page actions menu of a published page.
@@ -24645,6 +25064,8 @@ components:
24645
25064
  $ref: "#/components/schemas/CustomizationAIMode"
24646
25065
  suggestions:
24647
25066
  $ref: "#/components/schemas/CustomizationSuggestedQuestions"
25067
+ instructions:
25068
+ $ref: "#/components/schemas/CustomizationAIInstructions"
24648
25069
  required:
24649
25070
  - mode
24650
25071
  advancedCustomization:
@@ -25311,6 +25732,14 @@ components:
25311
25732
  Findings source filter matching evidence coming from a given connection,
25312
25733
  encoded as `connection:<connectionId>`.
25313
25734
  pattern: ^connection:.+$
25735
+ SiteFindingOrderBy:
25736
+ type: string
25737
+ enum:
25738
+ - updatedAt
25739
+ - severity
25740
+ - questions
25741
+ default: updatedAt
25742
+ description: The field to sort site findings by. `updatedAt` returns the most recently updated findings first. `severity` returns the most severe findings first. `questions` returns the most asked-about findings first. Defaults to 'updatedAt'.
25314
25743
  SiteFindingTitle:
25315
25744
  type: string
25316
25745
  description: Short finding title
@@ -25573,6 +26002,71 @@ components:
25573
26002
  - askedAt
25574
26003
  - stats
25575
26004
  - urls
26005
+ SiteFindingStatsStatuses:
26006
+ type: object
26007
+ description: Count of findings by status. Candidate findings are never counted.
26008
+ properties:
26009
+ open:
26010
+ type: number
26011
+ description: Count of findings surfaced to users and still under investigation.
26012
+ done:
26013
+ type: number
26014
+ description: Count of findings that have been resolved.
26015
+ canceled:
26016
+ type: number
26017
+ description: Count of findings that have been canceled.
26018
+ required:
26019
+ - open
26020
+ - done
26021
+ - canceled
26022
+ SiteFindingStatsSeverities:
26023
+ type: object
26024
+ description: Count of findings by estimated end-user severity.
26025
+ properties:
26026
+ low:
26027
+ type: number
26028
+ description: Count of findings with a low estimated severity.
26029
+ medium:
26030
+ type: number
26031
+ description: Count of findings with a medium estimated severity.
26032
+ high:
26033
+ type: number
26034
+ description: Count of findings with a high estimated severity.
26035
+ required:
26036
+ - low
26037
+ - medium
26038
+ - high
26039
+ SiteFindingStatsConnectors:
26040
+ type: object
26041
+ description: Count of findings by the connector their evidence came from, keyed by connector (e.g. `builtin:intercom`). A finding is counted once per connector that contributed at least one piece of evidence to it, so the counts can add up to more than the total.
26042
+ additionalProperties:
26043
+ type: number
26044
+ SiteFindingStats:
26045
+ type: object
26046
+ description: Aggregated stats for the findings identified on a site.
26047
+ properties:
26048
+ total:
26049
+ type: number
26050
+ description: Total count of findings included in the aggregation.
26051
+ statuses:
26052
+ $ref: "#/components/schemas/SiteFindingStatsStatuses"
26053
+ severities:
26054
+ $ref: "#/components/schemas/SiteFindingStatsSeverities"
26055
+ connectors:
26056
+ $ref: "#/components/schemas/SiteFindingStatsConnectors"
26057
+ questions:
26058
+ type: number
26059
+ description: Count of findings with at least one piece of evidence coming from a site question.
26060
+ mergedChangeRequests:
26061
+ type: number
26062
+ description: Count of change requests created to fix a finding that have been merged.
26063
+ required:
26064
+ - total
26065
+ - statuses
26066
+ - severities
26067
+ - connectors
26068
+ - questions
26069
+ - mergedChangeRequests
25576
26070
  ContextConnectionLabel:
25577
26071
  type: string
25578
26072
  description: Optional label for the connection
@@ -28143,21 +28637,8 @@ components:
28143
28637
  type: string
28144
28638
  enum:
28145
28639
  - agent_feedback
28146
- feedback:
28147
- type: object
28148
- properties:
28149
- content:
28150
- type: string
28151
- minLength: 1
28152
- maxLength: 2048
28153
- category:
28154
- $ref: "#/components/schemas/SiteFindingType"
28155
- required:
28156
- - content
28157
- - category
28158
28640
  required:
28159
28641
  - type
28160
- - feedback
28161
28642
  SiteInsightsEventAskQuestion:
28162
28643
  allOf:
28163
28644
  - $ref: "#/components/schemas/SiteInsightsEventBase"
@@ -30063,6 +30544,18 @@ components:
30063
30544
  type: string
30064
30545
  required:
30065
30546
  - contents
30547
+ APIIntercomMessengerToken:
30548
+ type: object
30549
+ properties:
30550
+ token:
30551
+ type: string
30552
+ description: Short-lived JWT used to authenticate the user with Intercom Messenger
30553
+ expiresAt:
30554
+ type: integer
30555
+ description: Unix timestamp in seconds when the token expires
30556
+ required:
30557
+ - token
30558
+ - expiresAt
30066
30559
  SignedURL:
30067
30560
  type: object
30068
30561
  properties:
@@ -30490,12 +30983,6 @@ components:
30490
30983
  description: JWT token generated for a authenticated access session.
30491
30984
  unsignedClaims:
30492
30985
  $ref: "#/components/schemas/PlainObject"
30493
- GitSyncInstallationProvider:
30494
- type: string
30495
- description: The provider of the Git Sync installation.
30496
- enum:
30497
- - github
30498
- - gitlab
30499
30986
  GitSyncGitHubRepository:
30500
30987
  type: object
30501
30988
  description: GitHub repository that can be selected for Git Sync.
@@ -31103,11 +31590,6 @@ components:
31103
31590
  - tag_created
31104
31591
  - tag_deleted
31105
31592
  - tag_edited
31106
- GitSyncOperationDirection:
31107
- type: string
31108
- enum:
31109
- - export
31110
- - import
31111
31593
  GitSyncOperationStage:
31112
31594
  type: string
31113
31595
  description: |
@@ -31203,10 +31685,11 @@ components:
31203
31685
  A space — a single content unit in the site's navigation tree. Discriminated
31204
31686
  by `type: space`.
31205
31687
 
31206
- The space's content lives in the synced repository at the directory pointed
31207
- to by `content.directory`. Hierarchy comes from where the space appears in
31208
- the YAML (under a section, a section group, or at the root), not from an
31209
- explicit parent reference.
31688
+ The space's content either lives in the synced repository at the directory
31689
+ pointed to by `content.directory`, or does not inherit the site's repository
31690
+ when `content.directory` is `null`. Hierarchy comes from where the space
31691
+ appears in the YAML (under a section, a section group, or at the root), not
31692
+ from an explicit parent reference.
31210
31693
  properties:
31211
31694
  type:
31212
31695
  type: string
@@ -31241,12 +31724,15 @@ components:
31241
31724
  content:
31242
31725
  type: object
31243
31726
  additionalProperties: false
31244
- description: Where the space's content lives in the synced repository.
31727
+ description: Where the space's content is managed.
31245
31728
  properties:
31246
31729
  directory:
31247
- type: string
31248
- description: Repository-relative directory containing this space's content.
31249
- minLength: 1
31730
+ oneOf:
31731
+ - type: string
31732
+ description: Repository-relative directory containing this space's content.
31733
+ minLength: 1
31734
+ - type: "null"
31735
+ description: The space does not inherit the site's repository.
31250
31736
  language:
31251
31737
  $ref: "#/components/schemas/TranslationLanguage"
31252
31738
  required:
@@ -31292,9 +31778,6 @@ components:
31292
31778
  default:
31293
31779
  type: boolean
31294
31780
  description: Whether this is the default section for the site.
31295
- draft:
31296
- type: boolean
31297
- description: Whether the section is draft and not live.
31298
31781
  path:
31299
31782
  $ref: "#/components/schemas/SiteSectionPath"
31300
31783
  condition:
@@ -31324,542 +31807,6 @@ components:
31324
31807
  three node types: a section group, a section, or a space.
31325
31808
  items:
31326
31809
  $ref: "#/components/schemas/GitSyncSiteStructureNode"
31327
- GitSyncSiteCustomizationFontSource:
31328
- type: string
31329
- description: |
31330
- Reserved repository-relative path to the font file:
31331
- `.gitbook/assets/<key>-<weight>.<ext>`, where `<key>` is the parent
31332
- font definition's `key`, `<weight>` is this face's `weight`, and
31333
- `<ext>` is one of `woff2`, `woff`.
31334
-
31335
- For example, a font with `key: brand` and a `700` face is read from
31336
- `.gitbook/assets/brand-700.woff2`. Any other path is rejected.
31337
- minLength: 1
31338
- GitSyncSiteCustomizationFontDefinition:
31339
- type: object
31340
- description: |
31341
- Custom font definition for a `site.fonts[]` entry. Referenced from
31342
- `customization.styling.font` or `customization.styling.monospaceFont` via
31343
- its `key`.
31344
-
31345
- Rules enforced on a definition:
31346
- - It must declare exactly one face for the `400` weight and one for the
31347
- `700` weight; the `600` weight is optional. No other weights are allowed,
31348
- and a weight may not be declared more than once.
31349
- - Each face has a single source file whose `url` is the reserved repository
31350
- asset path `.gitbook/assets/<key>-<weight>.<ext>` (`<ext>` is `woff2` or
31351
- `woff`). For example a definition with `key: brand` is read from
31352
- `.gitbook/assets/brand-400.woff2` and `.gitbook/assets/brand-700.woff2`.
31353
- properties:
31354
- key:
31355
- type: string
31356
- description: |
31357
- Stable identifier referenced from `styling.font` /
31358
- `styling.monospaceFont`, and used as the prefix of each face's
31359
- reserved asset path (`.gitbook/assets/<key>-<weight>.<ext>`).
31360
- minLength: 1
31361
- pattern: ^[A-Za-z0-9][A-Za-z0-9_-]*$
31362
- fontFamily:
31363
- $ref: "#/components/schemas/FontFamily"
31364
- fontFaces:
31365
- type: object
31366
- description: |
31367
- Font-face declarations keyed by weight, each specifying its single
31368
- source file. The `400` and `700` weights are required; `600` is
31369
- optional.
31370
- properties:
31371
- "400":
31372
- $ref: "#/components/schemas/GitSyncSiteCustomizationFontSource"
31373
- "600":
31374
- $ref: "#/components/schemas/GitSyncSiteCustomizationFontSource"
31375
- "700":
31376
- $ref: "#/components/schemas/GitSyncSiteCustomizationFontSource"
31377
- required:
31378
- - "400"
31379
- - "700"
31380
- additionalProperties: false
31381
- required:
31382
- - key
31383
- - fontFamily
31384
- - fontFaces
31385
- GitSyncSiteCustomizationThemedColor:
31386
- type: object
31387
- description: |
31388
- Themed color (light + dark).
31389
- properties:
31390
- light:
31391
- $ref: "#/components/schemas/Color"
31392
- dark:
31393
- $ref: "#/components/schemas/Color"
31394
- required:
31395
- - light
31396
- - dark
31397
- GitSyncSiteCustomizationTint:
31398
- type: object
31399
- description: |
31400
- Tint configuration.
31401
- properties:
31402
- color:
31403
- $ref: "#/components/schemas/GitSyncSiteCustomizationThemedColor"
31404
- required:
31405
- - color
31406
- GitSyncSiteCustomizationFontReference:
31407
- type: object
31408
- description: |
31409
- Reference to a custom font defined under `site.fonts[]`. Matches by `key`.
31410
- properties:
31411
- key:
31412
- type: string
31413
- description: Matches the `key` of an entry in `site.fonts[]`.
31414
- minLength: 1
31415
- required:
31416
- - key
31417
- GitSyncSiteCustomizationFont:
31418
- description: |
31419
- Body font for the site. Either one of the built-in `CustomizationDefaultFont`
31420
- values, or a reference to a custom font declared in `site.fonts[]`.
31421
- oneOf:
31422
- - $ref: "#/components/schemas/CustomizationDefaultFont"
31423
- - $ref: "#/components/schemas/GitSyncSiteCustomizationFontReference"
31424
- GitSyncSiteCustomizationMonospaceFont:
31425
- description: |
31426
- Monospace font for the site. Either one of the built-in
31427
- `CustomizationDefaultMonospaceFont` values, or a reference to a custom font
31428
- declared in `site.fonts[]`.
31429
- oneOf:
31430
- - $ref: "#/components/schemas/CustomizationDefaultMonospaceFont"
31431
- - $ref: "#/components/schemas/GitSyncSiteCustomizationFontReference"
31432
- GitSyncSiteCustomizationThemedCodeTheme:
31433
- type: object
31434
- description: |
31435
- Themed code theme (light + dark).
31436
- properties:
31437
- light:
31438
- $ref: "#/components/schemas/CustomizationCodeTheme"
31439
- dark:
31440
- $ref: "#/components/schemas/CustomizationCodeTheme"
31441
- required:
31442
- - light
31443
- - dark
31444
- GitSyncSiteCustomizationCodeThemes:
31445
- type: object
31446
- description: |
31447
- Code-block syntax-highlighting themes — one for default code blocks and one for OpenAPI request/response samples.
31448
- properties:
31449
- default:
31450
- $ref: "#/components/schemas/GitSyncSiteCustomizationThemedCodeTheme"
31451
- openapi:
31452
- $ref: "#/components/schemas/GitSyncSiteCustomizationThemedCodeTheme"
31453
- required:
31454
- - default
31455
- - openapi
31456
- GitSyncSiteCustomizationSidebar:
31457
- type: object
31458
- description: |
31459
- Sidebar style settings.
31460
- properties:
31461
- background:
31462
- $ref: "#/components/schemas/CustomizationSidebarBackgroundStyle"
31463
- list:
31464
- $ref: "#/components/schemas/CustomizationSidebarListStyle"
31465
- required:
31466
- - background
31467
- - list
31468
- GitSyncSiteCustomizationStyling:
31469
- type: object
31470
- description: |
31471
- Styling settings.
31472
- properties:
31473
- theme:
31474
- $ref: "#/components/schemas/CustomizationTheme"
31475
- primaryColor:
31476
- $ref: "#/components/schemas/GitSyncSiteCustomizationThemedColor"
31477
- tint:
31478
- $ref: "#/components/schemas/GitSyncSiteCustomizationTint"
31479
- infoColor:
31480
- $ref: "#/components/schemas/GitSyncSiteCustomizationThemedColor"
31481
- successColor:
31482
- $ref: "#/components/schemas/GitSyncSiteCustomizationThemedColor"
31483
- warningColor:
31484
- $ref: "#/components/schemas/GitSyncSiteCustomizationThemedColor"
31485
- dangerColor:
31486
- $ref: "#/components/schemas/GitSyncSiteCustomizationThemedColor"
31487
- corners:
31488
- $ref: "#/components/schemas/CustomizationCorners"
31489
- depth:
31490
- $ref: "#/components/schemas/CustomizationDepth"
31491
- links:
31492
- $ref: "#/components/schemas/CustomizationLinksStyle"
31493
- font:
31494
- $ref: "#/components/schemas/GitSyncSiteCustomizationFont"
31495
- monospaceFont:
31496
- $ref: "#/components/schemas/GitSyncSiteCustomizationMonospaceFont"
31497
- icons:
31498
- $ref: "#/components/schemas/CustomizationIconsStyle"
31499
- codeTheme:
31500
- $ref: "#/components/schemas/GitSyncSiteCustomizationCodeThemes"
31501
- sidebar:
31502
- $ref: "#/components/schemas/GitSyncSiteCustomizationSidebar"
31503
- search:
31504
- $ref: "#/components/schemas/CustomizationSearchStyle"
31505
- GitSyncSiteCustomizationAssetPath:
31506
- type: string
31507
- description: |
31508
- Repository-relative path to an asset in a site Git Sync, e.g.
31509
- `.gitbook/assets/header-logo-light.svg`. Absolute URLs are not accepted
31510
- here — Git Sync assets must live in the synced repository under
31511
- `.gitbook/assets/`.
31512
-
31513
- This is the shared base type and only validates the `.gitbook/assets/`
31514
- prefix. Each field that uses it additionally reserves a specific filename
31515
- and set of allowed extensions (e.g. the header logo must be
31516
- `header-logo-light.<ext>` / `header-logo-dark.<ext>`); see the description
31517
- on the consuming field for the exact reserved path.
31518
- pattern: ^\.gitbook/assets/.+
31519
- maxLength: 2048
31520
- GitSyncSiteCustomizationThemedAssetPath:
31521
- type: object
31522
- description: |
31523
- Light/dark variants of a Git Sync repository asset path. Used for logos and
31524
- favicons that switch with the active theme. Both variants are required.
31525
-
31526
- Each consuming field reserves the exact light/dark filenames and allowed
31527
- extensions (e.g. header logo → `header-logo-light.<ext>` /
31528
- `header-logo-dark.<ext>`); see the description on the consuming field.
31529
- properties:
31530
- light:
31531
- $ref: "#/components/schemas/GitSyncSiteCustomizationAssetPath"
31532
- dark:
31533
- $ref: "#/components/schemas/GitSyncSiteCustomizationAssetPath"
31534
- required:
31535
- - light
31536
- - dark
31537
- GitSyncSiteCustomizationFavicon:
31538
- description: |
31539
- Favicon for the published site. The `icon` variant references a repository asset path; the `emoji` variant uses a single emoji character;
31540
- oneOf:
31541
- - type: object
31542
- properties:
31543
- icon:
31544
- description: |
31545
- Themed favicon. Each variant must use its reserved repository
31546
- asset path — light: `.gitbook/assets/favicon-light.<ext>`,
31547
- dark: `.gitbook/assets/favicon-dark.<ext>`, where `<ext>` is
31548
- the image's file extension (e.g. `png`, `svg`, `ico`). Any
31549
- other filename is rejected.
31550
- $ref: "#/components/schemas/GitSyncSiteCustomizationThemedAssetPath"
31551
- required:
31552
- - icon
31553
- - type: object
31554
- properties:
31555
- emoji:
31556
- $ref: "#/components/schemas/Emoji"
31557
- required:
31558
- - emoji
31559
- GitSyncSiteCustomizationContentLinkTo:
31560
- type: string
31561
- description: |
31562
- Link destination, written as a path-string in YAML. Same format as
31563
- markdown content links, e.g. `https://example.com`, `/pages/<id>`,
31564
- `/spaces/<id>/pages/<id>`, `#anchor`, `/files/<id>`, `/spaces/<id>`.
31565
- GitSyncSiteCustomizationContentLink:
31566
- type: object
31567
- description: |
31568
- A label plus a destination, used inside header items, footer groups, and announcements.
31569
- properties:
31570
- title:
31571
- $ref: "#/components/schemas/CustomizationContentLinkTitle"
31572
- localizedTitle:
31573
- description: Localized overrides for the link title, keyed by locale.
31574
- $ref: "#/components/schemas/LocalizedString64"
31575
- to:
31576
- $ref: "#/components/schemas/GitSyncSiteCustomizationContentLinkTo"
31577
- required:
31578
- - title
31579
- - to
31580
- GitSyncSiteCustomizationHeaderItem:
31581
- type: object
31582
- description: |
31583
- A single item in the published site's top navigation bar.
31584
- properties:
31585
- title:
31586
- type: string
31587
- localizedTitle:
31588
- description: Localized overrides for the header item title, keyed by locale.
31589
- $ref: "#/components/schemas/LocalizedString"
31590
- style:
31591
- type: string
31592
- enum:
31593
- - link
31594
- - button-primary
31595
- - button-secondary
31596
- to:
31597
- description: |
31598
- Header item destination. Use `null` for items that act as a
31599
- dropdown root without a link of their own.
31600
- oneOf:
31601
- - $ref: "#/components/schemas/GitSyncSiteCustomizationContentLinkTo"
31602
- - type: "null"
31603
- links:
31604
- type: array
31605
- description: Sub-links shown as a dropdown under this header item. Empty array means no dropdown.
31606
- items:
31607
- $ref: "#/components/schemas/GitSyncSiteCustomizationContentLink"
31608
- condition:
31609
- description: Conditional expression evaluated to decide whether the item is shown to the visitor.
31610
- $ref: "#/components/schemas/Expression"
31611
- required:
31612
- - title
31613
- - to
31614
- - links
31615
- GitSyncSiteCustomizationHeader:
31616
- type: object
31617
- description: |
31618
- Header settings.
31619
- properties:
31620
- logo:
31621
- description: |
31622
- Themed header logo. Each variant must use its reserved repository
31623
- asset path — light: `.gitbook/assets/header-logo-light.<ext>`, dark:
31624
- `.gitbook/assets/header-logo-dark.<ext>`, where `<ext>` is the
31625
- image's file extension (e.g. `png`, `svg`). Any other filename is
31626
- rejected.
31627
- $ref: "#/components/schemas/GitSyncSiteCustomizationThemedAssetPath"
31628
- primaryLink:
31629
- $ref: "#/components/schemas/GitSyncSiteCustomizationContentLinkTo"
31630
- links:
31631
- type: array
31632
- items:
31633
- $ref: "#/components/schemas/GitSyncSiteCustomizationHeaderItem"
31634
- GitSyncSiteCustomizationFooterGroup:
31635
- type: object
31636
- description: |
31637
- A group of links shown in the published site's footer.
31638
- properties:
31639
- title:
31640
- type: string
31641
- localizedTitle:
31642
- description: Localized overrides for the footer group title, keyed by locale.
31643
- $ref: "#/components/schemas/LocalizedString"
31644
- links:
31645
- type: array
31646
- items:
31647
- $ref: "#/components/schemas/GitSyncSiteCustomizationContentLink"
31648
- required:
31649
- - title
31650
- - links
31651
- GitSyncSiteCustomizationFooter:
31652
- type: object
31653
- description: |
31654
- Footer settings.
31655
- properties:
31656
- logo:
31657
- description: |
31658
- Themed footer logo. Each variant must use its reserved repository
31659
- asset path — light: `.gitbook/assets/footer-logo-light.<ext>`, dark:
31660
- `.gitbook/assets/footer-logo-dark.<ext>`, where `<ext>` is the
31661
- image's file extension (e.g. `png`, `svg`). Any other filename is
31662
- rejected.
31663
- $ref: "#/components/schemas/GitSyncSiteCustomizationThemedAssetPath"
31664
- groups:
31665
- type: array
31666
- items:
31667
- $ref: "#/components/schemas/GitSyncSiteCustomizationFooterGroup"
31668
- copyright:
31669
- type: string
31670
- maxLength: 300
31671
- GitSyncSiteCustomizationAnnouncement:
31672
- type: object
31673
- description: |
31674
- Announcement banner shown above the published site.
31675
- properties:
31676
- enabled:
31677
- description: Whether to show the site's announcement.
31678
- type: boolean
31679
- message:
31680
- $ref: "#/components/schemas/CustomizationAnnouncementMessage"
31681
- localizedMessage:
31682
- description: Localized overrides for the announcement message, keyed by locale.
31683
- $ref: "#/components/schemas/LocalizedString128"
31684
- link:
31685
- description: The content or URL the announcement links to when clicked.
31686
- $ref: "#/components/schemas/GitSyncSiteCustomizationContentLink"
31687
- style:
31688
- description: Semantic style of the announcement banner.
31689
- type: string
31690
- enum:
31691
- - info
31692
- - warning
31693
- - danger
31694
- - success
31695
- required:
31696
- - enabled
31697
- - message
31698
- - style
31699
- GitSyncSiteCustomizationThemeModes:
31700
- type: object
31701
- description: |
31702
- Dark/light theme mode settings.
31703
- properties:
31704
- default:
31705
- $ref: "#/components/schemas/CustomizationDefaultThemeMode"
31706
- toggeable:
31707
- description: Whether readers can switch between dark and light mode.
31708
- type: boolean
31709
- required:
31710
- - default
31711
- - toggeable
31712
- GitSyncSiteCustomizationFeedback:
31713
- type: object
31714
- description: |
31715
- Reader feedback settings.
31716
- properties:
31717
- enabled:
31718
- type: boolean
31719
- description: Whether reader feedback gathering is enabled.
31720
- required:
31721
- - enabled
31722
- GitSyncSiteCustomizationAI:
31723
- type: object
31724
- description: |
31725
- AI assistant settings.
31726
- properties:
31727
- mode:
31728
- $ref: "#/components/schemas/CustomizationAIMode"
31729
- suggestions:
31730
- $ref: "#/components/schemas/CustomizationSuggestedQuestions"
31731
- required:
31732
- - mode
31733
- GitSyncSiteCustomizationPageActions:
31734
- type: array
31735
- description: |
31736
- Ordered page-level action buttons exposed in the published site's page menu.
31737
- uniqueItems: true
31738
- items:
31739
- $ref: "#/components/schemas/CustomizationPageActionType"
31740
- GitSyncSiteCustomizationExternalLinks:
31741
- type: object
31742
- description: |
31743
- External link behavior.
31744
- properties:
31745
- target:
31746
- $ref: "#/components/schemas/SiteExternalLinksTarget"
31747
- required:
31748
- - target
31749
- GitSyncSiteCustomizationPagination:
31750
- type: object
31751
- description: |
31752
- Pagination navigation settings.
31753
- properties:
31754
- enabled:
31755
- type: boolean
31756
- description: Whether the prev/next pagination navigation is shown on pages.
31757
- required:
31758
- - enabled
31759
- GitSyncSiteCustomizationPrivacyPolicy:
31760
- type: object
31761
- description: |
31762
- Privacy policy link shown on the published site.
31763
- properties:
31764
- url:
31765
- $ref: "#/components/schemas/URL"
31766
- GitSyncSiteCustomizationSocialPreview:
31767
- type: object
31768
- description: |
31769
- Social preview asset.
31770
- properties:
31771
- url:
31772
- description: |
31773
- Reserved repository asset path for the social preview image:
31774
- `.gitbook/assets/social-preview.<ext>`, where `<ext>` is the
31775
- image's file extension (e.g. `png`, `jpg`). Any other filename is
31776
- rejected.
31777
- $ref: "#/components/schemas/GitSyncSiteCustomizationAssetPath"
31778
- GitSyncSiteCustomizationSocialAccount:
31779
- type: object
31780
- description: |
31781
- A single social account entry.
31782
- properties:
31783
- platform:
31784
- $ref: "#/components/schemas/SiteSocialAccountPlatform"
31785
- handle:
31786
- $ref: "#/components/schemas/SiteSocialAccountHandle"
31787
- display:
31788
- type: object
31789
- properties:
31790
- footer:
31791
- type: boolean
31792
- header:
31793
- type: boolean
31794
- required:
31795
- - footer
31796
- - header
31797
- required:
31798
- - platform
31799
- - handle
31800
- - display
31801
- GitSyncSiteCustomizationInsights:
31802
- type: object
31803
- description: |
31804
- Visitor insights settings.
31805
- properties:
31806
- trackingCookie:
31807
- type: boolean
31808
- description: Whether GitBook identifies visitors on the site using a cookie.
31809
- required:
31810
- - trackingCookie
31811
- GitSyncSiteCustomization:
31812
- type: object
31813
- description: |
31814
- Customization settings for the published site, authored in `docs.yaml`.
31815
-
31816
- Every top-level field is optional — a Git Sync YAML is a **sparse override** of
31817
- the live customization. Fields you don't include stay at whatever the site
31818
- has as default.
31819
-
31820
- Custom fonts referenced from `styling.font` / `styling.monospaceFont` must
31821
- have a matching definition under `site.fonts[]`.
31822
- properties:
31823
- publishedTitle:
31824
- description: Title to use for the published site. If omitted, falls back to the default site title.
31825
- $ref: "#/components/schemas/SiteTitle"
31826
- localizedPublishedTitles:
31827
- description: Localized titles for the published site, keyed by locale.
31828
- $ref: "#/components/schemas/LocalizedString128"
31829
- styling:
31830
- $ref: "#/components/schemas/GitSyncSiteCustomizationStyling"
31831
- favicon:
31832
- $ref: "#/components/schemas/GitSyncSiteCustomizationFavicon"
31833
- header:
31834
- $ref: "#/components/schemas/GitSyncSiteCustomizationHeader"
31835
- footer:
31836
- $ref: "#/components/schemas/GitSyncSiteCustomizationFooter"
31837
- announcement:
31838
- $ref: "#/components/schemas/GitSyncSiteCustomizationAnnouncement"
31839
- themeModes:
31840
- $ref: "#/components/schemas/GitSyncSiteCustomizationThemeModes"
31841
- feedback:
31842
- $ref: "#/components/schemas/GitSyncSiteCustomizationFeedback"
31843
- ai:
31844
- $ref: "#/components/schemas/GitSyncSiteCustomizationAI"
31845
- pageActions:
31846
- $ref: "#/components/schemas/GitSyncSiteCustomizationPageActions"
31847
- externalLinks:
31848
- $ref: "#/components/schemas/GitSyncSiteCustomizationExternalLinks"
31849
- pagination:
31850
- $ref: "#/components/schemas/GitSyncSiteCustomizationPagination"
31851
- privacyPolicy:
31852
- $ref: "#/components/schemas/GitSyncSiteCustomizationPrivacyPolicy"
31853
- socialPreview:
31854
- $ref: "#/components/schemas/GitSyncSiteCustomizationSocialPreview"
31855
- socialAccounts:
31856
- type: array
31857
- description: Social accounts to surface on the site.
31858
- items:
31859
- $ref: "#/components/schemas/GitSyncSiteCustomizationSocialAccount"
31860
- maxItems: 10
31861
- insights:
31862
- $ref: "#/components/schemas/GitSyncSiteCustomizationInsights"
31863
31810
  GitSyncSiteConfig:
31864
31811
  type: object
31865
31812
  description: |
@@ -31884,13 +31831,6 @@ components:
31884
31831
  minLength: 1
31885
31832
  structure:
31886
31833
  $ref: "#/components/schemas/GitSyncSiteStructure"
31887
- fonts:
31888
- type: array
31889
- description: Custom font definitions referenced from `site.customization.styling`.
31890
- items:
31891
- $ref: "#/components/schemas/GitSyncSiteCustomizationFontDefinition"
31892
- customization:
31893
- $ref: "#/components/schemas/GitSyncSiteCustomization"
31894
31834
  required:
31895
31835
  - title
31896
31836
  - structure