@gitbook/api 0.189.0 → 0.191.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
@@ -949,21 +949,6 @@ paths:
949
949
  "404":
950
950
  description: No Git provider currently set up on the space
951
951
  $ref: "#/components/responses/NotFoundError"
952
- /spaces/{spaceId}/git/legacy-installation:
953
- delete:
954
- operationId: deleteLegacyGitInstallation
955
- summary: Remove the legacy Git Sync installation from the space to be able to upgrade it to use the new Git integrations
956
- tags:
957
- - space-git
958
- security:
959
- - user-internal: []
960
- parameters:
961
- - $ref: "#/components/parameters/spaceId"
962
- responses:
963
- "204":
964
- description: The legacy Git installation was already removed
965
- "205":
966
- description: The legacy Git installation was successfully removed
967
952
  /spaces/{spaceId}/permissions:
968
953
  post:
969
954
  operationId: inviteToSpace
@@ -2388,7 +2373,23 @@ paths:
2388
2373
  post:
2389
2374
  operationId: updateChangeRequestContent
2390
2375
  summary: Apply a batch of content changes to a change request
2391
- description: 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.
2376
+ description: |-
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
+ 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
+ - Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`).
2381
+ - Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>`
2382
+ for a nested page (e.g. `/pages/guides/getting-started`).
2383
+
2384
+ - Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page,
2385
+ or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is
2386
+ `/pages/README.md`.
2387
+
2388
+ - Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`,
2389
+ `../other.md`, or `../README.md` (the parent page). Folder-style links without an
2390
+ extension (e.g. `./section`) resolve to that folder's page.
2391
+
2392
+ 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
2393
  x-gitbook-mcp: true
2393
2394
  tags:
2394
2395
  - change-request-content
@@ -4859,7 +4860,7 @@ paths:
4859
4860
  $ref: "#/components/schemas/MemberRoleOrGuest"
4860
4861
  delete:
4861
4862
  operationId: removeMemberFromOrganizationById
4862
- summary: Delete an organization member
4863
+ summary: Remove an organization member or request an organization admin to do it
4863
4864
  tags:
4864
4865
  - organization-members
4865
4866
  security:
@@ -4870,6 +4871,8 @@ paths:
4870
4871
  - $ref: "#/components/parameters/organizationId"
4871
4872
  - $ref: "#/components/parameters/userId"
4872
4873
  responses:
4874
+ "202":
4875
+ description: The removal request was sent to the organization administrators.
4873
4876
  "204":
4874
4877
  description: Member did not exist in the organization.
4875
4878
  "205":
@@ -8326,6 +8329,52 @@ paths:
8326
8329
  - $ref: "#/components/schemas/SearchRecordResult"
8327
8330
  discriminator:
8328
8331
  propertyName: type
8332
+ /orgs/{organizationId}/sites/{siteId}/agent-feedback:
8333
+ post:
8334
+ operationId: submitSiteAgentFeedback
8335
+ summary: Submit agent feedback for a site
8336
+ description: Submit feedback from an AI agent about the content of the site, such as outdated, incorrect or missing content encountered while helping a user.
8337
+ x-internal: true
8338
+ tags:
8339
+ - site-insights
8340
+ security:
8341
+ - user: []
8342
+ parameters:
8343
+ - $ref: "#/components/parameters/organizationId"
8344
+ - $ref: "#/components/parameters/siteId"
8345
+ requestBody:
8346
+ required: true
8347
+ content:
8348
+ application/json:
8349
+ schema:
8350
+ type: object
8351
+ properties:
8352
+ feedback:
8353
+ description: The feedback about the content of the site.
8354
+ type: string
8355
+ minLength: 1
8356
+ maxLength: 2048
8357
+ goal:
8358
+ description: |
8359
+ The end goal the agent is trying to accomplish on behalf of the user, giving the context the agent was working towards when it encountered the issue.
8360
+ $ref: "#/components/schemas/AgentGoal"
8361
+ url:
8362
+ description: URL of the content the feedback is about.
8363
+ $ref: "#/components/schemas/URL"
8364
+ spaceId:
8365
+ description: ID of the space the feedback is about.
8366
+ type: string
8367
+ pageId:
8368
+ description: ID of the page the feedback is about.
8369
+ type: string
8370
+ required:
8371
+ - feedback
8372
+ - url
8373
+ - spaceId
8374
+ - pageId
8375
+ responses:
8376
+ "204":
8377
+ description: Feedback submitted
8329
8378
  /orgs/{organizationId}/sites/{siteId}/ask:
8330
8379
  post:
8331
8380
  operationId: streamAskInSite
@@ -8362,10 +8411,9 @@ paths:
8362
8411
  siteSpaceId:
8363
8412
  type: string
8364
8413
  goal:
8365
- type: string
8366
- maxLength: 1024
8367
8414
  description: |
8368
8415
  The end goal the agent is trying to accomplish on behalf of the user. Unlike the question, which is the immediate query, the goal describes the broader task or outcome the agent is working towards. GitBook uses this to steer the answer towards what is ultimately useful for that goal.
8416
+ $ref: "#/components/schemas/AgentGoal"
8369
8417
  scope:
8370
8418
  $ref: "#/components/schemas/SiteSearchScope"
8371
8419
  session:
@@ -8545,37 +8593,6 @@ paths:
8545
8593
  type: array
8546
8594
  items:
8547
8595
  $ref: "#/components/schemas/SiteScan"
8548
- post:
8549
- operationId: createSiteScan
8550
- summary: Enqueue a new site scan
8551
- tags:
8552
- - site-context
8553
- security:
8554
- - user: []
8555
- - oauth:
8556
- - site:write
8557
- parameters:
8558
- - $ref: "#/components/parameters/organizationId"
8559
- - $ref: "#/components/parameters/siteId"
8560
- requestBody:
8561
- required: true
8562
- content:
8563
- application/json:
8564
- schema:
8565
- type: object
8566
- required:
8567
- - topic
8568
- properties:
8569
- topic:
8570
- type: string
8571
- description: The site topic ID to scan.
8572
- responses:
8573
- "202":
8574
- description: Site scan has been enqueued
8575
- content:
8576
- application/json:
8577
- schema:
8578
- $ref: "#/components/schemas/SiteScan"
8579
8596
  /orgs/{organizationId}/sites/{siteId}/scans/{siteScanId}:
8580
8597
  get:
8581
8598
  operationId: getSiteScanById
@@ -8637,6 +8654,15 @@ paths:
8637
8654
  description: Filter findings that have at least one associated change request.
8638
8655
  schema:
8639
8656
  type: boolean
8657
+ - name: source
8658
+ in: query
8659
+ 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 returned.
8660
+ schema:
8661
+ type: array
8662
+ items:
8663
+ oneOf:
8664
+ - $ref: "#/components/schemas/SiteTriageFilterQuestions"
8665
+ - $ref: "#/components/schemas/SiteTriageFilterConnections"
8640
8666
  responses:
8641
8667
  "200":
8642
8668
  description: OK
@@ -12795,6 +12821,18 @@ components:
12795
12821
  - github
12796
12822
  - gitlab
12797
12823
  - github-legacy
12824
+ GitSyncOperationState:
12825
+ type: string
12826
+ description: |
12827
+ * `running`: The operation is still running
12828
+ * `failure`: The operation failed
12829
+ * `success`: The operation was successful
12830
+ * `timeout`: The operation timed out
12831
+ enum:
12832
+ - running
12833
+ - failure
12834
+ - success
12835
+ - timeout
12798
12836
  GitSyncState:
12799
12837
  type: object
12800
12838
  properties:
@@ -12815,6 +12853,14 @@ components:
12815
12853
  url:
12816
12854
  type: string
12817
12855
  description: The URL to the repository tree, used when rendering public content.
12856
+ operation:
12857
+ type: object
12858
+ description: The latest operation on the Git Sync installation.
12859
+ properties:
12860
+ state:
12861
+ $ref: "#/components/schemas/GitSyncOperationState"
12862
+ required:
12863
+ - state
12818
12864
  updatedAt:
12819
12865
  description: When the Git provider details were last updated
12820
12866
  $ref: "#/components/schemas/Timestamp"
@@ -13294,6 +13340,7 @@ components:
13294
13340
  description: If true, the import will generate a revision without updating the space primary content.
13295
13341
  gitInfo:
13296
13342
  description: Optional metadata to store on the space about the Git provider
13343
+ deprecated: true
13297
13344
  $ref: "#/components/schemas/UpdateSpaceGitInfo"
13298
13345
  required:
13299
13346
  - url
@@ -13329,8 +13376,13 @@ components:
13329
13376
  $ref: "#/components/schemas/Timestamp"
13330
13377
  force:
13331
13378
  type: boolean
13379
+ standalone:
13380
+ type: boolean
13381
+ description: |
13382
+ If true, the export will be done in a standalone mode, meaning that the exported content will not be linked to the Git repository. This is useful for creating a snapshot of the space's content.
13332
13383
  gitInfo:
13333
13384
  description: Optional metadata to store on the space about the Git provider
13385
+ deprecated: true
13334
13386
  $ref: "#/components/schemas/UpdateSpaceGitInfo"
13335
13387
  required:
13336
13388
  - url
@@ -13457,6 +13509,10 @@ components:
13457
13509
  updatedAt:
13458
13510
  description: When the page was last edited. Only present if page has been edited at least once.
13459
13511
  $ref: "#/components/schemas/Timestamp"
13512
+ condition:
13513
+ description: Adaptive-content condition controlling whether the page is shown to a visitor. Only present when the page has a condition set, and only returned when the API is called with a user, user-internal or OAuth token (never with a site/content token).
13514
+ type: string
13515
+ minLength: 1
13460
13516
  required:
13461
13517
  - id
13462
13518
  - title
@@ -14888,6 +14944,14 @@ components:
14888
14944
  $ref: "#/components/schemas/Icon"
14889
14945
  openInAIProviders:
14890
14946
  type: boolean
14947
+ defaultExpanded:
14948
+ type: string
14949
+ default: hidden
14950
+ description: Controls how much of the prompt content is visible by default.
14951
+ enum:
14952
+ - hidden
14953
+ - partial
14954
+ - full
14891
14955
  required:
14892
14956
  - description
14893
14957
  additionalProperties: false
@@ -17867,23 +17931,54 @@ components:
17867
17931
  - comment
17868
17932
  required:
17869
17933
  - actionType
17870
- ChangeRequestContentChangeUpdatePage:
17934
+ RevisionPageUpdate:
17871
17935
  type: object
17872
- description: Replace the document of an existing page with another document.
17873
- required:
17874
- - operation
17875
- - page
17876
- - document
17936
+ description: Page metadata that can be set when inserting or updating a page through a change request. When a markdown document is provided on the same operation, the values read from its frontmatter take precedence over these fields.
17877
17937
  properties:
17878
- operation:
17938
+ title:
17879
17939
  type: string
17880
- enum:
17881
- - update_page
17882
- page:
17940
+ minLength: 1
17941
+ description: Title of the page.
17942
+ emoji:
17943
+ description: Emoji of the page. Set to an empty string to remove it.
17944
+ $ref: "#/components/schemas/Emoji"
17945
+ icon:
17946
+ description: Icon of the page. Set to an empty string to remove it.
17947
+ $ref: "#/components/schemas/Icon"
17948
+ description:
17883
17949
  type: string
17884
- description: ID of the page whose content should be updated.
17885
- document:
17886
- $ref: "#/components/schemas/Document"
17950
+ description: Description of the page.
17951
+ hidden:
17952
+ type: boolean
17953
+ description: If true, the page is not displayed in the navigation, while still being accessible.
17954
+ noIndex:
17955
+ type: boolean
17956
+ description: If true, the page is not indexable in the search and ask features.
17957
+ noRobotsIndex:
17958
+ type: boolean
17959
+ description: If true, the page is not indexable by search engine robots.
17960
+ condition:
17961
+ type: string
17962
+ description: Adaptive-content condition controlling whether the page is shown to a visitor. Set to an empty string to remove the condition.
17963
+ ChangeRequestContentChangeUpdatePage:
17964
+ description: Update an existing page. Its document and/or its metadata (title, icon, description, visibility, adaptive-content condition) can be changed.
17965
+ allOf:
17966
+ - $ref: "#/components/schemas/RevisionPageUpdate"
17967
+ - type: object
17968
+ required:
17969
+ - operation
17970
+ - page
17971
+ properties:
17972
+ operation:
17973
+ type: string
17974
+ enum:
17975
+ - update_page
17976
+ page:
17977
+ type: string
17978
+ description: ID of the page to update.
17979
+ document:
17980
+ description: New document for the page. When provided as markdown, its frontmatter is read to update the page metadata. Omit to update only the metadata fields.
17981
+ $ref: "#/components/schemas/Document"
17887
17982
  example:
17888
17983
  operation: update_page
17889
17984
  page: page_id
@@ -17893,29 +17988,29 @@ components:
17893
17988
 
17894
17989
  This is a markdown document linking to [another page](/pages/page_id).
17895
17990
  ChangeRequestContentChangeInsertPage:
17896
- type: object
17897
17991
  description: Insert a new page into the change request.
17898
- required:
17899
- - operation
17900
- - title
17901
- - document
17902
- properties:
17903
- operation:
17904
- type: string
17905
- enum:
17906
- - insert_page
17907
- title:
17908
- type: string
17909
- description: Title of the new page.
17910
- into:
17911
- type: string
17912
- description: ID of the parent page to insert the new page into. If omitted, the page is inserted as a root page.
17913
- at:
17914
- type: integer
17915
- minimum: 0
17916
- description: Zero-based index to insert the page at among its siblings. If omitted, the page is appended at the end.
17917
- document:
17918
- $ref: "#/components/schemas/Document"
17992
+ allOf:
17993
+ - $ref: "#/components/schemas/RevisionPageUpdate"
17994
+ - type: object
17995
+ required:
17996
+ - operation
17997
+ - title
17998
+ - document
17999
+ properties:
18000
+ operation:
18001
+ type: string
18002
+ enum:
18003
+ - insert_page
18004
+ into:
18005
+ type: string
18006
+ description: ID of the parent page to insert the new page into. If omitted, the page is inserted as a root page.
18007
+ at:
18008
+ type: integer
18009
+ minimum: 0
18010
+ description: Zero-based index to insert the page at among its siblings. If omitted, the page is appended at the end.
18011
+ document:
18012
+ description: Document for the new page. When provided as markdown, its frontmatter is read to set the page metadata.
18013
+ $ref: "#/components/schemas/Document"
17919
18014
  example:
17920
18015
  operation: insert_page
17921
18016
  title: New page
@@ -18526,7 +18621,6 @@ components:
18526
18621
  - analytics
18527
18622
  - collaboration
18528
18623
  - content
18529
- - gitsync
18530
18624
  - marketing
18531
18625
  - visitor-auth
18532
18626
  - other
@@ -23630,6 +23724,14 @@ components:
23630
23724
  type: boolean
23631
23725
  default: false
23632
23726
  description: Whether previews should be generated from branches outside the configured branch.
23727
+ agentInstructions:
23728
+ type: array
23729
+ description: Agent instruction files GitBook should always export at the repository root.
23730
+ items:
23731
+ type: string
23732
+ enum:
23733
+ - agents
23734
+ - claude
23633
23735
  priority:
23634
23736
  $ref: "#/components/schemas/GitSyncInstallationPriority"
23635
23737
  GitSyncInstallationSetupGitHub:
@@ -24870,6 +24972,36 @@ components:
24870
24972
  type: string
24871
24973
  description: |
24872
24974
  The ID of the site space that must always be included in the search results. The language of this site space will be used to match other site spaces with the same language, if applicable.
24975
+ restrictTo:
24976
+ description: |
24977
+ Must not be provided when searching the entire default scope. To restrict the search to a subset of the default scope, provide `restrictTo` along with `currentSiteSpace`.
24978
+ type: string
24979
+ minLength: 2
24980
+ maxLength: 1
24981
+ x-typescript: never
24982
+ - type: object
24983
+ required:
24984
+ - mode
24985
+ - currentSiteSpace
24986
+ - restrictTo
24987
+ properties:
24988
+ mode:
24989
+ description: |
24990
+ Search a subset of the default scope of the site, relative to the current site space.
24991
+ type: string
24992
+ enum:
24993
+ - default
24994
+ currentSiteSpace:
24995
+ type: string
24996
+ description: |
24997
+ The ID of the site space the search is made from. The language of this site space will be used to match other site spaces with the same language, if applicable.
24998
+ restrictTo:
24999
+ type: string
25000
+ enum:
25001
+ - currentSiteSpace
25002
+ - otherSiteSpaces
25003
+ description: |
25004
+ Restrict the search to a subset of the default scope. With `currentSiteSpace`, only the current site space is searched. With `otherSiteSpaces`, the current site space is excluded and only the other site spaces in the default scope are searched.
24873
25005
  - type: object
24874
25006
  required:
24875
25007
  - mode
@@ -24923,6 +25055,10 @@ components:
24923
25055
  - title
24924
25056
  - score
24925
25057
  - url
25058
+ AgentGoal:
25059
+ type: string
25060
+ maxLength: 1024
25061
+ 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.
24926
25062
  SiteInsightsSession:
24927
25063
  type: object
24928
25064
  description: Identifiers for a GitBook site session, used for analytics and adaptive content.
@@ -24957,9 +25093,12 @@ components:
24957
25093
  - builtin:github-discussions
24958
25094
  - builtin:github-issues
24959
25095
  - builtin:intercom
25096
+ - builtin:front
24960
25097
  - builtin:zendesk
24961
25098
  - builtin:zoho-desk
25099
+ - builtin:freshdesk
24962
25100
  - builtin:pylon
25101
+ - builtin:hubspot
24963
25102
  - builtin:linear
24964
25103
  - builtin:jira
24965
25104
  ContextRecordTitle:
@@ -25160,6 +25299,18 @@ components:
25160
25299
  - low
25161
25300
  - medium
25162
25301
  - high
25302
+ SiteTriageFilterQuestions:
25303
+ type: string
25304
+ description: |
25305
+ Findings source filter matching evidence coming from site questions.
25306
+ enum:
25307
+ - questions
25308
+ SiteTriageFilterConnections:
25309
+ type: string
25310
+ description: |
25311
+ Findings source filter matching evidence coming from a given connection,
25312
+ encoded as `connection:<connectionId>`.
25313
+ pattern: ^connection:.+$
25163
25314
  SiteFindingTitle:
25164
25315
  type: string
25165
25316
  description: Short finding title
@@ -25595,6 +25746,23 @@ components:
25595
25746
  required:
25596
25747
  - connector
25597
25748
  - setupSettings
25749
+ - type: object
25750
+ properties:
25751
+ connector:
25752
+ type: string
25753
+ enum:
25754
+ - builtin:front
25755
+ setupSettings:
25756
+ type: object
25757
+ properties:
25758
+ token:
25759
+ type: string
25760
+ minLength: 1
25761
+ required:
25762
+ - token
25763
+ required:
25764
+ - connector
25765
+ - setupSettings
25598
25766
  - type: object
25599
25767
  properties:
25600
25768
  connector:
@@ -25655,6 +25823,29 @@ components:
25655
25823
  required:
25656
25824
  - connector
25657
25825
  - setupSettings
25826
+ - type: object
25827
+ properties:
25828
+ connector:
25829
+ type: string
25830
+ enum:
25831
+ - builtin:freshdesk
25832
+ setupSettings:
25833
+ type: object
25834
+ properties:
25835
+ domain:
25836
+ type: string
25837
+ minLength: 1
25838
+ description: Freshdesk domain hosting the account, e.g. `mycompany.freshdesk.com` or just `mycompany`. Tickets and the API are scoped by this domain.
25839
+ apiKey:
25840
+ type: string
25841
+ minLength: 1
25842
+ description: Freshdesk API key with permission to read tickets. Sent as HTTP Basic auth and redacted when read back.
25843
+ required:
25844
+ - domain
25845
+ - apiKey
25846
+ required:
25847
+ - connector
25848
+ - setupSettings
25658
25849
  - type: object
25659
25850
  properties:
25660
25851
  connector:
@@ -25672,6 +25863,23 @@ components:
25672
25863
  required:
25673
25864
  - connector
25674
25865
  - setupSettings
25866
+ - type: object
25867
+ properties:
25868
+ connector:
25869
+ type: string
25870
+ enum:
25871
+ - builtin:hubspot
25872
+ setupSettings:
25873
+ type: object
25874
+ properties:
25875
+ token:
25876
+ type: string
25877
+ minLength: 1
25878
+ required:
25879
+ - token
25880
+ required:
25881
+ - connector
25882
+ - setupSettings
25675
25883
  - type: object
25676
25884
  properties:
25677
25885
  connector:
@@ -26875,8 +27083,7 @@ components:
26875
27083
  description: Name of the file.
26876
27084
  contentType:
26877
27085
  type: string
26878
- enum:
26879
- - application/pdf
27086
+ description: MIME type of the file. Must be a file type supported by the underlying model (see the OpenAI file-inputs documentation).
26880
27087
  required:
26881
27088
  - type
26882
27089
  - url
@@ -26902,6 +27109,20 @@ components:
26902
27109
  required:
26903
27110
  - spaceId
26904
27111
  - pageId
27112
+ comments:
27113
+ type: array
27114
+ description: Comments on the content the user is referring to in the message.
27115
+ items:
27116
+ type: object
27117
+ properties:
27118
+ id:
27119
+ type: string
27120
+ description: ID of the comment.
27121
+ content:
27122
+ type: string
27123
+ description: Snapshot of the comment for display.
27124
+ required:
27125
+ - id
26905
27126
  selection:
26906
27127
  type: object
26907
27128
  description: Range of the current selection in a document.
@@ -30882,16 +31103,6 @@ components:
30882
31103
  - tag_created
30883
31104
  - tag_deleted
30884
31105
  - tag_edited
30885
- GitSyncOperationState:
30886
- type: string
30887
- description: |
30888
- * `running`: The operation is still running
30889
- * `failure`: The operation failed
30890
- * `success`: The operation was successful
30891
- enum:
30892
- - running
30893
- - failure
30894
- - success
30895
31106
  GitSyncOperationDirection:
30896
31107
  type: string
30897
31108
  enum: