@gitbook/api 0.146.0 → 0.148.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
@@ -173,6 +173,12 @@ tags:
173
173
  x-parent: sites
174
174
  description: |
175
175
  This API delivers insights about how visitors interact with your site, including page views and user engagement, helping you measure and optimize your content strategy.
176
+ - name: site-ai
177
+ x-page-title: Site AI
178
+ x-page-description: Build conversational AI agents for your docs site.
179
+ x-parent: sites
180
+ description: |
181
+ Build advanced conversational AI experiences within your docs site that go beyond basic Q&A.
176
182
  - name: site-ask
177
183
  x-page-title: Site AI ask
178
184
  x-page-description: Allow AI-driven queries within a specific docs site.
@@ -1135,7 +1141,13 @@ paths:
1135
1141
  content:
1136
1142
  application/json:
1137
1143
  schema:
1138
- $ref: "#/components/schemas/ApplySpaceTemplate"
1144
+ allOf:
1145
+ - $ref: "#/components/schemas/ApplySpaceTemplate"
1146
+ - type: object
1147
+ properties:
1148
+ changeRequestId:
1149
+ type: string
1150
+ description: The ID of the change request to apply the template to. If not provided, the template is applied to the main content.
1139
1151
  "/spaces/{spaceId}/content/pages":
1140
1152
  get:
1141
1153
  operationId: listPages
@@ -1512,9 +1524,10 @@ paths:
1512
1524
  subject:
1513
1525
  type: string
1514
1526
  description: Subject of the change-request
1515
- agentTaskId:
1516
- type: string
1517
- description: ID of the agent task to implement
1527
+ template:
1528
+ $ref: "#/components/schemas/ApplySpaceTemplate"
1529
+ description: Template to apply to the change request
1530
+ additionalProperties: true
1518
1531
  get:
1519
1532
  operationId: listChangeRequestsForSpace
1520
1533
  summary: List all change requests
@@ -5988,17 +6001,6 @@ paths:
5988
6001
  - updatedAt
5989
6002
  - issues
5990
6003
  - conversations
5991
- - tasksTotal
5992
- - tasksBacklog
5993
- - tasksStarted
5994
- - name: status
5995
- in: query
5996
- description: Filter by status
5997
- schema:
5998
- type: string
5999
- enum:
6000
- - pending
6001
- - analysing
6002
6004
  security:
6003
6005
  - user: []
6004
6006
  responses:
@@ -6220,7 +6222,7 @@ paths:
6220
6222
  content:
6221
6223
  application/json:
6222
6224
  schema:
6223
- $ref: "#/components/schemas/AgentsSetupState"
6225
+ $ref: "#/components/schemas/AgentSetupState"
6224
6226
  "/orgs/{organizationId}/agent-instructions":
6225
6227
  get:
6226
6228
  operationId: getOrganizationAgentInstructions
@@ -6268,105 +6270,6 @@ paths:
6268
6270
  application/json:
6269
6271
  schema:
6270
6272
  $ref: "#/components/schemas/OrganizationAgentInstructions"
6271
- "/orgs/{organizationId}/agent-tasks":
6272
- get:
6273
- operationId: listAgentTasks
6274
- summary: List agent tasks
6275
- tags:
6276
- - agents
6277
- parameters:
6278
- - $ref: "#/components/parameters/organizationId"
6279
- - $ref: "#/components/parameters/listPage"
6280
- - $ref: "#/components/parameters/listLimit"
6281
- - name: cluster
6282
- in: query
6283
- description: The ID of the conversations issues cluster to filter the agent tasks by
6284
- schema:
6285
- type: string
6286
- - name: space
6287
- in: query
6288
- description: The ID of the space to filter the agent tasks by
6289
- schema:
6290
- type: string
6291
- - name: status
6292
- in: query
6293
- description: The statuses of the agent tasks to filter by
6294
- schema:
6295
- type: array
6296
- items:
6297
- $ref: "#/components/schemas/AgentTaskStatus"
6298
- security:
6299
- - user: []
6300
- responses:
6301
- "200":
6302
- description: OK
6303
- content:
6304
- application/json:
6305
- schema:
6306
- allOf:
6307
- - $ref: "#/components/schemas/List"
6308
- - type: object
6309
- required:
6310
- - items
6311
- properties:
6312
- items:
6313
- type: array
6314
- items:
6315
- $ref: "#/components/schemas/AgentTask"
6316
- "404":
6317
- $ref: "#/components/responses/NotFoundError"
6318
- "/orgs/{organizationId}/agent-tasks/{agentTaskId}":
6319
- get:
6320
- operationId: getAgentTask
6321
- summary: Get an agent task by its identifier
6322
- tags:
6323
- - agents
6324
- parameters:
6325
- - $ref: "#/components/parameters/organizationId"
6326
- - $ref: "#/components/parameters/agentTaskId"
6327
- security:
6328
- - user: []
6329
- responses:
6330
- "200":
6331
- description: OK
6332
- content:
6333
- application/json:
6334
- schema:
6335
- $ref: "#/components/schemas/AgentTask"
6336
- "404":
6337
- $ref: "#/components/responses/NotFoundError"
6338
- patch:
6339
- operationId: updateAgentTask
6340
- summary: Update an agent task by its identifier
6341
- tags:
6342
- - agents
6343
- parameters:
6344
- - $ref: "#/components/parameters/organizationId"
6345
- - $ref: "#/components/parameters/agentTaskId"
6346
- security:
6347
- - user: []
6348
- requestBody:
6349
- required: true
6350
- content:
6351
- application/json:
6352
- schema:
6353
- type: object
6354
- properties:
6355
- status:
6356
- type: string
6357
- enum:
6358
- - backlog
6359
- - started
6360
- - canceled
6361
- required:
6362
- - status
6363
- responses:
6364
- "200":
6365
- description: OK
6366
- content:
6367
- application/json:
6368
- schema:
6369
- $ref: "#/components/schemas/AgentTask"
6370
6273
  "/orgs/{organizationId}/translations":
6371
6274
  get:
6372
6275
  operationId: listTranslations
@@ -6807,6 +6710,10 @@ paths:
6807
6710
  $ref: "#/components/schemas/ContentImportSource"
6808
6711
  target:
6809
6712
  $ref: "#/components/schemas/ContentImportTarget"
6713
+ enhance:
6714
+ description: Enhance the imported content with AI
6715
+ default: true
6716
+ type: boolean
6810
6717
  required:
6811
6718
  - source
6812
6719
  - target
@@ -8691,8 +8598,7 @@ paths:
8691
8598
  description: |
8692
8599
  Generate an AI response in a conversation.
8693
8600
  tags:
8694
- - sites
8695
- x-internal: true
8601
+ - site-ai
8696
8602
  security:
8697
8603
  - user: []
8698
8604
  parameters:
@@ -8738,7 +8644,7 @@ paths:
8738
8644
  description: |
8739
8645
  Experimental operation to get an existing AI response in a site.
8740
8646
  tags:
8741
- - sites
8647
+ - site-ai
8742
8648
  x-internal: true
8743
8649
  security:
8744
8650
  - user: []
@@ -9878,13 +9784,6 @@ components:
9878
9784
  description: Identifier of the conversation
9879
9785
  schema:
9880
9786
  type: string
9881
- agentTaskId:
9882
- name: agentTaskId
9883
- in: path
9884
- required: true
9885
- description: The unique id of the agent task
9886
- schema:
9887
- type: string
9888
9787
  translationId:
9889
9788
  name: translationId
9890
9789
  in: path
@@ -10710,6 +10609,16 @@ components:
10710
10609
  type: array
10711
10610
  items:
10712
10611
  $ref: "#/components/schemas/SearchSectionResult"
10612
+ ancestors:
10613
+ type: array
10614
+ description: Data about the ancestors of the current page, from top-level to direct parent.
10615
+ items:
10616
+ type: object
10617
+ properties:
10618
+ title:
10619
+ type: string
10620
+ required:
10621
+ - title
10713
10622
  urls:
10714
10623
  type: object
10715
10624
  description: URLs associated with the object
@@ -10724,6 +10633,7 @@ components:
10724
10633
  - id
10725
10634
  - title
10726
10635
  - path
10636
+ - ancestors
10727
10637
  - urls
10728
10638
  UpdateSpaceGitInfo:
10729
10639
  type: object
@@ -13169,6 +13079,7 @@ components:
13169
13079
  - $ref: "#/components/schemas/DocumentBlockQuote"
13170
13080
  - $ref: "#/components/schemas/DocumentBlockMath"
13171
13081
  - $ref: "#/components/schemas/DocumentBlockIntegration"
13082
+ - $ref: "#/components/schemas/DocumentBlockExpandable"
13172
13083
  data:
13173
13084
  type: object
13174
13085
  properties:
@@ -13241,6 +13152,7 @@ components:
13241
13152
  - $ref: "#/components/schemas/DocumentBlockMath"
13242
13153
  - $ref: "#/components/schemas/DocumentBlockQuote"
13243
13154
  - $ref: "#/components/schemas/DocumentBlockTable"
13155
+ - $ref: "#/components/schemas/DocumentBlockExpandable"
13244
13156
  isVoid:
13245
13157
  type: boolean
13246
13158
  enum:
@@ -13610,6 +13522,9 @@ components:
13610
13522
  properties:
13611
13523
  models:
13612
13524
  type: boolean
13525
+ downloadLink:
13526
+ type: boolean
13527
+ description: Whether to show a link to download the OpenAPI spec.
13613
13528
  required:
13614
13529
  - models
13615
13530
  TranslationRef:
@@ -14580,12 +14495,6 @@ components:
14580
14495
  $ref: "#/components/schemas/BlockReason"
14581
14496
  required:
14582
14497
  - reason
14583
- internal_isOnNewTrial:
14584
- type: boolean
14585
- description: Deprecated. Always true. All organizations are on new trials.
14586
- deprecated: true
14587
- enum:
14588
- - true
14589
14498
  internal_billingMigration:
14590
14499
  type: object
14591
14500
  properties:
@@ -14919,7 +14828,7 @@ components:
14919
14828
  type: string
14920
14829
  minLength: 1
14921
14830
  maxLength: 100
14922
- pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
14831
+ pattern: ^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$
14923
14832
  OpenAPISpecProcessingState:
14924
14833
  description: Processing state
14925
14834
  enum:
@@ -18995,6 +18904,7 @@ components:
18995
18904
  type:
18996
18905
  description: The site type to migrate to
18997
18906
  $ref: "#/components/schemas/SiteType"
18907
+ additionalProperties: false
18998
18908
  required:
18999
18909
  - id
19000
18910
  - type
@@ -19004,13 +18914,28 @@ components:
19004
18914
  description: The site identifier
19005
18915
  type: string
19006
18916
  isPublished:
19007
- description: Can be set to `false` to unpublish a site
18917
+ description: Can be set to `false` or `true` to either unpublish or publish a site
19008
18918
  type: boolean
19009
- enum:
19010
- - false
18919
+ additionalProperties: false
19011
18920
  required:
19012
18921
  - id
19013
18922
  - isPublished
18923
+ - type: object
18924
+ properties:
18925
+ id:
18926
+ description: The site identifier
18927
+ type: string
18928
+ type:
18929
+ description: The site type to migrate to
18930
+ $ref: "#/components/schemas/SiteType"
18931
+ isPublished:
18932
+ description: Can be set to `false` or `true` to either unpublish or publish a site
18933
+ type: boolean
18934
+ additionalProperties: false
18935
+ required:
18936
+ - id
18937
+ - type
18938
+ - isPublished
19014
18939
  required:
19015
18940
  - removeMembers
19016
18941
  - updateSites
@@ -19793,29 +19718,9 @@ components:
19793
19718
  conversations:
19794
19719
  type: number
19795
19720
  description: The number of conversations in the conversations issues cluster
19796
- tasksTotal:
19797
- type: number
19798
- description: The number of tasks in the conversations issues cluster
19799
- tasksBacklog:
19800
- type: number
19801
- description: The number of tasks in the backlog in the conversations issues cluster
19802
- tasksStarted:
19803
- type: number
19804
- description: The number of tasks done in the conversations issues cluster
19805
- tasksCompleted:
19806
- type: number
19807
- description: The number of tasks completed in the conversations issues cluster
19808
- tasksCancelled:
19809
- type: number
19810
- description: The number of tasks canceled in the conversations issues cluster
19811
19721
  required:
19812
19722
  - issues
19813
19723
  - conversations
19814
- - tasksTotal
19815
- - tasksBacklog
19816
- - tasksStarted
19817
- - tasksCompleted
19818
- - tasksCancelled
19819
19724
  urls:
19820
19725
  type: object
19821
19726
  description: URLs associated with the conversations issues cluster
@@ -19824,12 +19729,7 @@ components:
19824
19729
  type: string
19825
19730
  description: URL of the conversations issues cluster in the API
19826
19731
  format: uri
19827
- app:
19828
- type: string
19829
- description: URL of the conversations issues cluster in the application
19830
- format: uri
19831
19732
  required:
19832
- - app
19833
19733
  - location
19834
19734
  required:
19835
19735
  - object
@@ -19995,7 +19895,7 @@ components:
19995
19895
  - ingestedAt
19996
19896
  - conversation
19997
19897
  - urls
19998
- AgentsSetupState:
19898
+ AgentSetupState:
19999
19899
  type: object
20000
19900
  description: State and settings of the agent
20001
19901
  properties:
@@ -20006,18 +19906,6 @@ components:
20006
19906
  type: object
20007
19907
  description: The stats of the agent.
20008
19908
  properties:
20009
- backlogTasks:
20010
- type: number
20011
- description: The number of tasks in the backlog.
20012
- startedTasks:
20013
- type: number
20014
- description: The number of tasks in progress.
20015
- completedTasks:
20016
- type: number
20017
- description: The number of tasks that have been completed.
20018
- canceledTasks:
20019
- type: number
20020
- description: The number of tasks that have been canceled.
20021
19909
  conversations:
20022
19910
  type: number
20023
19911
  description: The number of conversations the agent has indexed.
@@ -20026,17 +19914,13 @@ components:
20026
19914
  description: The number of issues the agent has indexed.
20027
19915
  issuesClusters:
20028
19916
  type: number
20029
- description: The number of issues clusters the agent has indexed.
19917
+ description: The number of issue clusters the agent has indexed.
20030
19918
  sources:
20031
19919
  type: object
20032
19920
  additionalProperties:
20033
19921
  type: number
20034
19922
  description: The number of conversations ingested for the source
20035
19923
  required:
20036
- - backlogTasks
20037
- - startedTasks
20038
- - completedTasks
20039
- - canceledTasks
20040
19924
  - conversations
20041
19925
  - issues
20042
19926
  - issuesClusters
@@ -20080,74 +19964,6 @@ components:
20080
19964
  - updatedAt
20081
19965
  - updatedBy
20082
19966
  - urls
20083
- AgentTaskStatus:
20084
- type: string
20085
- description: |
20086
- The status of the agent task. - `backlog`: The task has not been started yet, a human should review its specification. - `started`: The task is open, a change request is associated with it. - `completed`: The task is completed. - `canceled`: The task has been canceled by a human.
20087
- enum:
20088
- - backlog
20089
- - started
20090
- - completed
20091
- - canceled
20092
- AgentTask:
20093
- type: object
20094
- properties:
20095
- object:
20096
- type: string
20097
- enum:
20098
- - agent-task
20099
- id:
20100
- type: string
20101
- description: The ID of the agent task
20102
- title:
20103
- type: string
20104
- description: The title of the agent task
20105
- description:
20106
- type: string
20107
- description: The description of the agent task
20108
- instructions:
20109
- $ref: "#/components/schemas/JSONDocument"
20110
- status:
20111
- $ref: "#/components/schemas/AgentTaskStatus"
20112
- createdAt:
20113
- $ref: "#/components/schemas/Timestamp"
20114
- updatedAt:
20115
- $ref: "#/components/schemas/Timestamp"
20116
- cluster:
20117
- type: string
20118
- description: ID of the cluster the agent task is associated with.
20119
- space:
20120
- type: string
20121
- description: ID of the space the agent task will act on.
20122
- changeRequest:
20123
- type: string
20124
- description: ID of the change request the agent task is associated with.
20125
- urls:
20126
- type: object
20127
- description: URLs associated with the agent task
20128
- properties:
20129
- location:
20130
- type: string
20131
- description: URL of the agent task in the API
20132
- format: uri
20133
- app:
20134
- type: string
20135
- description: URL of the agent task in the application
20136
- format: uri
20137
- required:
20138
- - app
20139
- - location
20140
- required:
20141
- - object
20142
- - id
20143
- - title
20144
- - description
20145
- - instructions
20146
- - space
20147
- - status
20148
- - createdAt
20149
- - updatedAt
20150
- - urls
20151
19967
  TranslationStatus:
20152
19968
  type: string
20153
19969
  enum:
@@ -20480,7 +20296,9 @@ components:
20480
20296
  enum:
20481
20297
  - file
20482
20298
  files:
20299
+ description: Files to import
20483
20300
  type: array
20301
+ maxItems: 50
20484
20302
  items:
20485
20303
  description: Key of file
20486
20304
  type: string
@@ -20523,7 +20341,7 @@ components:
20523
20341
  - failed
20524
20342
  - cancelled
20525
20343
  pages:
20526
- description: Imported pages
20344
+ description: Pages included in the import
20527
20345
  type: array
20528
20346
  items:
20529
20347
  type: object
@@ -20534,8 +20352,22 @@ components:
20534
20352
  sourceURL:
20535
20353
  description: Source URL where the page has been imported from
20536
20354
  type: string
20355
+ type:
20356
+ description: Type of page
20357
+ type: string
20358
+ enum:
20359
+ - page
20360
+ - folder
20361
+ status:
20362
+ description: Status of the page
20363
+ type: string
20364
+ enum:
20365
+ - complete
20366
+ - pending
20537
20367
  required:
20538
20368
  - id
20369
+ - type
20370
+ - status
20539
20371
  required:
20540
20372
  - id
20541
20373
  - status
@@ -22063,6 +21895,58 @@ components:
22063
21895
  - tool
22064
21896
  - spaceId
22065
21897
  - page
21898
+ AIToolCallCreateReusableContent:
21899
+ type: object
21900
+ properties:
21901
+ tool:
21902
+ type: string
21903
+ enum:
21904
+ - createReusableContent
21905
+ spaceId:
21906
+ type: string
21907
+ description: The ID of the space being edited.
21908
+ reusableContent:
21909
+ $ref: "#/components/schemas/ChangedRevisionReusableContent"
21910
+ required:
21911
+ - tool
21912
+ - spaceId
21913
+ - reusableContent
21914
+ AIToolCallEditReusableContent:
21915
+ type: object
21916
+ properties:
21917
+ tool:
21918
+ type: string
21919
+ enum:
21920
+ - editReusableContent
21921
+ spaceId:
21922
+ type: string
21923
+ description: The ID of the space being edited.
21924
+ reusableContent:
21925
+ $ref: "#/components/schemas/ChangedRevisionReusableContent"
21926
+ required:
21927
+ - tool
21928
+ - spaceId
21929
+ - reusableContent
21930
+ AIToolCallGetReusableContent:
21931
+ type: object
21932
+ properties:
21933
+ tool:
21934
+ type: string
21935
+ enum:
21936
+ - getReusableContent
21937
+ spaceId:
21938
+ type: string
21939
+ description: The ID of the space being accessed.
21940
+ revisionId:
21941
+ type: string
21942
+ description: The ID of the revision within which the reusable content is being fetched.
21943
+ reusableContent:
21944
+ $ref: "#/components/schemas/ChangedRevisionReusableContent"
21945
+ required:
21946
+ - tool
21947
+ - spaceId
21948
+ - reusableContent
21949
+ - revisionId
22066
21950
  AIToolCallCreateChangeRequest:
22067
21951
  type: object
22068
21952
  properties:
@@ -22218,6 +22102,9 @@ components:
22218
22102
  - $ref: "#/components/schemas/AIToolCallMovePage"
22219
22103
  - $ref: "#/components/schemas/AIToolCallListModifiedPages"
22220
22104
  - $ref: "#/components/schemas/AIToolCallGetPageDiff"
22105
+ - $ref: "#/components/schemas/AIToolCallCreateReusableContent"
22106
+ - $ref: "#/components/schemas/AIToolCallEditReusableContent"
22107
+ - $ref: "#/components/schemas/AIToolCallGetReusableContent"
22221
22108
  - $ref: "#/components/schemas/AIToolCallCreateChangeRequest"
22222
22109
  - $ref: "#/components/schemas/AIToolCallComment"
22223
22110
  - $ref: "#/components/schemas/AIToolCallReplyToComment"
@@ -25001,6 +24888,16 @@ components:
25001
24888
  type: array
25002
24889
  items:
25003
24890
  $ref: "#/components/schemas/InputFile"
24891
+ BillingStatus:
24892
+ type: string
24893
+ enum:
24894
+ - trialing
24895
+ - active
24896
+ - past_due
24897
+ - incomplete_expired
24898
+ - canceled
24899
+ - unpaid
24900
+ - paused
25004
24901
  APIIntegrationScope:
25005
24902
  type: string
25006
24903
  enum:
@@ -25994,38 +25891,6 @@ components:
25994
25891
  required:
25995
25892
  - channel
25996
25893
  - translation
25997
- AgentTaskChannel:
25998
- type: object
25999
- description: Subscription channel for an agent task.
26000
- properties:
26001
- channel:
26002
- type: string
26003
- enum:
26004
- - agent-task
26005
- organization:
26006
- type: string
26007
- description: The ID of the organization.
26008
- agentTask:
26009
- type: string
26010
- description: The ID of the agent task.
26011
- required:
26012
- - channel
26013
- - organization
26014
- - agentTask
26015
- AgentTasksChannel:
26016
- type: object
26017
- description: Subscription channel for agent tasks.
26018
- properties:
26019
- channel:
26020
- type: string
26021
- enum:
26022
- - agent-tasks
26023
- organization:
26024
- type: string
26025
- description: The ID of the organization.
26026
- required:
26027
- - channel
26028
- - organization
26029
25894
  ImportRunChannel:
26030
25895
  type: object
26031
25896
  properties:
@@ -26109,8 +25974,6 @@ components:
26109
25974
  - $ref: "#/components/schemas/SubdomainChannel"
26110
25975
  - $ref: "#/components/schemas/TranslationChannel"
26111
25976
  - $ref: "#/components/schemas/TranslationRunChannel"
26112
- - $ref: "#/components/schemas/AgentTaskChannel"
26113
- - $ref: "#/components/schemas/AgentTasksChannel"
26114
25977
  - $ref: "#/components/schemas/ImportRunChannel"
26115
25978
  discriminator:
26116
25979
  propertyName: channel
@@ -26507,6 +26370,8 @@ components:
26507
26370
  $ref: "#/components/schemas/SiteRedirectDestinationSiteSpace"
26508
26371
  OpenAPISpecSourceURL:
26509
26372
  $ref: "#/components/schemas/URL"
26373
+ AgentsSetupState:
26374
+ $ref: "#/components/schemas/AgentSetupState"
26510
26375
  responses:
26511
26376
  NotFoundError:
26512
26377
  description: Not Found