@gitbook/api 0.195.0 → 0.196.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
@@ -1642,6 +1642,7 @@ paths:
1642
1642
  summary: Update a change request's subject, description, or status
1643
1643
  description: Updates the metadata of a change request. Use this to rename a change request, add context before requesting a review, or change the workflow status without merging. To update page content within the change request, use the content endpoint instead.
1644
1644
  x-gitbook-mcp: true
1645
+ x-gitbook-return-preference: true
1645
1646
  tags:
1646
1647
  - change-requests
1647
1648
  security:
@@ -1651,6 +1652,7 @@ paths:
1651
1652
  parameters:
1652
1653
  - $ref: "#/components/parameters/spaceId"
1653
1654
  - $ref: "#/components/parameters/changeRequestId"
1655
+ - $ref: "#/components/parameters/returnPreference"
1654
1656
  requestBody:
1655
1657
  required: true
1656
1658
  content:
@@ -1681,6 +1683,11 @@ paths:
1681
1683
  application/json:
1682
1684
  schema:
1683
1685
  $ref: "#/components/schemas/ChangeRequest"
1686
+ "204":
1687
+ description: Change request updated without returning its representation
1688
+ headers:
1689
+ Preference-Applied:
1690
+ $ref: "#/components/headers/returnPreferenceApplied"
1684
1691
  /spaces/{spaceId}/change-requests/{changeRequestId}/merge:
1685
1692
  post:
1686
1693
  operationId: mergeChangeRequest
@@ -4677,6 +4684,46 @@ paths:
4677
4684
  $ref: "#/components/schemas/Organization"
4678
4685
  required:
4679
4686
  - items
4687
+ post:
4688
+ operationId: createOrganization
4689
+ summary: Create an organization
4690
+ x-gitbook-mcp: true
4691
+ tags:
4692
+ - organizations
4693
+ security:
4694
+ - user: []
4695
+ - oauth:
4696
+ - organization:write
4697
+ parameters:
4698
+ - name: withDefaultSite
4699
+ in: query
4700
+ description: If true, also creates a default documentation site for the organization.
4701
+ required: false
4702
+ schema:
4703
+ type: boolean
4704
+ - name: openapiUrl
4705
+ in: query
4706
+ description: URL of an OpenAPI/Swagger specification to import and attach to the default site as a reference. Only used when `withDefaultSite` is true.
4707
+ required: false
4708
+ schema:
4709
+ type: string
4710
+ requestBody:
4711
+ content:
4712
+ application/json:
4713
+ schema:
4714
+ $ref: "#/components/schemas/CreateOrganization"
4715
+ responses:
4716
+ "201":
4717
+ description: Organization created
4718
+ headers:
4719
+ Location:
4720
+ description: API URL for the newly created organization
4721
+ schema:
4722
+ type: string
4723
+ content:
4724
+ application/json:
4725
+ schema:
4726
+ $ref: "#/components/schemas/Organization"
4680
4727
  /orgs/{organizationId}:
4681
4728
  get:
4682
4729
  operationId: getOrganizationById
@@ -4750,12 +4797,151 @@ paths:
4750
4797
  "400":
4751
4798
  description: Invalid default content space or collection provided
4752
4799
  $ref: "#/components/responses/BadRequestError"
4800
+ /orgs/{organizationId}/audit-event-actions:
4801
+ get:
4802
+ operationId: listOrganizationAuditEventActions
4803
+ x-gitbook-mcp: true
4804
+ summary: List organization audit event actions
4805
+ description: |
4806
+ Lists the supported audit event action identifiers and their display labels. Access is restricted to organization administrators and GitBook staff. The organization must be activated and on an active Enterprise plan, except for GitBook's own organization.
4807
+ tags:
4808
+ - organizations
4809
+ security:
4810
+ - user: []
4811
+ parameters:
4812
+ - $ref: "#/components/parameters/organizationId"
4813
+ responses:
4814
+ "200":
4815
+ description: Supported audit event actions.
4816
+ content:
4817
+ application/json:
4818
+ schema:
4819
+ type: object
4820
+ properties:
4821
+ items:
4822
+ type: array
4823
+ items:
4824
+ $ref: "#/components/schemas/AuditEventAction"
4825
+ required:
4826
+ - items
4827
+ "401":
4828
+ $ref: "#/components/responses/UnauthorizedError"
4829
+ "403":
4830
+ $ref: "#/components/responses/ForbiddenError"
4831
+ "404":
4832
+ $ref: "#/components/responses/NotFoundError"
4833
+ /orgs/{organizationId}/audit-events:
4834
+ get:
4835
+ operationId: listOrganizationAuditEvents
4836
+ x-gitbook-mcp: true
4837
+ summary: List organization audit events
4838
+ description: |
4839
+ Lists recorded changes for an activated organization. Access is restricted to organization administrators and GitBook staff, and results are ordered by occurrence time, newest first. An active Enterprise plan is required except for GitBook's own organization.
4840
+ tags:
4841
+ - organizations
4842
+ security:
4843
+ - user: []
4844
+ parameters:
4845
+ - $ref: "#/components/parameters/organizationId"
4846
+ - $ref: "#/components/parameters/listPage"
4847
+ - name: limit
4848
+ in: query
4849
+ description: Number of events to return, up to 100.
4850
+ schema:
4851
+ type: integer
4852
+ minimum: 1
4853
+ maximum: 100
4854
+ default: 20
4855
+ - name: from
4856
+ in: query
4857
+ description: Include events occurring at or after this time.
4858
+ schema:
4859
+ type: string
4860
+ format: date-time
4861
+ - name: to
4862
+ in: query
4863
+ description: Include events occurring at or before this time.
4864
+ schema:
4865
+ type: string
4866
+ format: date-time
4867
+ - name: action
4868
+ in: query
4869
+ description: Filter by an exact audit action name.
4870
+ schema:
4871
+ type: string
4872
+ - name: actor
4873
+ in: query
4874
+ description: Filter by an exact stable actor identifier.
4875
+ schema:
4876
+ type: string
4877
+ - name: target
4878
+ in: query
4879
+ description: Filter by an exact stable target identifier.
4880
+ schema:
4881
+ type: string
4882
+ responses:
4883
+ "200":
4884
+ description: Paginated audit events.
4885
+ content:
4886
+ application/json:
4887
+ schema:
4888
+ allOf:
4889
+ - $ref: "#/components/schemas/List"
4890
+ - type: object
4891
+ properties:
4892
+ items:
4893
+ type: array
4894
+ items:
4895
+ $ref: "#/components/schemas/AuditEvent"
4896
+ required:
4897
+ - items
4898
+ "400":
4899
+ $ref: "#/components/responses/BadRequestError"
4900
+ "401":
4901
+ $ref: "#/components/responses/UnauthorizedError"
4902
+ "403":
4903
+ $ref: "#/components/responses/ForbiddenError"
4904
+ "404":
4905
+ $ref: "#/components/responses/NotFoundError"
4906
+ /orgs/{organizationId}/audit-events/{auditEventId}:
4907
+ get:
4908
+ operationId: getOrganizationAuditEvent
4909
+ x-gitbook-mcp: true
4910
+ summary: Get an organization audit event
4911
+ description: |
4912
+ Returns the full allowlisted payload for one recorded organization change. Access is restricted to organization administrators and GitBook staff. The organization must be activated and on an active Enterprise plan, except for GitBook's own organization.
4913
+ tags:
4914
+ - organizations
4915
+ security:
4916
+ - user: []
4917
+ parameters:
4918
+ - $ref: "#/components/parameters/organizationId"
4919
+ - name: auditEventId
4920
+ in: path
4921
+ required: true
4922
+ description: Unique identifier of the audit event.
4923
+ schema:
4924
+ type: string
4925
+ format: uuid
4926
+ responses:
4927
+ "200":
4928
+ description: The audit event.
4929
+ content:
4930
+ application/json:
4931
+ schema:
4932
+ $ref: "#/components/schemas/AuditEventDetails"
4933
+ "401":
4934
+ $ref: "#/components/responses/UnauthorizedError"
4935
+ "403":
4936
+ $ref: "#/components/responses/ForbiddenError"
4937
+ "404":
4938
+ $ref: "#/components/responses/NotFoundError"
4753
4939
  /orgs/{organizationId}/styleguides:
4754
4940
  get:
4755
4941
  operationId: listOrganizationStyleguides
4756
- summary: List all styleguides in an organization
4942
+ summary: List all style guides in an organization
4757
4943
  description: |
4758
- Lists every styleguide (a space holding a team's writing styleguide) in the organization, along with every site that references each one. Styleguides that are not referenced by any site are still returned with an empty `sites` list.
4944
+ Lists every style guide (a space holding a team's writing style guide) in the organization, along with every site that references each one. Style guides that are not referenced by any site are still returned with an empty `sites` list.
4759
4945
  x-gitbook-mcp: true
4760
4946
  tags:
4761
4947
  - organizations
@@ -4775,9 +4961,9 @@ paths:
4775
4961
  /orgs/{organizationId}/styleguide-templates:
4776
4962
  get:
4777
4963
  operationId: listStyleguideTemplates
4778
- summary: List all built-in styleguide templates
4964
+ summary: List all built-in style guide templates
4779
4965
  description: |
4780
- Lists the built-in styleguide starter templates that can seed a new styleguide, including the markdown content used to render each template's preview.
4966
+ Lists the built-in style guide starter templates that can seed a new styleguide, including the markdown content used to render each template's preview.
4781
4967
  x-gitbook-mcp: true
4782
4968
  tags:
4783
4969
  - organizations
@@ -6958,6 +7144,67 @@ paths:
6958
7144
  "205":
6959
7145
  description: Custom font deleted successfully.
6960
7146
  /org/{organizationId}/imports:
7147
+ get:
7148
+ operationId: listImportRuns
7149
+ summary: List the import runs of an organization
7150
+ description: |
7151
+ Returns the import runs of the organization, most recent first. Runs left behind by an import that never reported back are returned as failed.
7152
+ tags:
7153
+ - imports
7154
+ x-gitbook-mcp: true
7155
+ security:
7156
+ - user: []
7157
+ - oauth:
7158
+ - space:read
7159
+ parameters:
7160
+ - $ref: "#/components/parameters/organizationId"
7161
+ - name: space
7162
+ in: query
7163
+ description: Only return the import runs targeting this space.
7164
+ schema:
7165
+ type: string
7166
+ - name: changeRequest
7167
+ in: query
7168
+ description: Only return the import runs targeting this change request.
7169
+ schema:
7170
+ type: string
7171
+ - name: site
7172
+ in: query
7173
+ description: Only return the import runs targeting a space of this site.
7174
+ schema:
7175
+ type: string
7176
+ - name: status
7177
+ in: query
7178
+ description: Only return the import runs in this status. `active` covers both `pending` and `in-progress`.
7179
+ schema:
7180
+ type: string
7181
+ enum:
7182
+ - active
7183
+ - pending
7184
+ - in-progress
7185
+ - completed
7186
+ - failed
7187
+ - cancelled
7188
+ - $ref: "#/components/parameters/listPage"
7189
+ - $ref: "#/components/parameters/listLimit"
7190
+ responses:
7191
+ "200":
7192
+ description: OK
7193
+ content:
7194
+ application/json:
7195
+ schema:
7196
+ allOf:
7197
+ - $ref: "#/components/schemas/List"
7198
+ - type: object
7199
+ required:
7200
+ - items
7201
+ properties:
7202
+ items:
7203
+ type: array
7204
+ items:
7205
+ $ref: "#/components/schemas/ContentImportRun"
7206
+ "404":
7207
+ $ref: "#/components/responses/NotFoundError"
6961
7208
  post:
6962
7209
  operationId: startImportRun
6963
7210
  summary: Import content into a space from a website
@@ -6980,6 +7227,9 @@ paths:
6980
7227
  $ref: "#/components/schemas/ContentImportSource"
6981
7228
  target:
6982
7229
  $ref: "#/components/schemas/ContentImportTarget"
7230
+ site:
7231
+ description: ID of the site the import is for, to list it among that site's imports. Only needed when the target space does not belong to the site yet — a site being set up, whose space is attached once the import has started. Otherwise the site is resolved from the space.
7232
+ type: string
6983
7233
  enhance:
6984
7234
  description: Enhance the imported content with AI
6985
7235
  default: true
@@ -6998,6 +7248,31 @@ paths:
6998
7248
  $ref: "#/components/responses/BadRequestError"
6999
7249
  "404":
7000
7250
  $ref: "#/components/responses/NotFoundError"
7251
+ /org/{organizationId}/imports/{importRunId}:
7252
+ get:
7253
+ operationId: getImportRun
7254
+ summary: Get an import run
7255
+ description: |
7256
+ Returns the import run. A run left behind by an import that never reported back is returned as failed.
7257
+ tags:
7258
+ - imports
7259
+ x-gitbook-mcp: true
7260
+ security:
7261
+ - user: []
7262
+ - oauth:
7263
+ - space:read
7264
+ parameters:
7265
+ - $ref: "#/components/parameters/organizationId"
7266
+ - $ref: "#/components/parameters/importRunId"
7267
+ responses:
7268
+ "200":
7269
+ description: OK
7270
+ content:
7271
+ application/json:
7272
+ schema:
7273
+ $ref: "#/components/schemas/ContentImportRun"
7274
+ "404":
7275
+ $ref: "#/components/responses/NotFoundError"
7001
7276
  /org/{organizationId}/imports/{importRunId}/cancel:
7002
7277
  post:
7003
7278
  operationId: cancelImportRun
@@ -7010,7 +7285,7 @@ paths:
7010
7285
  - $ref: "#/components/parameters/organizationId"
7011
7286
  - $ref: "#/components/parameters/importRunId"
7012
7287
  responses:
7013
- "201":
7288
+ "200":
7014
7289
  description: Import run canceled successfully.
7015
7290
  content:
7016
7291
  application/json:
@@ -7192,7 +7467,7 @@ paths:
7192
7467
  - type: "null"
7193
7468
  styleguide:
7194
7469
  description: |
7195
- Attach an existing styleguide to the site by the ID of the styleguide space, or `null` to detach the current one. The space must be a styleguide owned by the same organization.
7470
+ Attach an existing style guide to the site by the ID of the style guide space, or `null` to detach the current one. The space must be a style guide owned by the same organization.
7196
7471
  oneOf:
7197
7472
  - type: string
7198
7473
  - type: "null"
@@ -7588,6 +7863,7 @@ paths:
7588
7863
  summary: Move a site space, section, or section group to a new position
7589
7864
  description: Reorders an item in the site's navigation structure by moving a site space, section, or section group to a specified position relative to another item. Use this to reorganize the navigation order after adding new sections or to reflect a new content hierarchy.
7590
7865
  x-gitbook-mcp: true
7866
+ x-gitbook-return-preference: true
7591
7867
  tags:
7592
7868
  - sites
7593
7869
  security:
@@ -7597,6 +7873,7 @@ paths:
7597
7873
  parameters:
7598
7874
  - $ref: "#/components/parameters/organizationId"
7599
7875
  - $ref: "#/components/parameters/siteId"
7876
+ - $ref: "#/components/parameters/returnPreference"
7600
7877
  requestBody:
7601
7878
  content:
7602
7879
  application/json:
@@ -7619,6 +7896,11 @@ paths:
7619
7896
  application/json:
7620
7897
  schema:
7621
7898
  $ref: "#/components/schemas/SiteStructureItem"
7899
+ "204":
7900
+ description: Item moved without returning its representation
7901
+ headers:
7902
+ Preference-Applied:
7903
+ $ref: "#/components/headers/returnPreferenceApplied"
7622
7904
  "400":
7623
7905
  description: Invalid move position provided
7624
7906
  $ref: "#/components/responses/BadRequestError"
@@ -7874,6 +8156,7 @@ paths:
7874
8156
  summary: Add a space to a site as a content source
7875
8157
  description: Links an existing space to the site by creating a site space relationship.
7876
8158
  x-gitbook-mcp: true
8159
+ x-gitbook-return-preference: true
7877
8160
  tags:
7878
8161
  - site-spaces
7879
8162
  security:
@@ -7883,6 +8166,7 @@ paths:
7883
8166
  parameters:
7884
8167
  - $ref: "#/components/parameters/organizationId"
7885
8168
  - $ref: "#/components/parameters/siteId"
8169
+ - $ref: "#/components/parameters/returnPreference"
7886
8170
  requestBody:
7887
8171
  required: true
7888
8172
  content:
@@ -7905,6 +8189,8 @@ paths:
7905
8189
  - type: string
7906
8190
  - type: "null"
7907
8191
  description: Custom home page within the space, rendered at the site space's path root instead of the space's default landing page.
8192
+ title:
8193
+ $ref: "#/components/schemas/SiteTitle"
7908
8194
  required:
7909
8195
  - spaceId
7910
8196
  responses:
@@ -7919,6 +8205,11 @@ paths:
7919
8205
  application/json:
7920
8206
  schema:
7921
8207
  $ref: "#/components/schemas/SiteSpace"
8208
+ "204":
8209
+ description: Space added to the site without returning its representation
8210
+ headers:
8211
+ Preference-Applied:
8212
+ $ref: "#/components/headers/returnPreferenceApplied"
7922
8213
  get:
7923
8214
  operationId: listSiteSpaces
7924
8215
  summary: List all spaces linked to a site as content sources
@@ -8049,6 +8340,7 @@ paths:
8049
8340
  summary: Update a section group in a site's navigation structure
8050
8341
  description: Updates a section group's properties in the site's navigation structure.
8051
8342
  x-gitbook-mcp: true
8343
+ x-gitbook-return-preference: true
8052
8344
  tags:
8053
8345
  - site-section-groups
8054
8346
  security:
@@ -8059,6 +8351,7 @@ paths:
8059
8351
  - $ref: "#/components/parameters/organizationId"
8060
8352
  - $ref: "#/components/parameters/siteId"
8061
8353
  - $ref: "#/components/parameters/siteSectionGroupId"
8354
+ - $ref: "#/components/parameters/returnPreference"
8062
8355
  requestBody:
8063
8356
  required: true
8064
8357
  content:
@@ -8084,6 +8377,11 @@ paths:
8084
8377
  application/json:
8085
8378
  schema:
8086
8379
  $ref: "#/components/schemas/SiteSectionGroup"
8380
+ "204":
8381
+ description: Site section group updated without returning its representation
8382
+ headers:
8383
+ Preference-Applied:
8384
+ $ref: "#/components/headers/returnPreferenceApplied"
8087
8385
  delete:
8088
8386
  operationId: deleteSiteSectionGroupById
8089
8387
  summary: Delete a site section group
@@ -8138,6 +8436,9 @@ paths:
8138
8436
  draft:
8139
8437
  type: boolean
8140
8438
  description: Whether the section should be created in draft mode.
8439
+ pageId:
8440
+ type: string
8441
+ description: Custom home page within the space, rendered at the section's path root instead of the space's default landing page.
8141
8442
  siteSectionGroupId:
8142
8443
  type: string
8143
8444
  description: ID of the section group to create the section in
@@ -8194,6 +8495,7 @@ paths:
8194
8495
  summary: Update a navigation section in a site
8195
8496
  description: Updates a navigation section's configuration in the site structure.
8196
8497
  x-gitbook-mcp: true
8498
+ x-gitbook-return-preference: true
8197
8499
  tags:
8198
8500
  - site-sections
8199
8501
  security:
@@ -8204,6 +8506,7 @@ paths:
8204
8506
  - $ref: "#/components/parameters/organizationId"
8205
8507
  - $ref: "#/components/parameters/siteId"
8206
8508
  - $ref: "#/components/parameters/siteSectionId"
8509
+ - $ref: "#/components/parameters/returnPreference"
8207
8510
  requestBody:
8208
8511
  required: true
8209
8512
  content:
@@ -8250,6 +8553,11 @@ paths:
8250
8553
  application/json:
8251
8554
  schema:
8252
8555
  $ref: "#/components/schemas/SiteSection"
8556
+ "204":
8557
+ description: Site section updated without returning its representation
8558
+ headers:
8559
+ Preference-Applied:
8560
+ $ref: "#/components/headers/returnPreferenceApplied"
8253
8561
  delete:
8254
8562
  operationId: deleteSiteSectionById
8255
8563
  summary: Delete a site section
@@ -8402,6 +8710,10 @@ paths:
8402
8710
  pageId:
8403
8711
  description: ID of the page the feedback is about.
8404
8712
  type: string
8713
+ source:
8714
+ description: |
8715
+ Surface the feedback was submitted from. When omitted, the feedback is recorded with an unknown source.
8716
+ $ref: "#/components/schemas/AgentFeedbackSource"
8405
8717
  required:
8406
8718
  - feedback
8407
8719
  - url
@@ -8669,6 +8981,11 @@ paths:
8669
8981
  description: Filter findings by associated site topic ID.
8670
8982
  schema:
8671
8983
  type: string
8984
+ - name: question
8985
+ in: query
8986
+ description: Filter findings that reference the given site question ID as evidence.
8987
+ schema:
8988
+ type: string
8672
8989
  - name: status
8673
8990
  in: query
8674
8991
  description: Filter findings by status.
@@ -9721,6 +10038,7 @@ paths:
9721
10038
  summary: Update a space linked to a site
9722
10039
  description: Updates the configuration of a site space. Use this to remap a site space to a different space, hide it from navigation, or promote it from draft to live.
9723
10040
  x-gitbook-mcp: true
10041
+ x-gitbook-return-preference: true
9724
10042
  tags:
9725
10043
  - site-spaces
9726
10044
  security:
@@ -9731,6 +10049,7 @@ paths:
9731
10049
  - $ref: "#/components/parameters/organizationId"
9732
10050
  - $ref: "#/components/parameters/siteId"
9733
10051
  - $ref: "#/components/parameters/siteSpaceId"
10052
+ - $ref: "#/components/parameters/returnPreference"
9734
10053
  requestBody:
9735
10054
  required: true
9736
10055
  content:
@@ -9766,6 +10085,11 @@ paths:
9766
10085
  application/json:
9767
10086
  schema:
9768
10087
  $ref: "#/components/schemas/SiteSpace"
10088
+ "204":
10089
+ description: Site space updated without returning its representation
10090
+ headers:
10091
+ Preference-Applied:
10092
+ $ref: "#/components/headers/returnPreferenceApplied"
9769
10093
  delete:
9770
10094
  operationId: deleteSiteSpaceById
9771
10095
  summary: Delete a site space
@@ -10618,8 +10942,8 @@ paths:
10618
10942
  /orgs/{organizationId}/sites/{siteId}/styleguide:
10619
10943
  post:
10620
10944
  operationId: createSiteStyleguideById
10621
- summary: Create or retrieve the styleguide space for a site
10622
- description: Ensures the site has a dedicated styleguide space and returns it. The styleguide defines writing style and tone guidelines that the AI editor agent references when generating or refining content for the site. If a styleguide already exists, this is idempotent and returns the existing space.
10945
+ summary: Create or retrieve the style guide space for a site
10946
+ description: Ensures the site has a dedicated style guide space and returns it. The style guide defines writing style and tone guidelines that the AI editor agent references when generating or refining content for the site. If a style guide already exists, this is idempotent and returns the existing space.
10623
10947
  x-gitbook-mcp: true
10624
10948
  tags:
10625
10949
  - sites
@@ -10640,10 +10964,10 @@ paths:
10640
10964
  template:
10641
10965
  type: string
10642
10966
  description: |
10643
- Built-in template id to seed the styleguide content with. Omit (or send no body) to create a blank styleguide.
10967
+ Built-in template id to seed the style guide content with. Omit (or send no body) to create a blank style guide.
10644
10968
  responses:
10645
10969
  "200":
10646
- description: Styleguide created or already exists.
10970
+ description: Style guide created or already exists.
10647
10971
  content:
10648
10972
  application/json:
10649
10973
  schema:
@@ -11847,6 +12171,12 @@ paths:
11847
12171
  patch:
11848
12172
  operationId: updateGitSyncInstallationById
11849
12173
  summary: Update a Git Sync installation configuration
12174
+ description: |
12175
+ Updates the installation configuration, then queues a sync operation using the new settings.
12176
+ A `git` priority queues an import from the selected repository and branch into GitBook; a
12177
+ `gitbook` priority queues an export from GitBook to the repository. Site imports require a
12178
+ `docs.yaml` file at the configured project directory and return a conflict without saving or
12179
+ queuing the sync when the file is missing.
11850
12180
  tags:
11851
12181
  - git
11852
12182
  security:
@@ -11879,7 +12209,42 @@ paths:
11879
12209
  "404":
11880
12210
  $ref: "#/components/responses/NotFoundError"
11881
12211
  "409":
11882
- $ref: "#/components/responses/ConflictError"
12212
+ description: The site Git Sync configuration is missing from the repository
12213
+ content:
12214
+ application/json:
12215
+ schema:
12216
+ allOf:
12217
+ - $ref: "#/components/schemas/Error"
12218
+ - type: object
12219
+ required:
12220
+ - error
12221
+ properties:
12222
+ error:
12223
+ type: object
12224
+ required:
12225
+ - type
12226
+ - details
12227
+ properties:
12228
+ type:
12229
+ type: string
12230
+ enum:
12231
+ - missing_site_git_sync_config
12232
+ details:
12233
+ type: object
12234
+ required:
12235
+ - path
12236
+ - branch
12237
+ - prompt
12238
+ properties:
12239
+ path:
12240
+ type: string
12241
+ description: Repository-relative path where `docs.yaml` is required.
12242
+ branch:
12243
+ type: string
12244
+ description: Repository branch where `docs.yaml` is required.
12245
+ prompt:
12246
+ type: string
12247
+ description: Prompt for a coding agent to create and commit the missing file.
11883
12248
  delete:
11884
12249
  operationId: uninstallGitSyncInstallation
11885
12250
  summary: Uninstall a Git Sync installation
@@ -11960,6 +12325,47 @@ paths:
11960
12325
  $ref: "#/components/responses/UnauthorizedError"
11961
12326
  "404":
11962
12327
  $ref: "#/components/responses/NotFoundError"
12328
+ /git/installations/{installationId}/github/repos/{accountName}/{repositoryName}/file:
12329
+ get:
12330
+ operationId: getGitHubRepoFileForGitSyncInstallation
12331
+ summary: Get a file from a GitHub repository for a Git Sync installation
12332
+ tags:
12333
+ - git
12334
+ security:
12335
+ - user: []
12336
+ parameters:
12337
+ - $ref: "#/components/parameters/installationId"
12338
+ - name: accountName
12339
+ in: path
12340
+ required: true
12341
+ schema:
12342
+ type: string
12343
+ - name: repositoryName
12344
+ in: path
12345
+ required: true
12346
+ schema:
12347
+ type: string
12348
+ - name: path
12349
+ in: query
12350
+ required: true
12351
+ schema:
12352
+ type: string
12353
+ - name: ref
12354
+ in: query
12355
+ required: true
12356
+ schema:
12357
+ type: string
12358
+ responses:
12359
+ "200":
12360
+ description: File found in the selected GitHub repository
12361
+ content:
12362
+ application/json:
12363
+ schema:
12364
+ $ref: "#/components/schemas/GitSyncRepositoryFile"
12365
+ "401":
12366
+ $ref: "#/components/responses/UnauthorizedError"
12367
+ "404":
12368
+ $ref: "#/components/responses/NotFoundError"
11963
12369
  /git/installations/{installationId}/gitlab/projects:
11964
12370
  get:
11965
12371
  operationId: listGitLabProjectsForGitSyncInstallation
@@ -12021,6 +12427,42 @@ paths:
12021
12427
  $ref: "#/components/responses/UnauthorizedError"
12022
12428
  "404":
12023
12429
  $ref: "#/components/responses/NotFoundError"
12430
+ /git/installations/{installationId}/gitlab/projects/{projectId}/file:
12431
+ get:
12432
+ operationId: getGitLabProjectFileForGitSyncInstallation
12433
+ summary: Get a file from a GitLab project for a Git Sync installation
12434
+ tags:
12435
+ - git
12436
+ security:
12437
+ - user: []
12438
+ parameters:
12439
+ - $ref: "#/components/parameters/installationId"
12440
+ - name: projectId
12441
+ in: path
12442
+ required: true
12443
+ schema:
12444
+ type: number
12445
+ - name: path
12446
+ in: query
12447
+ required: true
12448
+ schema:
12449
+ type: string
12450
+ - name: ref
12451
+ in: query
12452
+ required: true
12453
+ schema:
12454
+ type: string
12455
+ responses:
12456
+ "200":
12457
+ description: File found in the selected GitLab project
12458
+ content:
12459
+ application/json:
12460
+ schema:
12461
+ $ref: "#/components/schemas/GitSyncRepositoryFile"
12462
+ "401":
12463
+ $ref: "#/components/responses/UnauthorizedError"
12464
+ "404":
12465
+ $ref: "#/components/responses/NotFoundError"
12024
12466
  components:
12025
12467
  securitySchemes:
12026
12468
  user:
@@ -12228,6 +12670,16 @@ components:
12228
12670
  description: The unique ID of the change request or its number identifier in the space
12229
12671
  schema:
12230
12672
  $ref: "#/components/schemas/EntityId"
12673
+ returnPreference:
12674
+ in: header
12675
+ name: prefer
12676
+ description: Control whether a successful response includes the updated resource representation.
12677
+ required: false
12678
+ schema:
12679
+ type: string
12680
+ enum:
12681
+ - return=minimal
12682
+ - return=representation
12231
12683
  reviewId:
12232
12684
  name: reviewId
12233
12685
  in: path
@@ -13086,6 +13538,137 @@ components:
13086
13538
  - installationId
13087
13539
  - installationProvider
13088
13540
  - installationStatus
13541
+ ContentImportSource:
13542
+ oneOf:
13543
+ - type: object
13544
+ properties:
13545
+ type:
13546
+ type: string
13547
+ enum:
13548
+ - website
13549
+ url:
13550
+ $ref: "#/components/schemas/URL"
13551
+ required:
13552
+ - type
13553
+ - url
13554
+ - type: object
13555
+ properties:
13556
+ type:
13557
+ type: string
13558
+ enum:
13559
+ - file
13560
+ files:
13561
+ description: Files to import
13562
+ type: array
13563
+ maxItems: 50
13564
+ items:
13565
+ description: Key of file
13566
+ type: string
13567
+ required:
13568
+ - type
13569
+ - files
13570
+ ContentImportTarget:
13571
+ type: object
13572
+ properties:
13573
+ space:
13574
+ type: string
13575
+ description: ID of the space to import in
13576
+ changeRequest:
13577
+ type: string
13578
+ description: ID of the change request to import in
13579
+ page:
13580
+ type: string
13581
+ description: ID of the page to import in
13582
+ required:
13583
+ - space
13584
+ ContentImportRun:
13585
+ type: object
13586
+ properties:
13587
+ object:
13588
+ description: Type of Object, always equals to "import-run"
13589
+ type: string
13590
+ enum:
13591
+ - import-run
13592
+ id:
13593
+ description: Unique ID of the import
13594
+ type: string
13595
+ startedAt:
13596
+ description: Date when the import has started
13597
+ $ref: "#/components/schemas/Timestamp"
13598
+ completedAt:
13599
+ description: Filled when the imported is in status "completed"
13600
+ $ref: "#/components/schemas/Timestamp"
13601
+ createdAt:
13602
+ description: Date when the import was requested
13603
+ $ref: "#/components/schemas/Timestamp"
13604
+ updatedAt:
13605
+ description: Date when the import was last updated
13606
+ $ref: "#/components/schemas/Timestamp"
13607
+ status:
13608
+ description: Status of the import
13609
+ type: string
13610
+ enum:
13611
+ - pending
13612
+ - in-progress
13613
+ - completed
13614
+ - failed
13615
+ - cancelled
13616
+ reason:
13617
+ description: Reason for the import failure when `status` is `failed`.
13618
+ type: string
13619
+ source:
13620
+ description: Where the content is imported from.
13621
+ $ref: "#/components/schemas/ContentImportSource"
13622
+ target:
13623
+ description: Where the content is imported into.
13624
+ $ref: "#/components/schemas/ContentImportTarget"
13625
+ site:
13626
+ description: ID of the site the target space belongs to, when it belongs to exactly one.
13627
+ type: string
13628
+ createdBy:
13629
+ description: ID of the user who started the import.
13630
+ type: string
13631
+ urls:
13632
+ type: object
13633
+ description: URLs associated with the object
13634
+ properties:
13635
+ location:
13636
+ description: URL of the import run in the API
13637
+ type: string
13638
+ format: uri
13639
+ required:
13640
+ - location
13641
+ pages:
13642
+ description: Pages included in the import
13643
+ type: array
13644
+ items:
13645
+ type: object
13646
+ properties:
13647
+ id:
13648
+ description: ID of page
13649
+ type: string
13650
+ sourceURL:
13651
+ description: Source URL where the page has been imported from
13652
+ type: string
13653
+ type:
13654
+ description: Type of page
13655
+ type: string
13656
+ enum:
13657
+ - page
13658
+ - folder
13659
+ status:
13660
+ description: Status of the page
13661
+ type: string
13662
+ enum:
13663
+ - complete
13664
+ - pending
13665
+ required:
13666
+ - id
13667
+ - type
13668
+ - status
13669
+ required:
13670
+ - id
13671
+ - status
13089
13672
  VisitorAuthCustomBackend:
13090
13673
  type: object
13091
13674
  title: Custom backend for authenticated access
@@ -13177,7 +13760,7 @@ components:
13177
13760
  $ref: "#/components/schemas/SpaceEditMode"
13178
13761
  type:
13179
13762
  type: string
13180
- description: Kind of space. Only set to `styleguide` for spaces holding a team's writing styleguide; omitted for regular spaces.
13763
+ description: Kind of space. Only set to `styleguide` for spaces holding a team's writing style guide; omitted for regular spaces.
13181
13764
  enum:
13182
13765
  - styleguide
13183
13766
  mergeRules:
@@ -13218,6 +13801,12 @@ components:
13218
13801
  $ref: "#/components/schemas/TranslationLanguage"
13219
13802
  gitSync:
13220
13803
  $ref: "#/components/schemas/GitSyncState"
13804
+ imports:
13805
+ description: |
13806
+ Import runs targeting this space, still running or ended recently, most recent first. Only returned when fetching a single space.
13807
+ type: array
13808
+ items:
13809
+ $ref: "#/components/schemas/ContentImportRun"
13221
13810
  visitorAuth:
13222
13811
  $ref: "#/components/schemas/VisitorAuth"
13223
13812
  revision:
@@ -13487,10 +14076,17 @@ components:
13487
14076
  type: string
13488
14077
  title:
13489
14078
  type: string
14079
+ description:
14080
+ type: string
14081
+ description: Description of the page, suitable for presenting a page-root search destination.
13490
14082
  path:
13491
14083
  type: string
13492
14084
  score:
13493
14085
  $ref: "#/components/schemas/SearchResultScore"
14086
+ rank:
14087
+ type: integer
14088
+ minimum: 1
14089
+ description: One-based position in the globally ranked result set, preserved when results are paginated and grouped by space.
13494
14090
  resultType:
13495
14091
  type: string
13496
14092
  description: Whether the page matched on its own fields (title, description) or on the content of one of its sections.
@@ -13524,8 +14120,10 @@ components:
13524
14120
  required:
13525
14121
  - id
13526
14122
  - title
14123
+ - description
13527
14124
  - path
13528
14125
  - score
14126
+ - rank
13529
14127
  - ancestors
13530
14128
  - urls
13531
14129
  UpdateSpaceGitInfo:
@@ -17444,6 +18042,9 @@ components:
17444
18042
  type: object
17445
18043
  description: External link associated with a change request.
17446
18044
  properties:
18045
+ id:
18046
+ type: string
18047
+ description: The ID of an existing link, as served on the change request. Pass it back to update that link; omit it to add a new one. Links created before links were stored individually have no ID and are matched on their URL instead.
17447
18048
  ref:
17448
18049
  $ref: "#/components/schemas/ContentRefURL"
17449
18050
  title:
@@ -17520,6 +18121,9 @@ components:
17520
18121
  - $ref: "#/components/schemas/ChangeRequestLinkInput"
17521
18122
  - type: object
17522
18123
  properties:
18124
+ id:
18125
+ type: string
18126
+ description: The ID of the link. Absent on links not yet stored relationally.
17523
18127
  expanded:
17524
18128
  $ref: "#/components/schemas/ChangeRequestLinkExpanded"
17525
18129
  readOnly: true
@@ -17598,6 +18202,12 @@ components:
17598
18202
  outdated:
17599
18203
  type: boolean
17600
18204
  description: If true, the change request is not up-to-date with latest changes in the main content.
18205
+ imports:
18206
+ description: |
18207
+ Import runs targeting this change request, still running or ended recently, most recent first. Only returned when fetching a single change request.
18208
+ type: array
18209
+ items:
18210
+ $ref: "#/components/schemas/ContentImportRun"
17601
18211
  links:
17602
18212
  $ref: "#/components/schemas/ChangeRequestLinks"
17603
18213
  urls:
@@ -19478,6 +20088,9 @@ components:
19478
20088
  inviteLinks:
19479
20089
  description: If true, invite links are enabled for this organization.
19480
20090
  type: boolean
20091
+ auditLogs:
20092
+ description: Whether audit logs can currently be accessed for this organization.
20093
+ type: boolean
19481
20094
  plan:
19482
20095
  $ref: "#/components/schemas/BillingProduct"
19483
20096
  billing:
@@ -21136,6 +21749,12 @@ components:
21136
21749
  access:
21137
21750
  type: boolean
21138
21751
  description: Can the user access the site in the application.
21752
+ edit:
21753
+ type: boolean
21754
+ description: Can the user edit content associated with the site.
21755
+ create:
21756
+ type: boolean
21757
+ description: Can the user create content in the site.
21139
21758
  admin:
21140
21759
  type: boolean
21141
21760
  description: Can the user edit the site and manage its settings.
@@ -21151,6 +21770,8 @@ components:
21151
21770
  required:
21152
21771
  - view
21153
21772
  - access
21773
+ - edit
21774
+ - create
21154
21775
  - admin
21155
21776
  - installIntegration
21156
21777
  - viewAdaptiveSchema
@@ -21178,8 +21799,8 @@ components:
21178
21799
  styleguide:
21179
21800
  $ref: "#/components/schemas/ContentRefSpace"
21180
21801
  description: |
21181
- Reference to a GitBook space holding the team's writing styleguide.
21182
- When present on a site, the editing agent receives the styleguide
21802
+ Reference to a GitBook space holding the team's writing style guide.
21803
+ When present on a site, the editing agent receives the style guide
21183
21804
  table of contents in its system prompt and can fetch sections on
21184
21805
  demand to check edits against the rules.
21185
21806
  features:
@@ -22412,15 +23033,143 @@ components:
22412
23033
  - sites
22413
23034
  - spaces
22414
23035
  - deletedSpaces
23036
+ AuditEventAction:
23037
+ type: object
23038
+ properties:
23039
+ object:
23040
+ type: string
23041
+ enum:
23042
+ - audit-event-action
23043
+ id:
23044
+ type: string
23045
+ description: Stable action identifier stored on audit events.
23046
+ label:
23047
+ type: string
23048
+ description: Human-readable label for the action.
23049
+ required:
23050
+ - object
23051
+ - id
23052
+ - label
23053
+ AuditEventActor:
23054
+ type: object
23055
+ properties:
23056
+ type:
23057
+ type: string
23058
+ enum:
23059
+ - user
23060
+ - integration
23061
+ - installation
23062
+ - system
23063
+ - support
23064
+ description: Kind of actor that initiated the change.
23065
+ id:
23066
+ type: string
23067
+ description: Stable identifier of the actor.
23068
+ label:
23069
+ type: string
23070
+ description: Display label captured when the event was recorded.
23071
+ required:
23072
+ - type
23073
+ - id
23074
+ AuditEventTarget:
23075
+ type: object
23076
+ properties:
23077
+ type:
23078
+ type: string
23079
+ description: Kind of resource affected by the change.
23080
+ id:
23081
+ type: string
23082
+ description: Stable identifier of the affected resource.
23083
+ label:
23084
+ type: string
23085
+ description: Display label captured when the event was recorded.
23086
+ required:
23087
+ - type
23088
+ - id
23089
+ AuditEvent:
23090
+ type: object
23091
+ properties:
23092
+ object:
23093
+ type: string
23094
+ enum:
23095
+ - audit-event
23096
+ id:
23097
+ type: string
23098
+ format: uuid
23099
+ description: Unique identifier of the audit event.
23100
+ occurredAt:
23101
+ $ref: "#/components/schemas/Timestamp"
23102
+ action:
23103
+ type: string
23104
+ description: Stable action name describing the recorded change.
23105
+ actor:
23106
+ $ref: "#/components/schemas/AuditEventActor"
23107
+ source:
23108
+ type: string
23109
+ enum:
23110
+ - ui
23111
+ - api
23112
+ - integration
23113
+ - webhook
23114
+ - workflow
23115
+ - script
23116
+ - support
23117
+ description: Entry point that initiated the change.
23118
+ target:
23119
+ $ref: "#/components/schemas/AuditEventTarget"
23120
+ urls:
23121
+ type: object
23122
+ properties:
23123
+ location:
23124
+ type: string
23125
+ format: uri
23126
+ description: URL of the audit event in the API.
23127
+ required:
23128
+ - location
23129
+ required:
23130
+ - object
23131
+ - id
23132
+ - occurredAt
23133
+ - action
23134
+ - actor
23135
+ - source
23136
+ - target
23137
+ - urls
23138
+ AuditEventDetails:
23139
+ allOf:
23140
+ - $ref: "#/components/schemas/AuditEvent"
23141
+ - type: object
23142
+ properties:
23143
+ executionId:
23144
+ type: string
23145
+ description: Identifier of the operation that recorded the event.
23146
+ correlationId:
23147
+ type: string
23148
+ description: Identifier shared by events produced by the same user action.
23149
+ causedByEventId:
23150
+ type: string
23151
+ format: uuid
23152
+ description: Audit event that caused this later system effect.
23153
+ schemaVersion:
23154
+ type: integer
23155
+ minimum: 1
23156
+ description: Version of the action payload schema.
23157
+ payload:
23158
+ type: object
23159
+ additionalProperties: true
23160
+ description: Allowlisted details specific to the action.
23161
+ required:
23162
+ - schemaVersion
23163
+ - payload
22415
23164
  OrganizationStyleguide:
22416
23165
  type: object
22417
- description: A styleguide space and all the sites referencing it.
23166
+ description: A style guide space and all the sites referencing it.
22418
23167
  properties:
22419
23168
  space:
22420
23169
  $ref: "#/components/schemas/Space"
22421
23170
  sites:
22422
23171
  type: array
22423
- description: Sites in the organization that reference this styleguide.
23172
+ description: Sites in the organization that reference this style guide.
22424
23173
  items:
22425
23174
  $ref: "#/components/schemas/Site"
22426
23175
  required:
@@ -22437,11 +23186,11 @@ components:
22437
23186
  - styleguides
22438
23187
  StyleguideTemplate:
22439
23188
  type: object
22440
- description: A built-in styleguide starter template used to seed and preview a styleguide.
23189
+ description: A built-in style guide starter template used to seed and preview a style guide.
22441
23190
  properties:
22442
23191
  id:
22443
23192
  type: string
22444
- description: Identifier of the template, passed to createSiteStyleguideById to seed a styleguide from it.
23193
+ description: Identifier of the template, passed to createSiteStyleguideById to seed a style guide from it.
22445
23194
  title:
22446
23195
  type: string
22447
23196
  description: Human-readable name of the template.
@@ -24179,6 +24928,7 @@ components:
24179
24928
  enum:
24180
24929
  - customization_font
24181
24930
  - import_file
24931
+ - organization_file
24182
24932
  StorageUploadURL:
24183
24933
  type: object
24184
24934
  properties:
@@ -24281,104 +25031,6 @@ components:
24281
25031
  description: The path of the file in the storage bucket
24282
25032
  minLength: 1
24283
25033
  maxLength: 512
24284
- ContentImportSource:
24285
- oneOf:
24286
- - type: object
24287
- properties:
24288
- type:
24289
- type: string
24290
- enum:
24291
- - website
24292
- url:
24293
- $ref: "#/components/schemas/URL"
24294
- required:
24295
- - type
24296
- - url
24297
- - type: object
24298
- properties:
24299
- type:
24300
- type: string
24301
- enum:
24302
- - file
24303
- files:
24304
- description: Files to import
24305
- type: array
24306
- maxItems: 50
24307
- items:
24308
- description: Key of file
24309
- type: string
24310
- required:
24311
- - type
24312
- - files
24313
- ContentImportTarget:
24314
- type: object
24315
- properties:
24316
- space:
24317
- type: string
24318
- description: ID of the space to import in
24319
- changeRequest:
24320
- type: string
24321
- description: ID of the change request to import in
24322
- page:
24323
- type: string
24324
- description: ID of the page to import in
24325
- required:
24326
- - space
24327
- ContentImportRun:
24328
- type: object
24329
- properties:
24330
- id:
24331
- description: Unique ID of the import
24332
- type: string
24333
- startedAt:
24334
- description: Date when the import has started
24335
- $ref: "#/components/schemas/Timestamp"
24336
- completedAt:
24337
- description: Filled when the imported is in status "completed"
24338
- $ref: "#/components/schemas/Timestamp"
24339
- status:
24340
- description: Status of the import
24341
- type: string
24342
- enum:
24343
- - pending
24344
- - in-progress
24345
- - completed
24346
- - failed
24347
- - cancelled
24348
- reason:
24349
- description: Reason for the import failure when `status` is `failed`.
24350
- type: string
24351
- pages:
24352
- description: Pages included in the import
24353
- type: array
24354
- items:
24355
- type: object
24356
- properties:
24357
- id:
24358
- description: ID of page
24359
- type: string
24360
- sourceURL:
24361
- description: Source URL where the page has been imported from
24362
- type: string
24363
- type:
24364
- description: Type of page
24365
- type: string
24366
- enum:
24367
- - page
24368
- - folder
24369
- status:
24370
- description: Status of the page
24371
- type: string
24372
- enum:
24373
- - complete
24374
- - pending
24375
- required:
24376
- - id
24377
- - type
24378
- - status
24379
- required:
24380
- - id
24381
- - status
24382
25034
  SitePublishOperationPreviewResponse:
24383
25035
  description: |
24384
25036
  A response to a request to preview the publishing of a site. It indicates whether the operation can proceed immediately, requires checkout, if a trial is available or if a trial extension is available.
@@ -24990,6 +25642,12 @@ components:
24990
25642
  oneOf:
24991
25643
  - $ref: "#/components/schemas/CustomizationDefaultFont"
24992
25644
  - $ref: "#/components/schemas/CustomizationFontDefinitionInput"
25645
+ CustomizationHeadingFont:
25646
+ description: Font used for headings. `null` means headings use the main font (`styling.font`).
25647
+ oneOf:
25648
+ - $ref: "#/components/schemas/CustomizationDefaultFont"
25649
+ - $ref: "#/components/schemas/CustomizationFontDefinitionInput"
25650
+ - type: "null"
24993
25651
  CustomizationDefaultMonospaceFont:
24994
25652
  type: string
24995
25653
  enum:
@@ -25390,6 +26048,8 @@ components:
25390
26048
  $ref: "#/components/schemas/CustomizationLinksStyle"
25391
26049
  font:
25392
26050
  $ref: "#/components/schemas/CustomizationFont"
26051
+ headingFont:
26052
+ $ref: "#/components/schemas/CustomizationHeadingFont"
25393
26053
  monospaceFont:
25394
26054
  $ref: "#/components/schemas/CustomizationMonospaceFont"
25395
26055
  background:
@@ -25935,6 +26595,12 @@ components:
25935
26595
  type: string
25936
26596
  maxLength: 1024
25937
26597
  description: The end goal the agent is trying to accomplish on behalf of the user. Unlike the immediate query, the goal describes the broader task or outcome the agent is working towards.
26598
+ AgentFeedbackSource:
26599
+ type: string
26600
+ description: "The surface the agent was running on when it submitted the feedback: the MCP server exposed by the site, or the site assistant."
26601
+ enum:
26602
+ - mcp
26603
+ - assistant
25938
26604
  SiteInsightsSession:
25939
26605
  type: object
25940
26606
  description: Identifiers for a GitBook site session, used for analytics and adaptive content.
@@ -26644,6 +27310,15 @@ components:
26644
27310
  - syncing
26645
27311
  - succeeded
26646
27312
  - failed
27313
+ ContextConnectionFailureReason:
27314
+ type: string
27315
+ description: Why a synchronization failed, indicating who can resolve it. `authentication` and `misconfigured` need the connection to be reconfigured; `rate_limited` and `upstream_unavailable` are the source's own limits or downtime and are retried; `unknown` could not be attributed to the source's response.
27316
+ enum:
27317
+ - authentication
27318
+ - misconfigured
27319
+ - rate_limited
27320
+ - upstream_unavailable
27321
+ - unknown
26647
27322
  ContextSearchBoost:
26648
27323
  type: string
26649
27324
  description: Relative score adjustment applied to records from a connection when searching.
@@ -27020,6 +27695,8 @@ components:
27020
27695
  failureMessage:
27021
27696
  type: string
27022
27697
  description: Failure message when synchronization fails
27698
+ failureReason:
27699
+ $ref: "#/components/schemas/ContextConnectionFailureReason"
27023
27700
  email:
27024
27701
  type: object
27025
27702
  description: Parameters associated with the connection when it is an email connection
@@ -28037,6 +28714,66 @@ components:
28037
28714
  - status
28038
28715
  - reviewId
28039
28716
  - commentId
28717
+ AIToolCallStartContentImport:
28718
+ type: object
28719
+ properties:
28720
+ tool:
28721
+ type: string
28722
+ enum:
28723
+ - startContentImport
28724
+ spaceId:
28725
+ type: string
28726
+ description: The ID of the space the content is imported into.
28727
+ changeRequestId:
28728
+ type: string
28729
+ description: The ID of the change request the content is imported into.
28730
+ runId:
28731
+ type: string
28732
+ description: The ID of the import run.
28733
+ url:
28734
+ type: string
28735
+ description: The URL the content is imported from, when importing a website.
28736
+ files:
28737
+ type: array
28738
+ description: Names of the attached files the content is imported from, when importing files.
28739
+ items:
28740
+ type: string
28741
+ required:
28742
+ - tool
28743
+ - spaceId
28744
+ - changeRequestId
28745
+ - runId
28746
+ AIToolCallCheckContentImport:
28747
+ type: object
28748
+ properties:
28749
+ tool:
28750
+ type: string
28751
+ enum:
28752
+ - checkContentImport
28753
+ runId:
28754
+ type: string
28755
+ description: The ID of the import run.
28756
+ status:
28757
+ type: string
28758
+ description: Status of the import when it was checked.
28759
+ enum:
28760
+ - pending
28761
+ - in-progress
28762
+ - completed
28763
+ - failed
28764
+ - cancelled
28765
+ importedPages:
28766
+ type: number
28767
+ description: Number of pages imported when the import was checked.
28768
+ totalPages:
28769
+ type: number
28770
+ description: Number of pages the import has discovered so far.
28771
+ required:
28772
+ - tool
28773
+ - runId
28774
+ - status
28775
+ - importedPages
28776
+ - totalPages
28040
28777
  AIToolCallMCP:
28041
28778
  type: object
28042
28779
  description: Tool called from an MCP server
@@ -28112,6 +28849,8 @@ components:
28112
28849
  - $ref: "#/components/schemas/AIToolCallReplyToComment"
28113
28850
  - $ref: "#/components/schemas/AIToolCallGetComments"
28114
28851
  - $ref: "#/components/schemas/AIToolCallSubmitChangeRequestReview"
28852
+ - $ref: "#/components/schemas/AIToolCallStartContentImport"
28853
+ - $ref: "#/components/schemas/AIToolCallCheckContentImport"
28115
28854
  - $ref: "#/components/schemas/AIToolCallMCP"
28116
28855
  - $ref: "#/components/schemas/AIToolCallOther"
28117
28856
  AIMessageStepPhase:
@@ -28165,10 +28904,32 @@ components:
28165
28904
  - url
28166
28905
  - filename
28167
28906
  - contentType
28907
+ AIAttachmentImportFile:
28908
+ type: object
28909
+ description: A file attached for the sole purpose of being imported. Its content is never given to the model — the type is one the importer accepts but the model cannot read, such as a ZIP archive — so the model only learns that the file is attached and can import it.
28910
+ properties:
28911
+ type:
28912
+ type: string
28913
+ enum:
28914
+ - import-file
28915
+ url:
28916
+ $ref: "#/components/schemas/URL"
28917
+ filename:
28918
+ type: string
28919
+ description: Name of the file.
28920
+ contentType:
28921
+ type: string
28922
+ description: MIME type of the file. Must be a file type supported by the content import.
28923
+ required:
28924
+ - type
28925
+ - url
28926
+ - filename
28927
+ - contentType
28168
28928
  AIAttachment:
28169
28929
  oneOf:
28170
28930
  - $ref: "#/components/schemas/AIAttachmentImage"
28171
28931
  - $ref: "#/components/schemas/AIAttachmentFile"
28932
+ - $ref: "#/components/schemas/AIAttachmentImportFile"
28172
28933
  AIMessageContext:
28173
28934
  type: object
28174
28935
  description: Context about the current user sending a message.
@@ -29705,6 +30466,14 @@ components:
29705
30466
  type: string
29706
30467
  enum:
29707
30468
  - eventLLMSVariant
30469
+ - type: object
30470
+ required:
30471
+ - column
30472
+ properties:
30473
+ column:
30474
+ type: string
30475
+ enum:
30476
+ - eventPageNotFoundType
29708
30477
  - type: object
29709
30478
  required:
29710
30479
  - column
@@ -29817,6 +30586,15 @@ components:
29817
30586
  type: string
29818
30587
  enum:
29819
30588
  - utmContent
30589
+ - type: object
30590
+ description: Whether the visitor was authenticated when the event happened. Recorded at ingest from the site's visibility and the visitor's claims, so it is only exact for events tracked after that became available; older events fall back to the presence of any claim.
30591
+ required:
30592
+ - column
30593
+ properties:
30594
+ column:
30595
+ type: string
30596
+ enum:
30597
+ - visitorAuthenticated
29820
30598
  - type: object
29821
30599
  required:
29822
30600
  - column
@@ -29940,6 +30718,11 @@ components:
29940
30718
  - claude-code
29941
30719
  - codex
29942
30720
  - opencode
30721
+ SiteInsightsPageNotFoundType:
30722
+ description: Why a site URL returned a 404. `conditional` means the URL targets content gated by an adaptive-content condition, so the visitor lacked access to a page that exists. Computed by GitBook when the event is ingested; 404s recorded before this existed, and those on genuinely missing pages, carry no value.
30723
+ type: string
30724
+ enum:
30725
+ - conditional
29943
30726
  SiteInsightsQueryEventsValues:
29944
30727
  oneOf:
29945
30728
  - type: object
@@ -30079,6 +30862,21 @@ components:
30079
30862
  type: array
30080
30863
  items:
30081
30864
  type: string
30865
+ - type: object
30866
+ required:
30867
+ - column
30868
+ - values
30869
+ properties:
30870
+ column:
30871
+ type: string
30872
+ enum:
30873
+ - visitorAuthenticated
30874
+ values:
30875
+ type: array
30876
+ items:
30877
+ type:
30878
+ - boolean
30879
+ - "null"
30082
30880
  - type: object
30083
30881
  required:
30084
30882
  - column
@@ -30226,6 +31024,21 @@ components:
30226
31024
  oneOf:
30227
31025
  - type: "null"
30228
31026
  - $ref: "#/components/schemas/SiteInsightsLLMSVariant"
31027
+ - type: object
31028
+ required:
31029
+ - column
31030
+ - values
31031
+ properties:
31032
+ column:
31033
+ type: string
31034
+ enum:
31035
+ - eventPageNotFoundType
31036
+ values:
31037
+ type: array
31038
+ items:
31039
+ oneOf:
31040
+ - type: "null"
31041
+ - $ref: "#/components/schemas/SiteInsightsPageNotFoundType"
30229
31042
  - type: object
30230
31043
  required:
30231
31044
  - column
@@ -31600,6 +32413,23 @@ components:
31600
32413
  required:
31601
32414
  - name
31602
32415
  - ref
32416
+ GitSyncRepositoryFile:
32417
+ type: object
32418
+ description: A file found in a Git Sync repository at a specific ref.
32419
+ properties:
32420
+ name:
32421
+ type: string
32422
+ path:
32423
+ type: string
32424
+ sha:
32425
+ type: string
32426
+ size:
32427
+ type: number
32428
+ required:
32429
+ - name
32430
+ - path
32431
+ - sha
32432
+ - size
31603
32433
  GitSyncGitLabProject:
31604
32434
  type: object
31605
32435
  description: GitLab project that can be selected for Git Sync.
@@ -32282,6 +33112,7 @@ components:
32282
33112
  Stable identifier for this section group, used as the Git Sync key.
32283
33113
  Must be unique amongst all other section groups of the site. For
32284
33114
  example: `section-group-product` or `section-group-1`.
33115
+ You can nest section groups only one level deep. For example, `section-group-1` can have a child section group `section-group-1-1`, but `section-group-1-1` cannot have a child section group.
32285
33116
  minLength: 1
32286
33117
  title:
32287
33118
  $ref: "#/components/schemas/SiteSectionGroupTitle"
@@ -32315,6 +33146,9 @@ components:
32315
33146
  when `content.directory` is `null`. Hierarchy comes from where the space
32316
33147
  appears in the YAML (under a section, a section group, or at the root), not
32317
33148
  from an explicit parent reference.
33149
+
33150
+ The directory is read as one book — the Markdown files it holds become the
33151
+ pages of the space.
32318
33152
  properties:
32319
33153
  type:
32320
33154
  type: string
@@ -32337,7 +33171,10 @@ components:
32337
33171
  $ref: "#/components/schemas/SiteSpacePath"
32338
33172
  default:
32339
33173
  type: boolean
32340
- description: Whether this is the default space for the site.
33174
+ description: |
33175
+ Whether this is the default space of its parent — the one opened when the
33176
+ site or the section is visited without a space path. Exactly one space
33177
+ among each set of siblings carries it.
32341
33178
  hidden:
32342
33179
  type: boolean
32343
33180
  description: Whether the space is hidden from the site's navigation.
@@ -32354,7 +33191,12 @@ components:
32354
33191
  directory:
32355
33192
  oneOf:
32356
33193
  - type: string
32357
- description: Repository-relative directory containing this space's content.
33194
+ description: |
33195
+ Directory holding this space's content, resolved from the site's
33196
+ project directory — `./guides` under a site rooted at `docs/`
33197
+ reads `docs/guides`. A leading slash escapes to the repository
33198
+ root instead, so `/guides` always reads `guides`. Parent-directory
33199
+ segments (`..`) are rejected.
32358
33200
  minLength: 1
32359
33201
  - type: "null"
32360
33202
  description: The space does not inherit the site's repository.
@@ -32375,8 +33217,10 @@ components:
32375
33217
  A section — a group of spaces sharing a top-level navigation entry.
32376
33218
  Discriminated by `type: section`.
32377
33219
 
32378
- Spaces inside a section are listed inline under `children`. A site with
32379
- sections must mark exactly one section with `default: true`.
33220
+ Spaces inside a section are listed inline under `children`; a section holds
33221
+ nothing else — nest sections under a section group instead. A site with
33222
+ sections must mark exactly one section with `default: true`, and cannot also
33223
+ list spaces at the top level of its structure.
32380
33224
  properties:
32381
33225
  type:
32382
33226
  type: string
@@ -32430,14 +33274,94 @@ components:
32430
33274
  description: |
32431
33275
  Hierarchical structure of a site in a Git Sync YAML. Each entry is one of
32432
33276
  three node types: a section group, a section, or a space.
33277
+
33278
+ A **space** is a leaf holding content, pointed at a repository directory. A
33279
+ **section** gathers spaces behind one top-level navigation entry. A
33280
+ **section group** gathers sections. A site either uses sections or lists its
33281
+ spaces at the top level, never both.
33282
+
33283
+ ```yaml
33284
+ structure:
33285
+ - type: space
33286
+ key: space-guides
33287
+ title: Guides
33288
+ path: guides
33289
+ default: true
33290
+ content:
33291
+ directory: ./guides
33292
+ - type: space
33293
+ key: space-api
33294
+ title: API reference
33295
+ path: api
33296
+ content:
33297
+ directory: ./api
33298
+ ```
33299
+
33300
+ The same two spaces behind top-level navigation entries:
33301
+
33302
+ ```yaml
33303
+ structure:
33304
+ - type: section
33305
+ key: section-product
33306
+ title: Product
33307
+ path: product
33308
+ default: true
33309
+ children:
33310
+ - type: space
33311
+ key: space-guides
33312
+ title: Guides
33313
+ path: guides
33314
+ default: true
33315
+ content:
33316
+ directory: ./guides
33317
+ - type: section
33318
+ key: section-reference
33319
+ title: Reference
33320
+ path: reference
33321
+ children:
33322
+ - type: space
33323
+ key: space-api
33324
+ title: API reference
33325
+ path: api
33326
+ default: true
33327
+ content:
33328
+ directory: ./api
33329
+ ```
33330
+
33331
+ Rules checked on import — a violation fails the sync, naming the offending
33332
+ node:
33333
+
33334
+ - Every `key` is unique across the file, whatever the node type. Git Sync
33335
+ recognises a node from one sync to the next by its key, so a reused key
33336
+ leaves two nodes indistinguishable.
33337
+ - Each section marks exactly one of its spaces `default: true`, and a site
33338
+ without sections marks one among its top-level spaces. The default is the
33339
+ space that opens when the site or the section is visited without a space
33340
+ path of its own.
33341
+ - A site declaring any section marks exactly one of those sections
33342
+ `default: true`, and lists no space at the top level: once a section
33343
+ exists, every space belongs inside one.
33344
+ - Sections hold only spaces. Section groups hold only sections, or one
33345
+ further level of section groups — nothing nests deeper than that.
33346
+ - Spaces pointed at the same `content.directory` declare the same
33347
+ `content.language`. One directory is read once, so it cannot produce two
33348
+ languages at the same time.
32433
33349
  items:
32434
33350
  $ref: "#/components/schemas/GitSyncSiteStructureNode"
32435
33351
  GitSyncSiteConfig:
32436
33352
  type: object
32437
33353
  description: |
32438
33354
  Schema for a site `docs.yaml` file — the canonical contract for what
32439
- can be authored in Git Sync to drive a site's customization and structure.
33355
+ can be authored in Git Sync to drive a site's structure.
33356
+
33357
+ The file lives at the root of the site's project directory in the synced
33358
+ repository. It names the site and maps the repository's content directories
33359
+ onto the site's navigation.
32440
33360
  properties:
33361
+ $schema:
33362
+ type: string
33363
+ format: uri
33364
+ description: URL of the schema used by editors to validate the site configuration.
32441
33365
  version:
32442
33366
  type: integer
32443
33367
  description: |
@@ -34195,12 +35119,6 @@ components:
34195
35119
  required:
34196
35120
  - code
34197
35121
  - message
34198
- UnexpectedError:
34199
- description: Unexpected Error
34200
- content:
34201
- application/json:
34202
- schema:
34203
- $ref: "#/components/schemas/Error"
34204
35122
  UnauthorizedError:
34205
35123
  description: Unauthorized
34206
35124
  content:
@@ -34223,3 +35141,38 @@ components:
34223
35141
  required:
34224
35142
  - code
34225
35143
  - message
35144
+ ForbiddenError:
35145
+ description: Forbidden
35146
+ content:
35147
+ application/json:
35148
+ schema:
35149
+ type: object
35150
+ required:
35151
+ - error
35152
+ properties:
35153
+ error:
35154
+ type: object
35155
+ properties:
35156
+ code:
35157
+ type: integer
35158
+ format: int32
35159
+ enum:
35160
+ - 403
35161
+ message:
35162
+ type: string
35163
+ required:
35164
+ - code
35165
+ - message
35166
+ UnexpectedError:
35167
+ description: Unexpected Error
35168
+ content:
35169
+ application/json:
35170
+ schema:
35171
+ $ref: "#/components/schemas/Error"
35172
+ headers:
35173
+ returnPreferenceApplied:
35174
+ description: Confirms that the requested minimal response preference was applied.
35175
+ schema:
35176
+ type: string
35177
+ enum:
35178
+ - return=minimal