@gitbook/api 0.161.0 → 0.163.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
@@ -192,9 +192,19 @@ tags:
192
192
  description: |
193
193
  Manage the contextual records and topics used by your site to power AI experiences and insights.
194
194
 
195
- {% openapi-schemas spec="gitbook" schemas="ContextRecord,ContextConnection,ContextTopic" grouped="false" %}
195
+ {% openapi-schemas spec="gitbook" schemas="ContextRecord,ContextConnection,SiteTopic" grouped="false" %}
196
196
  The Site Context objects
197
197
  {% endopenapi-schemas %}
198
+ - name: site-questions
199
+ x-page-title: Site questions
200
+ x-page-description: Review questions, answers, and sources generated for a docs site.
201
+ x-parent: sites
202
+ description: |
203
+ Inspect the canonical questions asked on your site, the generated answers linked to each question, and the sources used for each answer.
204
+
205
+ {% openapi-schemas spec="gitbook" schemas="SiteQuestion,SiteQuestionAnswer,SiteQuestionAnswerWithResponse,SiteQuestionAnswerSource" grouped="false" %}
206
+ The Site Questions objects
207
+ {% endopenapi-schemas %}
198
208
  - name: collections
199
209
  x-page-icon: folder
200
210
  x-page-title: Collections
@@ -8078,7 +8088,11 @@ paths:
8078
8088
  items:
8079
8089
  type: array
8080
8090
  items:
8081
- $ref: "#/components/schemas/SearchSpaceResult"
8091
+ oneOf:
8092
+ - $ref: "#/components/schemas/SearchSpaceResult"
8093
+ - $ref: "#/components/schemas/SearchRecordResult"
8094
+ discriminator:
8095
+ propertyName: type
8082
8096
  "/orgs/{organizationId}/sites/{siteId}/ask":
8083
8097
  post:
8084
8098
  operationId: streamAskInSite
@@ -8179,6 +8193,11 @@ paths:
8179
8193
  description: Filter context records by connection id.
8180
8194
  schema:
8181
8195
  type: string
8196
+ - name: topic
8197
+ in: query
8198
+ description: Filter context records by associated site topic ID.
8199
+ schema:
8200
+ type: string
8182
8201
  responses:
8183
8202
  "200":
8184
8203
  description: OK
@@ -8357,10 +8376,10 @@ paths:
8357
8376
  "400":
8358
8377
  description: Connection was synced less than an hour ago or invalid connector
8359
8378
  $ref: "#/components/responses/BadRequestError"
8360
- "/orgs/{organizationId}/sites/{siteId}/context-topics":
8379
+ "/orgs/{organizationId}/sites/{siteId}/topics":
8361
8380
  get:
8362
- operationId: listSiteContextTopics
8363
- summary: List all context topics
8381
+ operationId: listSiteTopics
8382
+ summary: List all topics
8364
8383
  tags:
8365
8384
  - site-context
8366
8385
  security:
@@ -8368,28 +8387,24 @@ paths:
8368
8387
  parameters:
8369
8388
  - $ref: "#/components/parameters/organizationId"
8370
8389
  - $ref: "#/components/parameters/siteId"
8371
- - $ref: "#/components/parameters/listPage"
8372
- - $ref: "#/components/parameters/listLimit"
8373
8390
  responses:
8374
8391
  "200":
8375
8392
  description: OK
8376
8393
  content:
8377
8394
  application/json:
8378
8395
  schema:
8379
- allOf:
8380
- - $ref: "#/components/schemas/List"
8381
- - type: object
8382
- required:
8383
- - items
8384
- properties:
8385
- items:
8386
- type: array
8387
- items:
8388
- $ref: "#/components/schemas/ContextTopic"
8389
- "/orgs/{organizationId}/sites/{siteId}/context-topics/{siteContextTopicId}":
8396
+ type: object
8397
+ required:
8398
+ - items
8399
+ properties:
8400
+ items:
8401
+ type: array
8402
+ items:
8403
+ $ref: "#/components/schemas/SiteTopic"
8404
+ "/orgs/{organizationId}/sites/{siteId}/topics/{siteTopicId}":
8390
8405
  get:
8391
- operationId: getSiteContextTopicById
8392
- summary: Get a context topic
8406
+ operationId: getSiteTopicById
8407
+ summary: Get a topic
8393
8408
  tags:
8394
8409
  - site-context
8395
8410
  security:
@@ -8397,17 +8412,17 @@ paths:
8397
8412
  parameters:
8398
8413
  - $ref: "#/components/parameters/organizationId"
8399
8414
  - $ref: "#/components/parameters/siteId"
8400
- - $ref: "#/components/parameters/siteContextTopicId"
8415
+ - $ref: "#/components/parameters/siteTopicId"
8401
8416
  responses:
8402
8417
  "200":
8403
8418
  description: OK
8404
8419
  content:
8405
8420
  application/json:
8406
8421
  schema:
8407
- $ref: "#/components/schemas/ContextTopic"
8422
+ $ref: "#/components/schemas/SiteTopic"
8408
8423
  patch:
8409
- operationId: updateSiteContextTopicById
8410
- summary: Update a context topic
8424
+ operationId: updateSiteTopicById
8425
+ summary: Update a topic
8411
8426
  tags:
8412
8427
  - site-context
8413
8428
  security:
@@ -8415,7 +8430,7 @@ paths:
8415
8430
  parameters:
8416
8431
  - $ref: "#/components/parameters/organizationId"
8417
8432
  - $ref: "#/components/parameters/siteId"
8418
- - $ref: "#/components/parameters/siteContextTopicId"
8433
+ - $ref: "#/components/parameters/siteTopicId"
8419
8434
  requestBody:
8420
8435
  required: true
8421
8436
  content:
@@ -8433,7 +8448,178 @@ paths:
8433
8448
  content:
8434
8449
  application/json:
8435
8450
  schema:
8436
- $ref: "#/components/schemas/ContextTopic"
8451
+ $ref: "#/components/schemas/SiteTopic"
8452
+ "/orgs/{organizationId}/sites/{siteId}/questions":
8453
+ get:
8454
+ operationId: listSiteQuestions
8455
+ summary: List all questions in a site
8456
+ tags:
8457
+ - site-questions
8458
+ security:
8459
+ - user: []
8460
+ parameters:
8461
+ - $ref: "#/components/parameters/organizationId"
8462
+ - $ref: "#/components/parameters/siteId"
8463
+ - name: type
8464
+ in: query
8465
+ description: Filter questions by question type.
8466
+ schema:
8467
+ $ref: "#/components/schemas/SiteQuestionType"
8468
+ - $ref: "#/components/parameters/listPage"
8469
+ - $ref: "#/components/parameters/listLimit"
8470
+ responses:
8471
+ "200":
8472
+ description: OK
8473
+ content:
8474
+ application/json:
8475
+ schema:
8476
+ allOf:
8477
+ - $ref: "#/components/schemas/List"
8478
+ - type: object
8479
+ required:
8480
+ - items
8481
+ properties:
8482
+ items:
8483
+ type: array
8484
+ items:
8485
+ $ref: "#/components/schemas/SiteQuestion"
8486
+ "/orgs/{organizationId}/sites/{siteId}/questions/{siteQuestionId}":
8487
+ get:
8488
+ operationId: getSiteQuestionById
8489
+ summary: Get a site question by ID
8490
+ tags:
8491
+ - site-questions
8492
+ security:
8493
+ - user: []
8494
+ parameters:
8495
+ - $ref: "#/components/parameters/organizationId"
8496
+ - $ref: "#/components/parameters/siteId"
8497
+ - $ref: "#/components/parameters/siteQuestionId"
8498
+ responses:
8499
+ "200":
8500
+ description: OK
8501
+ content:
8502
+ application/json:
8503
+ schema:
8504
+ $ref: "#/components/schemas/SiteQuestion"
8505
+ "/orgs/{organizationId}/sites/{siteId}/answers":
8506
+ get:
8507
+ operationId: listSiteQuestionAnswers
8508
+ summary: List all answers for a site
8509
+ tags:
8510
+ - site-questions
8511
+ security:
8512
+ - user: []
8513
+ parameters:
8514
+ - $ref: "#/components/parameters/organizationId"
8515
+ - $ref: "#/components/parameters/siteId"
8516
+ - name: question
8517
+ in: query
8518
+ description: Filter answers to a specific site question ID.
8519
+ schema:
8520
+ type: string
8521
+ - name: language
8522
+ in: query
8523
+ description: Filter answers by ISO language code.
8524
+ schema:
8525
+ type: string
8526
+ - name: answered
8527
+ in: query
8528
+ description: Filter answers by answered resolution.
8529
+ schema:
8530
+ $ref: "#/components/schemas/SiteQuestionAnswerResolution"
8531
+ - name: confidence
8532
+ in: query
8533
+ description: Filter answers by answered confidence.
8534
+ schema:
8535
+ $ref: "#/components/schemas/SiteQuestionAnswerConfidence"
8536
+ - name: relevance
8537
+ in: query
8538
+ description: Filter answers by question relevance.
8539
+ schema:
8540
+ $ref: "#/components/schemas/SiteQuestionAnswerRelevance"
8541
+ - name: question.type
8542
+ in: query
8543
+ description: Filter answers by question type.
8544
+ schema:
8545
+ $ref: "#/components/schemas/SiteQuestionType"
8546
+ - name: topic
8547
+ in: query
8548
+ description: Filter answers by associated site topic ID.
8549
+ schema:
8550
+ type: string
8551
+ - name: thread
8552
+ in: query
8553
+ description: Filter answers by thread root answer ID. Includes the root answer itself.
8554
+ schema:
8555
+ type: string
8556
+ - $ref: "#/components/parameters/listPage"
8557
+ - $ref: "#/components/parameters/listLimit"
8558
+ responses:
8559
+ "200":
8560
+ description: OK
8561
+ content:
8562
+ application/json:
8563
+ schema:
8564
+ allOf:
8565
+ - $ref: "#/components/schemas/List"
8566
+ - type: object
8567
+ required:
8568
+ - items
8569
+ properties:
8570
+ items:
8571
+ type: array
8572
+ items:
8573
+ $ref: "#/components/schemas/SiteQuestionAnswer"
8574
+ "/orgs/{organizationId}/sites/{siteId}/answers/{siteQuestionAnswerId}":
8575
+ get:
8576
+ operationId: getSiteQuestionAnswerById
8577
+ summary: Get a site answer by ID
8578
+ tags:
8579
+ - site-questions
8580
+ security:
8581
+ - user: []
8582
+ parameters:
8583
+ - $ref: "#/components/parameters/organizationId"
8584
+ - $ref: "#/components/parameters/siteId"
8585
+ - $ref: "#/components/parameters/siteQuestionAnswerId"
8586
+ responses:
8587
+ "200":
8588
+ description: OK
8589
+ content:
8590
+ application/json:
8591
+ schema:
8592
+ $ref: "#/components/schemas/SiteQuestionAnswerWithResponse"
8593
+ "/orgs/{organizationId}/sites/{siteId}/answers/{siteQuestionAnswerId}/sources":
8594
+ get:
8595
+ operationId: listSiteQuestionAnswerSources
8596
+ summary: List the sources for an answer
8597
+ tags:
8598
+ - site-questions
8599
+ security:
8600
+ - user: []
8601
+ parameters:
8602
+ - $ref: "#/components/parameters/organizationId"
8603
+ - $ref: "#/components/parameters/siteId"
8604
+ - $ref: "#/components/parameters/siteQuestionAnswerId"
8605
+ - $ref: "#/components/parameters/listPage"
8606
+ - $ref: "#/components/parameters/listLimit"
8607
+ responses:
8608
+ "200":
8609
+ description: OK
8610
+ content:
8611
+ application/json:
8612
+ schema:
8613
+ allOf:
8614
+ - $ref: "#/components/schemas/List"
8615
+ - type: object
8616
+ required:
8617
+ - items
8618
+ properties:
8619
+ items:
8620
+ type: array
8621
+ items:
8622
+ $ref: "#/components/schemas/SiteQuestionAnswerSource"
8437
8623
  "/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}":
8438
8624
  patch:
8439
8625
  operationId: updateSiteSpaceById
@@ -9247,6 +9433,8 @@ paths:
9247
9433
  $ref: "#/components/schemas/AIToolDefinition"
9248
9434
  toolCall:
9249
9435
  $ref: "#/components/schemas/AIToolCallResult"
9436
+ session:
9437
+ $ref: "#/components/schemas/SiteInsightsSession"
9250
9438
  responses:
9251
9439
  "200":
9252
9440
  description: OK
@@ -9377,7 +9565,7 @@ paths:
9377
9565
  source:
9378
9566
  $ref: "#/components/schemas/SiteRedirectSourcePath"
9379
9567
  destination:
9380
- $ref: "#/components/schemas/SiteRedirectDestination"
9568
+ $ref: "#/components/schemas/SiteRedirectInputDestination"
9381
9569
  required:
9382
9570
  - source
9383
9571
  - destination
@@ -9388,6 +9576,101 @@ paths:
9388
9576
  application/json:
9389
9577
  schema:
9390
9578
  $ref: "#/components/schemas/SiteRedirect"
9579
+ put:
9580
+ operationId: bulkUpsertSiteRedirects
9581
+ summary: Create or update site redirects in bulk
9582
+ tags:
9583
+ - site-redirects
9584
+ security:
9585
+ - user: []
9586
+ parameters:
9587
+ - $ref: "#/components/parameters/organizationId"
9588
+ - $ref: "#/components/parameters/siteId"
9589
+ requestBody:
9590
+ required: true
9591
+ content:
9592
+ application/json:
9593
+ schema:
9594
+ type: object
9595
+ properties:
9596
+ redirects:
9597
+ type: array
9598
+ minItems: 1
9599
+ maxItems: 500
9600
+ items:
9601
+ type: object
9602
+ properties:
9603
+ source:
9604
+ $ref: "#/components/schemas/SiteRedirectSourcePath"
9605
+ destination:
9606
+ $ref: "#/components/schemas/SiteRedirectInputDestination"
9607
+ required:
9608
+ - source
9609
+ - destination
9610
+ required:
9611
+ - redirects
9612
+ responses:
9613
+ "200":
9614
+ description: List of results for each redirect processed.
9615
+ content:
9616
+ application/json:
9617
+ schema:
9618
+ type: object
9619
+ properties:
9620
+ results:
9621
+ type: array
9622
+ items:
9623
+ oneOf:
9624
+ - type: object
9625
+ properties:
9626
+ status:
9627
+ type: string
9628
+ enum:
9629
+ - created
9630
+ description: The redirect was created.
9631
+ source:
9632
+ $ref: "#/components/schemas/SiteRedirectSourcePath"
9633
+ id:
9634
+ type: string
9635
+ description: The ID of the created redirect.
9636
+ required:
9637
+ - status
9638
+ - source
9639
+ - id
9640
+ - type: object
9641
+ properties:
9642
+ status:
9643
+ type: string
9644
+ enum:
9645
+ - updated
9646
+ description: The redirect was updated.
9647
+ source:
9648
+ $ref: "#/components/schemas/SiteRedirectSourcePath"
9649
+ id:
9650
+ type: string
9651
+ description: The ID of the updated redirect.
9652
+ required:
9653
+ - status
9654
+ - source
9655
+ - id
9656
+ - type: object
9657
+ properties:
9658
+ status:
9659
+ type: string
9660
+ enum:
9661
+ - error
9662
+ description: There was an error processing the redirect.
9663
+ source:
9664
+ $ref: "#/components/schemas/SiteRedirectSourcePath"
9665
+ error:
9666
+ type: string
9667
+ description: The error message.
9668
+ required:
9669
+ - status
9670
+ - source
9671
+ - error
9672
+ required:
9673
+ - results
9391
9674
  get:
9392
9675
  operationId: listSiteRedirects
9393
9676
  summary: List all site redirects
@@ -10452,11 +10735,25 @@ components:
10452
10735
  description: The unique id of the context connection
10453
10736
  schema:
10454
10737
  type: string
10455
- siteContextTopicId:
10456
- name: siteContextTopicId
10738
+ siteTopicId:
10739
+ name: siteTopicId
10740
+ in: path
10741
+ required: true
10742
+ description: The unique id of the topic
10743
+ schema:
10744
+ type: string
10745
+ siteQuestionId:
10746
+ name: siteQuestionId
10747
+ in: path
10748
+ required: true
10749
+ description: The unique id of the site question
10750
+ schema:
10751
+ type: string
10752
+ siteQuestionAnswerId:
10753
+ name: siteQuestionAnswerId
10457
10754
  in: path
10458
10755
  required: true
10459
- description: The unique id of the context topic
10756
+ description: The unique id of the site question answer
10460
10757
  schema:
10461
10758
  type: string
10462
10759
  siteSpaceId:
@@ -14784,18 +15081,30 @@ components:
14784
15081
  type: string
14785
15082
  description: ID of the document with the content body. If undefined, the reusable content is empty.
14786
15083
  RevisionTag:
14787
- type: object
14788
- description: A reusable tag that different types of content can be associated to (e.g. pages, update entries)
14789
- properties:
14790
- slug:
14791
- type: string
14792
- description: The slug identifier for the tag, immutable after creation.
14793
- label:
14794
- type: string
14795
- description: Display label for the tag. Can be renamed and differ from the slug.
14796
- required:
14797
- - slug
14798
- - label
15084
+ allOf:
15085
+ - type: object
15086
+ description: A reusable tag that different types of content can be associated to (e.g. pages, update entries)
15087
+ properties:
15088
+ slug:
15089
+ type: string
15090
+ description: The slug identifier for the tag, immutable after creation.
15091
+ label:
15092
+ type: string
15093
+ description: Display label for the tag. Can be renamed and differ from the slug.
15094
+ required:
15095
+ - slug
15096
+ - label
15097
+ - oneOf:
15098
+ - type: object
15099
+ properties:
15100
+ emoji:
15101
+ $ref: "#/components/schemas/Emoji"
15102
+ required:
15103
+ - emoji
15104
+ - type: object
15105
+ properties:
15106
+ icon:
15107
+ $ref: "#/components/schemas/Icon"
14799
15108
  GitSyncCommit:
14800
15109
  type: object
14801
15110
  properties:
@@ -15074,6 +15383,7 @@ components:
15074
15383
  description: Name of the organization
15075
15384
  minLength: 2
15076
15385
  maxLength: 255
15386
+ pattern: \S.*\S
15077
15387
  OrganizationEmailDomains:
15078
15388
  type: array
15079
15389
  items:
@@ -20134,6 +20444,10 @@ components:
20134
20444
  type: object
20135
20445
  description: Search result representing a space.
20136
20446
  properties:
20447
+ type:
20448
+ type: string
20449
+ enum:
20450
+ - space
20137
20451
  id:
20138
20452
  type: string
20139
20453
  title:
@@ -20143,6 +20457,7 @@ components:
20143
20457
  items:
20144
20458
  $ref: "#/components/schemas/SearchPageResult"
20145
20459
  required:
20460
+ - type
20146
20461
  - id
20147
20462
  - title
20148
20463
  - pages
@@ -22490,6 +22805,32 @@ components:
22490
22805
  type: string
22491
22806
  enum:
22492
22807
  - all
22808
+ SearchRecordResult:
22809
+ type: object
22810
+ description: Search result representing a site context record.
22811
+ properties:
22812
+ type:
22813
+ type: string
22814
+ enum:
22815
+ - record
22816
+ id:
22817
+ type: string
22818
+ description: The ID of the context record.
22819
+ title:
22820
+ type: string
22821
+ description: The title of the record.
22822
+ description:
22823
+ type: string
22824
+ description: The description of the record.
22825
+ url:
22826
+ type: string
22827
+ format: uri
22828
+ description: URL of the record in the source system.
22829
+ required:
22830
+ - type
22831
+ - id
22832
+ - title
22833
+ - url
22493
22834
  ContextRecordType:
22494
22835
  type: string
22495
22836
  enum:
@@ -22731,12 +23072,61 @@ components:
22731
23072
  - usageSettings
22732
23073
  - urls
22733
23074
  - $ref: "#/components/schemas/ContextConnectorSetup"
22734
- ContextTopic:
23075
+ SiteQuestionStatsFeedback:
22735
23076
  type: object
23077
+ description: Aggregated feedback for answers linked to a site question.
22736
23078
  properties:
22737
- object:
22738
- type: string
22739
- enum:
23079
+ positive:
23080
+ type: number
23081
+ description: Count of answers with positive feedback.
23082
+ negative:
23083
+ type: number
23084
+ description: Count of answers with negative feedback.
23085
+ unrated:
23086
+ type: number
23087
+ description: Count of answers without feedback.
23088
+ required:
23089
+ - positive
23090
+ - negative
23091
+ - unrated
23092
+ SiteQuestionStatsAnswered:
23093
+ type: object
23094
+ description: Aggregated answered assessment for answers linked to a site question.
23095
+ properties:
23096
+ yes:
23097
+ type: number
23098
+ description: Count of answers assessed as fully answered.
23099
+ partially:
23100
+ type: number
23101
+ description: Count of answers assessed as partially answered.
23102
+ no:
23103
+ type: number
23104
+ description: Count of answers assessed as not answered.
23105
+ required:
23106
+ - yes
23107
+ - partially
23108
+ - no
23109
+ SiteQuestionStats:
23110
+ type: object
23111
+ description: Aggregated stats for answers linked to a site question.
23112
+ properties:
23113
+ answers:
23114
+ type: number
23115
+ description: Total count of answers linked to the question.
23116
+ feedback:
23117
+ $ref: "#/components/schemas/SiteQuestionStatsFeedback"
23118
+ answered:
23119
+ $ref: "#/components/schemas/SiteQuestionStatsAnswered"
23120
+ required:
23121
+ - answers
23122
+ - feedback
23123
+ - answered
23124
+ SiteTopic:
23125
+ type: object
23126
+ properties:
23127
+ object:
23128
+ type: string
23129
+ enum:
22740
23130
  - context-topic
22741
23131
  id:
22742
23132
  type: string
@@ -22744,6 +23134,19 @@ components:
22744
23134
  label:
22745
23135
  type: string
22746
23136
  description: The label of the topic
23137
+ parent:
23138
+ type: object
23139
+ description: The parent topic when this topic is nested under another one
23140
+ properties:
23141
+ id:
23142
+ type: string
23143
+ description: The ID of the parent topic
23144
+ label:
23145
+ type: string
23146
+ description: The label of the parent topic
23147
+ required:
23148
+ - id
23149
+ - label
22747
23150
  createdAt:
22748
23151
  $ref: "#/components/schemas/Timestamp"
22749
23152
  updatedAt:
@@ -22758,23 +23161,17 @@ components:
22758
23161
  type: array
22759
23162
  minItems: 13
22760
23163
  maxItems: 13
22761
- description: The weekly pulse of the records for the past 3 months
23164
+ description: The weekly pulse of related question answers for the past 3 months
22762
23165
  items:
22763
23166
  type: number
22764
- connectors:
22765
- type: object
22766
- additionalProperties:
22767
- type: number
22768
- description: The number of records for the connector
22769
- stats:
22770
- type: object
22771
- description: The stats of the topic
22772
- properties:
22773
- records:
22774
- type: number
22775
- description: The number of records in the topic
22776
- required:
22777
- - records
23167
+ pages:
23168
+ type: number
23169
+ description: The number of pages associated with the topic
23170
+ records:
23171
+ type: number
23172
+ description: The number of records in the topic
23173
+ questions:
23174
+ $ref: "#/components/schemas/SiteQuestionStats"
22778
23175
  urls:
22779
23176
  type: object
22780
23177
  description: URLs associated with the topic
@@ -22792,977 +23189,1304 @@ components:
22792
23189
  - summary
22793
23190
  - icon
22794
23191
  - usageSettings
22795
- - connectors
22796
- - stats
23192
+ - pages
23193
+ - records
23194
+ - questions
22797
23195
  - weeklyPulse
22798
23196
  - createdAt
22799
23197
  - updatedAt
22800
23198
  - urls
22801
- SiteSpaceCustomizationSettings:
22802
- allOf:
22803
- - $ref: "#/components/schemas/SiteCustomizationSettings"
22804
- - type: object
22805
- properties:
22806
- hasOverrides:
22807
- type: boolean
22808
- description: Indicates whether the site customization settings have been overridden.
22809
- required:
22810
- - hasOverrides
22811
- SiteSectionGroupPointer:
23199
+ SiteQuestionType:
23200
+ type: string
23201
+ description: Type classification of the user question.
23202
+ enum:
23203
+ - exploring
23204
+ - how-to
23205
+ - troubleshooting
23206
+ - reference
23207
+ - unknown
23208
+ SiteQuestion:
22812
23209
  type: object
22813
23210
  properties:
22814
- type:
23211
+ object:
22815
23212
  type: string
22816
23213
  enum:
22817
- - site-section
22818
- - site-section-group
23214
+ - site-question
22819
23215
  id:
22820
23216
  type: string
22821
- description: Unique identifier for the site section
23217
+ description: The ID of the site question.
23218
+ question:
23219
+ type: string
23220
+ description: Canonical text for the unique site question.
23221
+ type:
23222
+ $ref: "#/components/schemas/SiteQuestionType"
23223
+ createdAt:
23224
+ $ref: "#/components/schemas/Timestamp"
23225
+ stats:
23226
+ $ref: "#/components/schemas/SiteQuestionStats"
23227
+ urls:
23228
+ type: object
23229
+ description: URLs associated with the site question.
23230
+ properties:
23231
+ location:
23232
+ type: string
23233
+ format: uri
23234
+ description: URL of the site question in the API.
23235
+ required:
23236
+ - location
22822
23237
  required:
22823
- - type
23238
+ - object
22824
23239
  - id
22825
- SiteSectionGroupMovePosition:
22826
- type: object
22827
- description: Position at which to move the site section group.
22828
- properties:
22829
- before:
22830
- $ref: "#/components/schemas/SiteSectionGroupPointer"
22831
- after:
22832
- $ref: "#/components/schemas/SiteSectionGroupPointer"
22833
- SiteSectionPointer:
23240
+ - question
23241
+ - type
23242
+ - createdAt
23243
+ - stats
23244
+ - urls
23245
+ SiteQuestionAnswerResolution:
23246
+ type: string
23247
+ description: Whether the response answered the question.
23248
+ enum:
23249
+ - no
23250
+ - partially
23251
+ - yes
23252
+ SiteQuestionAnswerConfidence:
23253
+ type: string
23254
+ description: Confidence in whether the response answered the question.
23255
+ enum:
23256
+ - low
23257
+ - medium
23258
+ - high
23259
+ SiteQuestionAnswerRelevance:
23260
+ type: string
23261
+ description: Relevance classification of the user question.
23262
+ enum:
23263
+ - relevant
23264
+ - spam
23265
+ - off-topic
23266
+ - unclear
23267
+ SiteInsightsSession:
22834
23268
  type: object
23269
+ description: Identifiers for a GitBook site session, used for analytics and adaptive content.
22835
23270
  properties:
22836
- type:
23271
+ visitorId:
22837
23272
  type: string
22838
- enum:
22839
- - site-section
22840
- siteSection:
23273
+ description: GitBook's unique identifier of the visitor.
23274
+ sessionId:
22841
23275
  type: string
22842
- description: Unique identifier for the site section
23276
+ description: GitBook's unique identifier of the visitor's session.
22843
23277
  required:
22844
- - type
22845
- - siteSection
22846
- SiteSectionMovePosition:
22847
- type: object
22848
- description: Position at which to move the site section to.
22849
- properties:
22850
- before:
22851
- $ref: "#/components/schemas/SiteSectionPointer"
22852
- after:
22853
- $ref: "#/components/schemas/SiteSectionPointer"
22854
- SiteSpacePointer:
23278
+ - visitorId
23279
+ - sessionId
23280
+ SiteQuestionAnswer:
22855
23281
  type: object
22856
23282
  properties:
22857
- type:
23283
+ object:
22858
23284
  type: string
22859
23285
  enum:
22860
- - site-space
22861
- siteSpace:
23286
+ - site-question-answer
23287
+ id:
22862
23288
  type: string
22863
- description: Unique identifier for the site space
22864
- required:
22865
- - type
22866
- - siteSpace
22867
- SiteSpaceMovePosition:
22868
- type: object
22869
- description: Position at which to move the site space to.
22870
- properties:
22871
- before:
22872
- $ref: "#/components/schemas/SiteSpacePointer"
22873
- after:
22874
- $ref: "#/components/schemas/SiteSpacePointer"
22875
- InviteSiteUsersAndTeams:
22876
- type: object
22877
- properties:
22878
- role:
22879
- description: Role to set.
22880
- $ref: "#/components/schemas/MemberRole"
22881
- anyOf:
22882
- - type: object
23289
+ description: The ID of the site question answer.
23290
+ question:
23291
+ type: object
22883
23292
  properties:
22884
- teams:
22885
- type: array
22886
- minItems: 1
22887
- items:
22888
- type: string
22889
- description: The ID of the team to be invited
23293
+ id:
23294
+ type: string
23295
+ description: The ID of the parent site question.
23296
+ type:
23297
+ $ref: "#/components/schemas/SiteQuestionType"
22890
23298
  required:
22891
- - teams
22892
- - type: object
23299
+ - id
23300
+ - type
23301
+ topics:
23302
+ type: array
23303
+ description: The IDs of the associated site topics.
23304
+ items:
23305
+ type: string
23306
+ input:
23307
+ type: object
22893
23308
  properties:
22894
- users:
22895
- type: array
22896
- minItems: 1
22897
- items:
22898
- type: string
22899
- description: The ID of the user to be invited
23309
+ text:
23310
+ type: string
23311
+ description: Normalized question text for this answer.
23312
+ raw:
23313
+ type: string
23314
+ description: Raw question text as asked by the user.
23315
+ thread:
23316
+ type: object
22900
23317
  required:
22901
- - users
23318
+ - id
23319
+ - previous
23320
+ properties:
23321
+ id:
23322
+ type: string
23323
+ description: The ID of the thread this answer belongs to.
23324
+ previous:
23325
+ type: string
23326
+ description: ID of the previous answer in the same thread.
23327
+ session:
23328
+ $ref: "#/components/schemas/SiteInsightsSession"
23329
+ feedback:
23330
+ type: object
23331
+ required:
23332
+ - rating
23333
+ properties:
23334
+ rating:
23335
+ type: integer
23336
+ enum:
23337
+ - -1
23338
+ - 1
23339
+ description: Feedback rating provided by the user.
23340
+ responseId:
23341
+ type: string
23342
+ description: The response identifier for this answer.
23343
+ language:
23344
+ type: string
23345
+ description: ISO language code of the question.
23346
+ answered:
23347
+ $ref: "#/components/schemas/SiteQuestionAnswerResolution"
23348
+ confidence:
23349
+ $ref: "#/components/schemas/SiteQuestionAnswerConfidence"
23350
+ relevance:
23351
+ $ref: "#/components/schemas/SiteQuestionAnswerRelevance"
23352
+ createdAt:
23353
+ $ref: "#/components/schemas/Timestamp"
23354
+ updatedAt:
23355
+ $ref: "#/components/schemas/Timestamp"
23356
+ urls:
23357
+ type: object
23358
+ description: URLs associated with the site question answer.
23359
+ properties:
23360
+ location:
23361
+ type: string
23362
+ format: uri
23363
+ description: URL of the site question answer in the API.
23364
+ required:
23365
+ - location
22902
23366
  required:
22903
- - role
22904
- OrganizationPointer:
23367
+ - object
23368
+ - id
23369
+ - question
23370
+ - topics
23371
+ - input
23372
+ - responseId
23373
+ - language
23374
+ - answered
23375
+ - confidence
23376
+ - relevance
23377
+ - createdAt
23378
+ - urls
23379
+ AIMessageRole:
23380
+ type: string
23381
+ enum:
23382
+ - user
23383
+ - assistant
23384
+ - developer
23385
+ AIToolCallGetPageContent:
22905
23386
  type: object
22906
23387
  properties:
22907
- type:
23388
+ tool:
22908
23389
  type: string
22909
23390
  enum:
22910
- - organization
22911
- organization:
23391
+ - getPageContent
23392
+ spaceId:
22912
23393
  type: string
22913
- description: Unique identifier for the organization
23394
+ description: The ID of the space being accessed.
23395
+ revisionId:
23396
+ type: string
23397
+ description: The ID of the revision within which the page content is being fetched.
23398
+ page:
23399
+ $ref: "#/components/schemas/ChangedRevisionPage"
22914
23400
  required:
22915
- - type
22916
- - organization
22917
- UserSitePermission:
23401
+ - tool
23402
+ - spaceId
23403
+ - page
23404
+ - revisionId
23405
+ AIToolCallGetPages:
22918
23406
  type: object
22919
- description: Permission of a user in a site.
22920
- properties:
22921
- permission:
22922
- $ref: "#/components/schemas/MemberRoleOrGuest"
22923
- user:
22924
- $ref: "#/components/schemas/User"
22925
- origin:
22926
- description: The content or organization that enforced this permission level.
22927
- oneOf:
22928
- - $ref: "#/components/schemas/SpacePointer"
22929
- - $ref: "#/components/schemas/OrganizationPointer"
22930
- required:
22931
- - permission
22932
- - user
22933
- - origin
22934
- UserSitePermissionOverride:
22935
- type: object
22936
- description: Permission override of a user in a site.
22937
23407
  properties:
22938
- permission:
22939
- $ref: "#/components/schemas/MemberRole"
22940
- user:
22941
- $ref: "#/components/schemas/User"
23408
+ tool:
23409
+ type: string
23410
+ enum:
23411
+ - getPages
23412
+ spaceId:
23413
+ type: string
23414
+ description: The ID of the space being accessed.
23415
+ revisionId:
23416
+ type: string
23417
+ description: The revision ID of the space.
22942
23418
  required:
22943
- - permission
22944
- - user
22945
- TeamSitePermissionOverride:
23419
+ - tool
23420
+ - spaceId
23421
+ - revisionId
23422
+ AIToolCallGetReusableContents:
22946
23423
  type: object
22947
- description: Permission override of a team in a site.
22948
23424
  properties:
22949
- permission:
22950
- $ref: "#/components/schemas/MemberRole"
22951
- team:
22952
- $ref: "#/components/schemas/OrganizationTeam"
23425
+ tool:
23426
+ type: string
23427
+ enum:
23428
+ - getReusableContents
23429
+ spaceId:
23430
+ type: string
23431
+ description: The ID of the space being accessed.
23432
+ revisionId:
23433
+ type: string
23434
+ description: The revision ID of the space.
22953
23435
  required:
22954
- - permission
22955
- - team
22956
- AIMessageContext:
22957
- type: object
22958
- description: Context about the current user sending a message.
22959
- properties:
22960
- location:
22961
- type: object
22962
- properties:
22963
- spaceId:
22964
- type: string
22965
- description: ID of the current space.
22966
- pageId:
22967
- type: string
22968
- description: ID of the current page.
22969
- required:
22970
- - spaceId
22971
- - pageId
22972
- AIAttachmentImage:
23436
+ - tool
23437
+ - spaceId
23438
+ - revisionId
23439
+ AIToolCallSearchResultPage:
22973
23440
  type: object
23441
+ title: Page result
23442
+ description: Result of a search matching a page.
22974
23443
  properties:
22975
23444
  type:
22976
23445
  type: string
22977
23446
  enum:
22978
- - image
22979
- url:
22980
- $ref: "#/components/schemas/URL"
23447
+ - page
23448
+ spaceId:
23449
+ type: string
23450
+ description: The ID of the space
23451
+ pageId:
23452
+ type: string
23453
+ description: The ID of the page
23454
+ revisionId:
23455
+ type: string
23456
+ description: The revision ID of the result
23457
+ anchor:
23458
+ type: string
23459
+ description: The anchor of the result
23460
+ title:
23461
+ type: string
23462
+ description: The title of the result
23463
+ description:
23464
+ type: string
23465
+ description: The description of the result
22981
23466
  required:
22982
23467
  - type
22983
- - url
22984
- AIAttachmentFile:
23468
+ - spaceId
23469
+ - pageId
23470
+ - revisionId
23471
+ - title
23472
+ AIToolCallSearchResultRecord:
22985
23473
  type: object
23474
+ title: Site context record result
23475
+ description: Result of a search matching a site context record.
22986
23476
  properties:
22987
23477
  type:
22988
23478
  type: string
22989
23479
  enum:
22990
- - file
22991
- url:
22992
- $ref: "#/components/schemas/URL"
22993
- filename:
23480
+ - record
23481
+ siteId:
22994
23482
  type: string
22995
- description: Name of the file.
22996
- contentType:
23483
+ description: The ID of the site owning the context record
23484
+ recordId:
22997
23485
  type: string
22998
- enum:
22999
- - application/pdf
23486
+ description: The ID of the context record
23487
+ title:
23488
+ type: string
23489
+ description: The title of the record
23490
+ description:
23491
+ type: string
23492
+ description: The description of the record
23493
+ url:
23494
+ type: string
23495
+ format: uri
23496
+ description: URL of the record in its original source
23000
23497
  required:
23001
23498
  - type
23002
- - url
23003
- - filename
23004
- - contentType
23005
- AIAttachment:
23499
+ - siteId
23500
+ - recordId
23501
+ - title
23502
+ AIToolCallSearchResult:
23503
+ description: Result of a search
23006
23504
  oneOf:
23007
- - $ref: "#/components/schemas/AIAttachmentImage"
23008
- - $ref: "#/components/schemas/AIAttachmentFile"
23009
- AIMessageInput:
23505
+ - $ref: "#/components/schemas/AIToolCallSearchResultPage"
23506
+ - $ref: "#/components/schemas/AIToolCallSearchResultRecord"
23507
+ discriminator:
23508
+ propertyName: type
23509
+ AIToolCallSearch:
23010
23510
  type: object
23011
- description: Input version of an AI message.
23511
+ description: Tool to search for content
23012
23512
  properties:
23013
- role:
23513
+ tool:
23014
23514
  type: string
23015
23515
  enum:
23016
- - user
23017
- content:
23018
- oneOf:
23019
- - type: string
23020
- maxLength: 2048
23021
- - $ref: "#/components/schemas/JSONDocument"
23022
- context:
23023
- $ref: "#/components/schemas/AIMessageContext"
23024
- attachments:
23516
+ - search
23517
+ query:
23518
+ type: string
23519
+ description: The query that has been searched for.
23520
+ results:
23025
23521
  type: array
23026
23522
  items:
23027
- $ref: "#/components/schemas/AIAttachment"
23523
+ $ref: "#/components/schemas/AIToolCallSearchResult"
23028
23524
  required:
23029
- - role
23030
- - content
23031
- AIModel:
23032
- type: string
23033
- enum:
23034
- - fast
23035
- - reasoning-low
23036
- - reasoning-medium
23037
- - reasoning-high
23038
- AIToolDefinition:
23525
+ - tool
23526
+ - query
23527
+ - results
23528
+ AIToolCallEditPage:
23039
23529
  type: object
23040
- description: Description of a tool that can be called from an AI agent.
23041
23530
  properties:
23042
- name:
23043
- type: string
23044
- description: The name of the tool. It should be unique within the agent.
23045
- description:
23531
+ tool:
23046
23532
  type: string
23047
- description: The description of the tool, passed to the AI agent.
23048
- inputSchema:
23049
- type: object
23050
- description: JSON schema describing the input of the tool.
23051
- properties:
23052
- type:
23053
- type: string
23054
- enum:
23055
- - object
23056
- properties:
23057
- type: object
23058
- additionalProperties:
23059
- type: object
23060
- properties:
23061
- type:
23062
- type: string
23063
- enum:
23064
- - string
23065
- - number
23066
- - boolean
23067
- - array
23068
- - object
23069
- description:
23070
- type: string
23071
- description: Description of the property.
23072
- required:
23073
- - type
23074
- - description
23075
- additionalProperties: true
23076
- required:
23077
- - type
23078
- - properties
23079
- required:
23080
- - name
23081
- - description
23082
- AIToolCallOtherSummary:
23083
- type: object
23084
- description: Summary of a generic tool call.
23085
- properties:
23086
- icon:
23087
- $ref: "#/components/schemas/Icon"
23088
- text:
23533
+ enum:
23534
+ - editPage
23535
+ spaceId:
23089
23536
  type: string
23090
- description: Text to display to the user to describe the tool call.
23091
- required:
23092
- - icon
23093
- - text
23094
- AIToolCallResult:
23095
- type: object
23096
- description: Result of a tool call.
23537
+ description: The ID of the space being edited.
23538
+ page:
23539
+ $ref: "#/components/schemas/ChangedRevisionPage"
23097
23540
  required:
23098
23541
  - tool
23099
- - toolCallId
23100
- - output
23542
+ - spaceId
23543
+ - page
23544
+ AIToolCallCreatePage:
23545
+ type: object
23101
23546
  properties:
23102
23547
  tool:
23103
23548
  type: string
23104
- description: The name of the tool that was called.
23105
- toolCallId:
23549
+ enum:
23550
+ - createPage
23551
+ spaceId:
23106
23552
  type: string
23107
- description: The ID of the tool call.
23108
- output:
23109
- type: object
23110
- description: The output to the tool call.
23111
- summary:
23112
- $ref: "#/components/schemas/AIToolCallOtherSummary"
23113
- AIMessageTask:
23114
- oneOf:
23115
- - type: object
23116
- description: When the agent is responding to a comment.
23117
- properties:
23118
- type:
23119
- type: string
23120
- enum:
23121
- - respond_to_comment
23122
- spaceId:
23123
- type: string
23124
- description: The ID of the space to respond to the comment in.
23125
- changeRequestId:
23126
- type: string
23127
- description: The ID of the change request to respond to the comment in.
23128
- commentId:
23129
- type: string
23130
- description: The ID of the comment to respond to.
23131
- required:
23132
- - type
23133
- - spaceId
23134
- - commentId
23135
- - type: object
23136
- description: When the agent is reviewing a change request.
23137
- properties:
23138
- type:
23139
- type: string
23140
- enum:
23141
- - review_change_request
23142
- spaceId:
23143
- type: string
23144
- description: The ID of the space the change request is in.
23145
- changeRequestId:
23146
- type: string
23147
- description: The ID of the change request to review.
23148
- required:
23149
- - type
23150
- - spaceId
23151
- - changeRequestId
23152
- - type: object
23153
- description: When the agent is implementing a task in a change request.
23154
- properties:
23155
- type:
23156
- type: string
23157
- enum:
23158
- - implement_change_request
23159
- spaceId:
23160
- type: string
23161
- description: The ID of the space the change request is in.
23162
- changeRequestId:
23163
- type: string
23164
- description: The ID of the change request to implement the task in.
23165
- required:
23166
- - type
23167
- - spaceId
23168
- - changeRequestId
23169
- AIStreamResponseStart:
23170
- type: object
23171
- description: |
23172
- Message emitted by the server to indicate the start of the AI response.
23173
- properties:
23174
- type:
23175
- type: string
23176
- enum:
23177
- - response_start
23178
- messageId:
23179
- type: string
23180
- description: |
23181
- The ID of the message that this event is composing.
23182
- task:
23183
- $ref: "#/components/schemas/AIMessageTask"
23553
+ description: The ID of the space being edited.
23554
+ page:
23555
+ $ref: "#/components/schemas/ChangedRevisionPage"
23184
23556
  required:
23185
- - type
23186
- - messageId
23187
- AIMessageResponseMetadata:
23188
- description: The response that generated this message.
23557
+ - tool
23558
+ - spaceId
23559
+ - page
23560
+ AIToolCallDeletePage:
23189
23561
  type: object
23190
23562
  properties:
23191
- stopReason:
23563
+ tool:
23192
23564
  type: string
23193
- description: The reason the response was stopped. If not defined, the response finished normally.
23194
23565
  enum:
23195
- - aborted
23196
- id:
23197
- type: string
23198
- description: The ID of the response that generated this message. It can be undefined if the stream was aborted.
23199
- previous:
23566
+ - deletePage
23567
+ spaceId:
23200
23568
  type: string
23201
- description: The ID of the previous response that this message is based on.
23202
- AIStreamResponseFinish:
23569
+ description: The ID of the space being edited.
23570
+ page:
23571
+ $ref: "#/components/schemas/ChangedRevisionPage"
23572
+ required:
23573
+ - tool
23574
+ - spaceId
23575
+ - page
23576
+ AIToolCallRenamePage:
23203
23577
  type: object
23204
- description: |
23205
- Message emitted by the server to indicate the end of the AI response. It contains the ID of the response to be referenced for followup requests.
23206
23578
  properties:
23207
- type:
23579
+ tool:
23208
23580
  type: string
23209
23581
  enum:
23210
- - response_finish
23211
- messageId:
23582
+ - renamePage
23583
+ spaceId:
23212
23584
  type: string
23213
- description: |
23214
- The ID of the message that this event is composing.
23215
- responseId:
23585
+ description: The ID of the space being edited.
23586
+ page:
23587
+ $ref: "#/components/schemas/ChangedRevisionPage"
23588
+ title:
23216
23589
  type: string
23217
- deprecated: true
23218
- description: The ID of the response
23219
- response:
23220
- description: The response metadata associated with the message.
23221
- $ref: "#/components/schemas/AIMessageResponseMetadata"
23590
+ description: The new title of the page.
23222
23591
  required:
23223
- - type
23224
- - messageId
23225
- - response
23226
- AIStreamResponseDocument:
23592
+ - tool
23593
+ - spaceId
23594
+ - page
23595
+ - title
23596
+ AIToolCallMovePage:
23227
23597
  type: object
23228
- description: |
23229
- Message emitted by the server to indicate the latest block of the document. The block can either be a new block or an update to the previous block.
23230
23598
  properties:
23231
- type:
23599
+ tool:
23232
23600
  type: string
23233
23601
  enum:
23234
- - response_document
23235
- - response_reasoning
23236
- messageId:
23602
+ - movePage
23603
+ spaceId:
23237
23604
  type: string
23238
- description: |
23239
- The ID of the message that this event is composing.
23240
- stepIndex:
23241
- type: integer
23242
- description: |
23243
- The index of the step of the message that this event is composing.
23244
- operation:
23605
+ description: The ID of the space being edited.
23606
+ page:
23607
+ $ref: "#/components/schemas/ChangedRevisionPage"
23608
+ to:
23609
+ $ref: "#/components/schemas/ChangedRevisionPage"
23610
+ moveType:
23245
23611
  type: string
23612
+ description: |
23613
+ Indicates how the page was moved relative to the "to" page.
23614
+ - `within`: moved as the last child of the target page (or to the root when `to` is omitted)
23615
+ - `before`: moved directly before the target page
23616
+ - `after`: moved directly after the target page
23246
23617
  enum:
23247
- - insert
23248
- - update
23249
- blocks:
23250
- type: array
23251
- items:
23252
- $ref: "#/components/schemas/DocumentBlocksTopLevels"
23618
+ - within
23619
+ - before
23620
+ - after
23253
23621
  required:
23254
- - type
23255
- - messageId
23256
- - stepIndex
23257
- - operation
23258
- - blocks
23259
- AIStreamResponseObject:
23622
+ - tool
23623
+ - spaceId
23624
+ - page
23625
+ - moveType
23626
+ AIToolCallListModifiedPages:
23260
23627
  type: object
23261
- description: |
23262
- Message emitted by the server to indicate a chunk of the JSON object response.
23263
23628
  properties:
23264
- type:
23629
+ tool:
23265
23630
  type: string
23266
23631
  enum:
23267
- - response_object
23268
- messageId:
23269
- type: string
23270
- description: |
23271
- The ID of the message that this event is composing.
23272
- jsonChunk:
23632
+ - listModifiedPages
23633
+ spaceId:
23273
23634
  type: string
23274
- description: The chunk of the JSON object response
23635
+ description: The ID of the space being accessed.
23275
23636
  required:
23276
- - type
23277
- - messageId
23278
- - jsonChunk
23279
- AIToolCallGetPageContent:
23637
+ - tool
23638
+ - spaceId
23639
+ AIToolCallGetPageDiff:
23280
23640
  type: object
23281
23641
  properties:
23282
23642
  tool:
23283
23643
  type: string
23284
23644
  enum:
23285
- - getPageContent
23645
+ - getPageDiff
23286
23646
  spaceId:
23287
23647
  type: string
23288
23648
  description: The ID of the space being accessed.
23289
- revisionId:
23290
- type: string
23291
- description: The ID of the revision within which the page content is being fetched.
23292
23649
  page:
23293
23650
  $ref: "#/components/schemas/ChangedRevisionPage"
23294
23651
  required:
23295
23652
  - tool
23296
23653
  - spaceId
23297
23654
  - page
23298
- - revisionId
23299
- AIToolCallGetPages:
23655
+ AIToolCallCreateReusableContent:
23300
23656
  type: object
23301
23657
  properties:
23302
23658
  tool:
23303
23659
  type: string
23304
23660
  enum:
23305
- - getPages
23661
+ - createReusableContent
23306
23662
  spaceId:
23307
23663
  type: string
23308
- description: The ID of the space being accessed.
23309
- revisionId:
23664
+ description: The ID of the space being edited.
23665
+ reusableContent:
23666
+ $ref: "#/components/schemas/ChangedRevisionReusableContent"
23667
+ required:
23668
+ - tool
23669
+ - spaceId
23670
+ - reusableContent
23671
+ AIToolCallEditReusableContent:
23672
+ type: object
23673
+ properties:
23674
+ tool:
23310
23675
  type: string
23311
- description: The revision ID of the space.
23676
+ enum:
23677
+ - editReusableContent
23678
+ spaceId:
23679
+ type: string
23680
+ description: The ID of the space being edited.
23681
+ reusableContent:
23682
+ $ref: "#/components/schemas/ChangedRevisionReusableContent"
23312
23683
  required:
23313
23684
  - tool
23314
23685
  - spaceId
23315
- - revisionId
23316
- AIToolCallGetReusableContents:
23686
+ - reusableContent
23687
+ AIToolCallGetReusableContent:
23317
23688
  type: object
23318
23689
  properties:
23319
23690
  tool:
23320
23691
  type: string
23321
23692
  enum:
23322
- - getReusableContents
23693
+ - getReusableContent
23323
23694
  spaceId:
23324
23695
  type: string
23325
23696
  description: The ID of the space being accessed.
23326
23697
  revisionId:
23327
23698
  type: string
23328
- description: The revision ID of the space.
23699
+ description: The ID of the revision within which the reusable content is being fetched.
23700
+ reusableContent:
23701
+ $ref: "#/components/schemas/ChangedRevisionReusableContent"
23329
23702
  required:
23330
23703
  - tool
23331
23704
  - spaceId
23705
+ - reusableContent
23332
23706
  - revisionId
23333
- AIToolCallSearchResultPage:
23707
+ AIToolCallCreateChangeRequest:
23334
23708
  type: object
23335
- title: Page result
23336
- description: Result of a search matching a page.
23337
23709
  properties:
23338
- type:
23710
+ tool:
23339
23711
  type: string
23340
23712
  enum:
23341
- - page
23713
+ - createChangeRequest
23342
23714
  spaceId:
23343
23715
  type: string
23344
- description: The ID of the space
23345
- pageId:
23346
- type: string
23347
- description: The ID of the page
23348
- revisionId:
23349
- type: string
23350
- description: The revision ID of the result
23351
- anchor:
23352
- type: string
23353
- description: The anchor of the result
23354
- title:
23355
- type: string
23356
- description: The title of the result
23357
- description:
23358
- type: string
23359
- description: The description of the result
23360
- required:
23361
- - type
23362
- - spaceId
23363
- - pageId
23364
- - revisionId
23365
- - title
23366
- AIToolCallSearchResultRecord:
23367
- type: object
23368
- title: Site context record result
23369
- description: Result of a search matching a site context record.
23370
- properties:
23371
- type:
23372
- type: string
23373
- enum:
23374
- - record
23375
- siteId:
23376
- type: string
23377
- description: The ID of the site owning the context record
23378
- recordId:
23379
- type: string
23380
- description: The ID of the context record
23381
- title:
23382
- type: string
23383
- description: The title of the record
23384
- description:
23385
- type: string
23386
- description: The description of the record
23387
- url:
23388
- type: string
23389
- format: uri
23390
- description: URL of the record in its original source
23391
- required:
23392
- - type
23393
- - siteId
23394
- - recordId
23395
- - title
23396
- AIToolCallSearchResult:
23397
- description: Result of a search
23398
- oneOf:
23399
- - $ref: "#/components/schemas/AIToolCallSearchResultPage"
23400
- - $ref: "#/components/schemas/AIToolCallSearchResultRecord"
23401
- discriminator:
23402
- propertyName: type
23403
- AIToolCallSearch:
23404
- type: object
23405
- description: Tool to search for content
23406
- properties:
23407
- tool:
23716
+ description: The ID of the space the change request belongs to.
23717
+ action:
23408
23718
  type: string
23409
23719
  enum:
23410
- - search
23411
- query:
23412
- type: string
23413
- description: The query that has been searched for.
23414
- results:
23415
- type: array
23416
- items:
23417
- $ref: "#/components/schemas/AIToolCallSearchResult"
23720
+ - create
23721
+ - update
23722
+ changeRequest:
23723
+ type: object
23724
+ properties:
23725
+ id:
23726
+ type: string
23727
+ description: The unique identifier of the change request.
23728
+ number:
23729
+ type: number
23730
+ description: Incremental identifier of the change request.
23731
+ subject:
23732
+ type: string
23733
+ description: A brief summary of the change request.
23734
+ required:
23735
+ - id
23736
+ - number
23737
+ - subject
23418
23738
  required:
23419
23739
  - tool
23420
- - query
23421
- - results
23422
- AIToolCallEditPage:
23740
+ - spaceId
23741
+ - action
23742
+ - changeRequest
23743
+ AIToolCallComment:
23423
23744
  type: object
23424
23745
  properties:
23425
23746
  tool:
23426
23747
  type: string
23427
23748
  enum:
23428
- - editPage
23749
+ - comment
23429
23750
  spaceId:
23430
23751
  type: string
23431
- description: The ID of the space being edited.
23752
+ description: The ID of the space being commented.
23432
23753
  page:
23754
+ description: The page being commented.
23433
23755
  $ref: "#/components/schemas/ChangedRevisionPage"
23756
+ commentId:
23757
+ type: string
23758
+ description: The ID of the comment being posted.
23434
23759
  required:
23435
23760
  - tool
23436
23761
  - spaceId
23437
- - page
23438
- AIToolCallCreatePage:
23762
+ - commentId
23763
+ AIToolCallReplyToComment:
23439
23764
  type: object
23440
23765
  properties:
23441
23766
  tool:
23442
23767
  type: string
23443
23768
  enum:
23444
- - createPage
23769
+ - replyToComment
23445
23770
  spaceId:
23446
23771
  type: string
23447
- description: The ID of the space being edited.
23772
+ description: The ID of the space being commented.
23448
23773
  page:
23774
+ description: The page being commented.
23449
23775
  $ref: "#/components/schemas/ChangedRevisionPage"
23450
- required:
23451
- - tool
23452
- - spaceId
23453
- - page
23454
- AIToolCallDeletePage:
23455
- type: object
23456
- properties:
23457
- tool:
23776
+ commentId:
23458
23777
  type: string
23459
- enum:
23460
- - deletePage
23461
- spaceId:
23778
+ description: The ID of the comment being replied to.
23779
+ replyId:
23462
23780
  type: string
23463
- description: The ID of the space being edited.
23464
- page:
23465
- $ref: "#/components/schemas/ChangedRevisionPage"
23781
+ description: The ID of the reply being posted.
23466
23782
  required:
23467
23783
  - tool
23468
23784
  - spaceId
23469
- - page
23470
- AIToolCallRenamePage:
23785
+ - commentId
23786
+ - replyId
23787
+ AIToolCallSubmitChangeRequestReview:
23471
23788
  type: object
23472
23789
  properties:
23473
23790
  tool:
23474
23791
  type: string
23475
23792
  enum:
23476
- - renamePage
23793
+ - submitChangeRequestReview
23477
23794
  spaceId:
23478
23795
  type: string
23479
- description: The ID of the space being edited.
23480
- page:
23481
- $ref: "#/components/schemas/ChangedRevisionPage"
23482
- title:
23483
- type: string
23484
- description: The new title of the page.
23485
- required:
23486
- - tool
23487
- - spaceId
23488
- - page
23489
- - title
23490
- AIToolCallMovePage:
23491
- type: object
23492
- properties:
23493
- tool:
23796
+ description: The ID of the space where the review was submitted.
23797
+ changeRequestId:
23494
23798
  type: string
23495
- enum:
23496
- - movePage
23497
- spaceId:
23799
+ description: The ID of the change request being reviewed.
23800
+ status:
23801
+ $ref: "#/components/schemas/ChangeRequestReviewStatus"
23802
+ description: Result of the review.
23803
+ reviewId:
23498
23804
  type: string
23499
- description: The ID of the space being edited.
23500
- page:
23501
- $ref: "#/components/schemas/ChangedRevisionPage"
23502
- to:
23503
- $ref: "#/components/schemas/ChangedRevisionPage"
23504
- moveType:
23805
+ description: Identifier of the review that was created.
23806
+ commentId:
23505
23807
  type: string
23506
- description: |
23507
- Indicates how the page was moved relative to the "to" page.
23508
- - `within`: moved as the last child of the target page (or to the root when `to` is omitted)
23509
- - `before`: moved directly before the target page
23510
- - `after`: moved directly after the target page
23511
- enum:
23512
- - within
23513
- - before
23514
- - after
23808
+ description: Identifier of the comment that was created as part of the review.
23515
23809
  required:
23516
23810
  - tool
23517
23811
  - spaceId
23518
- - page
23519
- - moveType
23520
- AIToolCallListModifiedPages:
23812
+ - changeRequestId
23813
+ - status
23814
+ - reviewId
23815
+ - commentId
23816
+ AIToolCallMCP:
23521
23817
  type: object
23818
+ description: Tool called from an MCP server
23522
23819
  properties:
23523
23820
  tool:
23524
23821
  type: string
23525
23822
  enum:
23526
- - listModifiedPages
23527
- spaceId:
23823
+ - mcp
23824
+ mcpServerId:
23528
23825
  type: string
23529
- description: The ID of the space being accessed.
23530
- required:
23531
- - tool
23532
- - spaceId
23533
- AIToolCallGetPageDiff:
23534
- type: object
23535
- properties:
23536
- tool:
23826
+ description: The ID of the MCP server that has been called.
23827
+ mcpToolName:
23537
23828
  type: string
23538
- enum:
23539
- - getPageDiff
23540
- spaceId:
23829
+ description: The name of the tool that has been called.
23830
+ mcpToolTitle:
23541
23831
  type: string
23542
- description: The ID of the space being accessed.
23543
- page:
23544
- $ref: "#/components/schemas/ChangedRevisionPage"
23832
+ description: The title of the tool that has been called.
23545
23833
  required:
23546
23834
  - tool
23547
- - spaceId
23548
- - page
23549
- AIToolCallCreateReusableContent:
23835
+ - mcpServerId
23836
+ - mcpToolName
23837
+ AIToolCallOtherSummary:
23550
23838
  type: object
23839
+ description: Summary of a generic tool call.
23551
23840
  properties:
23552
- tool:
23553
- type: string
23554
- enum:
23555
- - createReusableContent
23556
- spaceId:
23841
+ icon:
23842
+ $ref: "#/components/schemas/Icon"
23843
+ text:
23557
23844
  type: string
23558
- description: The ID of the space being edited.
23559
- reusableContent:
23560
- $ref: "#/components/schemas/ChangedRevisionReusableContent"
23845
+ description: Text to display to the user to describe the tool call.
23561
23846
  required:
23562
- - tool
23563
- - spaceId
23564
- - reusableContent
23565
- AIToolCallEditReusableContent:
23847
+ - icon
23848
+ - text
23849
+ AIToolCallOther:
23566
23850
  type: object
23851
+ description: Any tool call that is unknown by GitBook
23567
23852
  properties:
23568
23853
  tool:
23569
23854
  type: string
23570
23855
  enum:
23571
- - editReusableContent
23572
- spaceId:
23573
- type: string
23574
- description: The ID of the space being edited.
23575
- reusableContent:
23576
- $ref: "#/components/schemas/ChangedRevisionReusableContent"
23856
+ - other
23857
+ summary:
23858
+ $ref: "#/components/schemas/AIToolCallOtherSummary"
23577
23859
  required:
23578
23860
  - tool
23579
- - spaceId
23580
- - reusableContent
23581
- AIToolCallGetReusableContent:
23582
- type: object
23861
+ - summary
23862
+ AIToolCall:
23863
+ oneOf:
23864
+ - $ref: "#/components/schemas/AIToolCallGetPageContent"
23865
+ - $ref: "#/components/schemas/AIToolCallGetPages"
23866
+ - $ref: "#/components/schemas/AIToolCallGetReusableContents"
23867
+ - $ref: "#/components/schemas/AIToolCallSearch"
23868
+ - $ref: "#/components/schemas/AIToolCallEditPage"
23869
+ - $ref: "#/components/schemas/AIToolCallCreatePage"
23870
+ - $ref: "#/components/schemas/AIToolCallDeletePage"
23871
+ - $ref: "#/components/schemas/AIToolCallRenamePage"
23872
+ - $ref: "#/components/schemas/AIToolCallMovePage"
23873
+ - $ref: "#/components/schemas/AIToolCallListModifiedPages"
23874
+ - $ref: "#/components/schemas/AIToolCallGetPageDiff"
23875
+ - $ref: "#/components/schemas/AIToolCallCreateReusableContent"
23876
+ - $ref: "#/components/schemas/AIToolCallEditReusableContent"
23877
+ - $ref: "#/components/schemas/AIToolCallGetReusableContent"
23878
+ - $ref: "#/components/schemas/AIToolCallCreateChangeRequest"
23879
+ - $ref: "#/components/schemas/AIToolCallComment"
23880
+ - $ref: "#/components/schemas/AIToolCallReplyToComment"
23881
+ - $ref: "#/components/schemas/AIToolCallSubmitChangeRequestReview"
23882
+ - $ref: "#/components/schemas/AIToolCallMCP"
23883
+ - $ref: "#/components/schemas/AIToolCallOther"
23884
+ Timerange:
23885
+ type: object
23886
+ properties:
23887
+ start:
23888
+ $ref: "#/components/schemas/Timestamp"
23889
+ end:
23890
+ $ref: "#/components/schemas/Timestamp"
23891
+ required:
23892
+ - start
23893
+ - end
23894
+ AIAttachmentImage:
23895
+ type: object
23896
+ properties:
23897
+ type:
23898
+ type: string
23899
+ enum:
23900
+ - image
23901
+ url:
23902
+ $ref: "#/components/schemas/URL"
23903
+ required:
23904
+ - type
23905
+ - url
23906
+ AIAttachmentFile:
23907
+ type: object
23908
+ properties:
23909
+ type:
23910
+ type: string
23911
+ enum:
23912
+ - file
23913
+ url:
23914
+ $ref: "#/components/schemas/URL"
23915
+ filename:
23916
+ type: string
23917
+ description: Name of the file.
23918
+ contentType:
23919
+ type: string
23920
+ enum:
23921
+ - application/pdf
23922
+ required:
23923
+ - type
23924
+ - url
23925
+ - filename
23926
+ - contentType
23927
+ AIAttachment:
23928
+ oneOf:
23929
+ - $ref: "#/components/schemas/AIAttachmentImage"
23930
+ - $ref: "#/components/schemas/AIAttachmentFile"
23931
+ AIMessageStep:
23932
+ type: object
23933
+ description: A step in a message from the AI agent.
23934
+ properties:
23935
+ content:
23936
+ $ref: "#/components/schemas/JSONDocument"
23937
+ reasoning:
23938
+ $ref: "#/components/schemas/JSONDocument"
23939
+ toolCalls:
23940
+ type: array
23941
+ items:
23942
+ $ref: "#/components/schemas/AIToolCall"
23943
+ timing:
23944
+ type: object
23945
+ description: The timing of the step.
23946
+ properties:
23947
+ reasoning:
23948
+ $ref: "#/components/schemas/Timerange"
23949
+ attachments:
23950
+ type: array
23951
+ items:
23952
+ $ref: "#/components/schemas/AIAttachment"
23953
+ required:
23954
+ - content
23955
+ AIMessageTask:
23956
+ oneOf:
23957
+ - type: object
23958
+ description: When the agent is responding to a comment.
23959
+ properties:
23960
+ type:
23961
+ type: string
23962
+ enum:
23963
+ - respond_to_comment
23964
+ spaceId:
23965
+ type: string
23966
+ description: The ID of the space to respond to the comment in.
23967
+ changeRequestId:
23968
+ type: string
23969
+ description: The ID of the change request to respond to the comment in.
23970
+ commentId:
23971
+ type: string
23972
+ description: The ID of the comment to respond to.
23973
+ required:
23974
+ - type
23975
+ - spaceId
23976
+ - commentId
23977
+ - type: object
23978
+ description: When the agent is reviewing a change request.
23979
+ properties:
23980
+ type:
23981
+ type: string
23982
+ enum:
23983
+ - review_change_request
23984
+ spaceId:
23985
+ type: string
23986
+ description: The ID of the space the change request is in.
23987
+ changeRequestId:
23988
+ type: string
23989
+ description: The ID of the change request to review.
23990
+ required:
23991
+ - type
23992
+ - spaceId
23993
+ - changeRequestId
23994
+ - type: object
23995
+ description: When the agent is implementing a task in a change request.
23996
+ properties:
23997
+ type:
23998
+ type: string
23999
+ enum:
24000
+ - implement_change_request
24001
+ spaceId:
24002
+ type: string
24003
+ description: The ID of the space the change request is in.
24004
+ changeRequestId:
24005
+ type: string
24006
+ description: The ID of the change request to implement the task in.
24007
+ required:
24008
+ - type
24009
+ - spaceId
24010
+ - changeRequestId
24011
+ AIMessageResponseMetadata:
24012
+ description: The response that generated this message.
24013
+ type: object
24014
+ properties:
24015
+ stopReason:
24016
+ type: string
24017
+ description: The reason the response was stopped. If not defined, the response finished normally.
24018
+ enum:
24019
+ - aborted
24020
+ id:
24021
+ type: string
24022
+ description: The ID of the response that generated this message. It can be undefined if the stream was aborted.
24023
+ previous:
24024
+ type: string
24025
+ description: The ID of the previous response that this message is based on.
24026
+ AIMessage:
24027
+ type: object
24028
+ properties:
24029
+ id:
24030
+ type: string
24031
+ role:
24032
+ $ref: "#/components/schemas/AIMessageRole"
24033
+ steps:
24034
+ type: array
24035
+ items:
24036
+ $ref: "#/components/schemas/AIMessageStep"
24037
+ task:
24038
+ $ref: "#/components/schemas/AIMessageTask"
24039
+ response:
24040
+ $ref: "#/components/schemas/AIMessageResponseMetadata"
24041
+ required:
24042
+ - id
24043
+ - role
24044
+ - steps
24045
+ SiteQuestionAnswerWithResponse:
24046
+ allOf:
24047
+ - $ref: "#/components/schemas/SiteQuestionAnswer"
24048
+ - type: object
24049
+ properties:
24050
+ response:
24051
+ $ref: "#/components/schemas/AIMessage"
24052
+ required:
24053
+ - response
24054
+ SiteQuestionAnswerSourceBase:
24055
+ type: object
24056
+ properties:
24057
+ object:
24058
+ type: string
24059
+ enum:
24060
+ - site-question-answer-source
24061
+ id:
24062
+ type: string
24063
+ description: The ID of the source.
24064
+ weight:
24065
+ type: number
24066
+ description: Relative weight of this source in the generated answer.
24067
+ title:
24068
+ type: string
24069
+ description: The title of the source.
24070
+ urls:
24071
+ type: object
24072
+ description: URLs associated with the site question answer.
24073
+ properties:
24074
+ location:
24075
+ type: string
24076
+ format: uri
24077
+ description: URL of the site question answer in the API.
24078
+ required:
24079
+ - location
24080
+ required:
24081
+ - object
24082
+ - id
24083
+ - title
24084
+ - weight
24085
+ - urls
24086
+ SiteQuestionAnswerSourcePage:
24087
+ allOf:
24088
+ - $ref: "#/components/schemas/SiteQuestionAnswerSourceBase"
24089
+ - type: object
24090
+ title: Page source
24091
+ description: Source data pointing to a page used for a site question answer.
24092
+ properties:
24093
+ type:
24094
+ type: string
24095
+ enum:
24096
+ - page
24097
+ space:
24098
+ type: string
24099
+ description: The space ID of the source page.
24100
+ revision:
24101
+ type: string
24102
+ description: The revision ID used for this source page.
24103
+ page:
24104
+ type: string
24105
+ description: The page ID of the source page.
24106
+ required:
24107
+ - type
24108
+ - space
24109
+ - revision
24110
+ - page
24111
+ SiteQuestionAnswerSourceRecord:
24112
+ allOf:
24113
+ - $ref: "#/components/schemas/SiteQuestionAnswerSourceBase"
24114
+ - type: object
24115
+ properties:
24116
+ type:
24117
+ type: string
24118
+ enum:
24119
+ - record
24120
+ record:
24121
+ type: string
24122
+ description: The site context record ID.
24123
+ required:
24124
+ - type
24125
+ - record
24126
+ SiteQuestionAnswerSource:
24127
+ oneOf:
24128
+ - $ref: "#/components/schemas/SiteQuestionAnswerSourcePage"
24129
+ - $ref: "#/components/schemas/SiteQuestionAnswerSourceRecord"
24130
+ discriminator:
24131
+ propertyName: type
24132
+ SiteSpaceCustomizationSettings:
24133
+ allOf:
24134
+ - $ref: "#/components/schemas/SiteCustomizationSettings"
24135
+ - type: object
24136
+ properties:
24137
+ hasOverrides:
24138
+ type: boolean
24139
+ description: Indicates whether the site customization settings have been overridden.
24140
+ required:
24141
+ - hasOverrides
24142
+ SiteSectionGroupPointer:
24143
+ type: object
24144
+ properties:
24145
+ type:
24146
+ type: string
24147
+ enum:
24148
+ - site-section
24149
+ - site-section-group
24150
+ id:
24151
+ type: string
24152
+ description: Unique identifier for the site section
24153
+ required:
24154
+ - type
24155
+ - id
24156
+ SiteSectionGroupMovePosition:
24157
+ type: object
24158
+ description: Position at which to move the site section group.
24159
+ properties:
24160
+ before:
24161
+ $ref: "#/components/schemas/SiteSectionGroupPointer"
24162
+ after:
24163
+ $ref: "#/components/schemas/SiteSectionGroupPointer"
24164
+ SiteSectionPointer:
24165
+ type: object
24166
+ properties:
24167
+ type:
24168
+ type: string
24169
+ enum:
24170
+ - site-section
24171
+ siteSection:
24172
+ type: string
24173
+ description: Unique identifier for the site section
24174
+ required:
24175
+ - type
24176
+ - siteSection
24177
+ SiteSectionMovePosition:
24178
+ type: object
24179
+ description: Position at which to move the site section to.
24180
+ properties:
24181
+ before:
24182
+ $ref: "#/components/schemas/SiteSectionPointer"
24183
+ after:
24184
+ $ref: "#/components/schemas/SiteSectionPointer"
24185
+ SiteSpacePointer:
24186
+ type: object
24187
+ properties:
24188
+ type:
24189
+ type: string
24190
+ enum:
24191
+ - site-space
24192
+ siteSpace:
24193
+ type: string
24194
+ description: Unique identifier for the site space
24195
+ required:
24196
+ - type
24197
+ - siteSpace
24198
+ SiteSpaceMovePosition:
24199
+ type: object
24200
+ description: Position at which to move the site space to.
24201
+ properties:
24202
+ before:
24203
+ $ref: "#/components/schemas/SiteSpacePointer"
24204
+ after:
24205
+ $ref: "#/components/schemas/SiteSpacePointer"
24206
+ InviteSiteUsersAndTeams:
24207
+ type: object
24208
+ properties:
24209
+ role:
24210
+ description: Role to set.
24211
+ $ref: "#/components/schemas/MemberRole"
24212
+ anyOf:
24213
+ - type: object
24214
+ properties:
24215
+ teams:
24216
+ type: array
24217
+ minItems: 1
24218
+ items:
24219
+ type: string
24220
+ description: The ID of the team to be invited
24221
+ required:
24222
+ - teams
24223
+ - type: object
24224
+ properties:
24225
+ users:
24226
+ type: array
24227
+ minItems: 1
24228
+ items:
24229
+ type: string
24230
+ description: The ID of the user to be invited
24231
+ required:
24232
+ - users
24233
+ required:
24234
+ - role
24235
+ OrganizationPointer:
24236
+ type: object
23583
24237
  properties:
23584
- tool:
24238
+ type:
23585
24239
  type: string
23586
24240
  enum:
23587
- - getReusableContent
23588
- spaceId:
23589
- type: string
23590
- description: The ID of the space being accessed.
23591
- revisionId:
24241
+ - organization
24242
+ organization:
23592
24243
  type: string
23593
- description: The ID of the revision within which the reusable content is being fetched.
23594
- reusableContent:
23595
- $ref: "#/components/schemas/ChangedRevisionReusableContent"
24244
+ description: Unique identifier for the organization
23596
24245
  required:
23597
- - tool
23598
- - spaceId
23599
- - reusableContent
23600
- - revisionId
23601
- AIToolCallCreateChangeRequest:
24246
+ - type
24247
+ - organization
24248
+ UserSitePermission:
23602
24249
  type: object
24250
+ description: Permission of a user in a site.
23603
24251
  properties:
23604
- tool:
23605
- type: string
23606
- enum:
23607
- - createChangeRequest
23608
- spaceId:
23609
- type: string
23610
- description: The ID of the space the change request belongs to.
23611
- action:
23612
- type: string
23613
- enum:
23614
- - create
23615
- - update
23616
- changeRequest:
24252
+ permission:
24253
+ $ref: "#/components/schemas/MemberRoleOrGuest"
24254
+ user:
24255
+ $ref: "#/components/schemas/User"
24256
+ origin:
24257
+ description: The content or organization that enforced this permission level.
24258
+ oneOf:
24259
+ - $ref: "#/components/schemas/SpacePointer"
24260
+ - $ref: "#/components/schemas/OrganizationPointer"
24261
+ required:
24262
+ - permission
24263
+ - user
24264
+ - origin
24265
+ UserSitePermissionOverride:
24266
+ type: object
24267
+ description: Permission override of a user in a site.
24268
+ properties:
24269
+ permission:
24270
+ $ref: "#/components/schemas/MemberRole"
24271
+ user:
24272
+ $ref: "#/components/schemas/User"
24273
+ required:
24274
+ - permission
24275
+ - user
24276
+ TeamSitePermissionOverride:
24277
+ type: object
24278
+ description: Permission override of a team in a site.
24279
+ properties:
24280
+ permission:
24281
+ $ref: "#/components/schemas/MemberRole"
24282
+ team:
24283
+ $ref: "#/components/schemas/OrganizationTeam"
24284
+ required:
24285
+ - permission
24286
+ - team
24287
+ AIMessageContext:
24288
+ type: object
24289
+ description: Context about the current user sending a message.
24290
+ properties:
24291
+ location:
23617
24292
  type: object
23618
24293
  properties:
23619
- id:
24294
+ spaceId:
23620
24295
  type: string
23621
- description: The unique identifier of the change request.
23622
- number:
23623
- type: number
23624
- description: Incremental identifier of the change request.
23625
- subject:
24296
+ description: ID of the current space.
24297
+ pageId:
23626
24298
  type: string
23627
- description: A brief summary of the change request.
24299
+ description: ID of the current page.
23628
24300
  required:
23629
- - id
23630
- - number
23631
- - subject
23632
- required:
23633
- - tool
23634
- - spaceId
23635
- - action
23636
- - changeRequest
23637
- AIToolCallComment:
24301
+ - spaceId
24302
+ - pageId
24303
+ AIMessageInput:
23638
24304
  type: object
24305
+ description: Input version of an AI message.
23639
24306
  properties:
23640
- tool:
24307
+ role:
23641
24308
  type: string
23642
24309
  enum:
23643
- - comment
23644
- spaceId:
24310
+ - user
24311
+ content:
24312
+ oneOf:
24313
+ - type: string
24314
+ maxLength: 2048
24315
+ - $ref: "#/components/schemas/JSONDocument"
24316
+ context:
24317
+ $ref: "#/components/schemas/AIMessageContext"
24318
+ attachments:
24319
+ type: array
24320
+ items:
24321
+ $ref: "#/components/schemas/AIAttachment"
24322
+ required:
24323
+ - role
24324
+ - content
24325
+ AIModel:
24326
+ type: string
24327
+ enum:
24328
+ - fast
24329
+ - reasoning-low
24330
+ - reasoning-medium
24331
+ - reasoning-high
24332
+ AIToolDefinition:
24333
+ type: object
24334
+ description: Description of a tool that can be called from an AI agent.
24335
+ properties:
24336
+ name:
23645
24337
  type: string
23646
- description: The ID of the space being commented.
23647
- page:
23648
- description: The page being commented.
23649
- $ref: "#/components/schemas/ChangedRevisionPage"
23650
- commentId:
24338
+ description: The name of the tool. It should be unique within the agent.
24339
+ description:
23651
24340
  type: string
23652
- description: The ID of the comment being posted.
24341
+ description: The description of the tool, passed to the AI agent.
24342
+ inputSchema:
24343
+ type: object
24344
+ description: JSON schema describing the input of the tool.
24345
+ properties:
24346
+ type:
24347
+ type: string
24348
+ enum:
24349
+ - object
24350
+ properties:
24351
+ type: object
24352
+ additionalProperties:
24353
+ type: object
24354
+ properties:
24355
+ type:
24356
+ type: string
24357
+ enum:
24358
+ - string
24359
+ - number
24360
+ - boolean
24361
+ - array
24362
+ - object
24363
+ description:
24364
+ type: string
24365
+ description: Description of the property.
24366
+ required:
24367
+ - type
24368
+ - description
24369
+ additionalProperties: true
24370
+ required:
24371
+ - type
24372
+ - properties
23653
24373
  required:
23654
- - tool
23655
- - spaceId
23656
- - commentId
23657
- AIToolCallReplyToComment:
24374
+ - name
24375
+ - description
24376
+ AIToolCallResult:
23658
24377
  type: object
24378
+ description: Result of a tool call.
24379
+ required:
24380
+ - tool
24381
+ - toolCallId
24382
+ - output
23659
24383
  properties:
23660
24384
  tool:
23661
24385
  type: string
23662
- enum:
23663
- - replyToComment
23664
- spaceId:
24386
+ description: The name of the tool that was called.
24387
+ toolCallId:
23665
24388
  type: string
23666
- description: The ID of the space being commented.
23667
- page:
23668
- description: The page being commented.
23669
- $ref: "#/components/schemas/ChangedRevisionPage"
23670
- commentId:
24389
+ description: The ID of the tool call.
24390
+ output:
24391
+ type: object
24392
+ description: The output to the tool call.
24393
+ summary:
24394
+ $ref: "#/components/schemas/AIToolCallOtherSummary"
24395
+ AIStreamResponseStart:
24396
+ type: object
24397
+ description: |
24398
+ Message emitted by the server to indicate the start of the AI response.
24399
+ properties:
24400
+ type:
23671
24401
  type: string
23672
- description: The ID of the comment being replied to.
23673
- replyId:
24402
+ enum:
24403
+ - response_start
24404
+ messageId:
23674
24405
  type: string
23675
- description: The ID of the reply being posted.
24406
+ description: |
24407
+ The ID of the message that this event is composing.
24408
+ task:
24409
+ $ref: "#/components/schemas/AIMessageTask"
23676
24410
  required:
23677
- - tool
23678
- - spaceId
23679
- - commentId
23680
- - replyId
23681
- AIToolCallSubmitChangeRequestReview:
24411
+ - type
24412
+ - messageId
24413
+ AIStreamResponseFinish:
23682
24414
  type: object
24415
+ description: |
24416
+ Message emitted by the server to indicate the end of the AI response. It contains the ID of the response to be referenced for followup requests.
23683
24417
  properties:
23684
- tool:
24418
+ type:
23685
24419
  type: string
23686
24420
  enum:
23687
- - submitChangeRequestReview
23688
- spaceId:
23689
- type: string
23690
- description: The ID of the space where the review was submitted.
23691
- changeRequestId:
23692
- type: string
23693
- description: The ID of the change request being reviewed.
23694
- status:
23695
- $ref: "#/components/schemas/ChangeRequestReviewStatus"
23696
- description: Result of the review.
23697
- reviewId:
24421
+ - response_finish
24422
+ messageId:
23698
24423
  type: string
23699
- description: Identifier of the review that was created.
23700
- commentId:
24424
+ description: |
24425
+ The ID of the message that this event is composing.
24426
+ responseId:
23701
24427
  type: string
23702
- description: Identifier of the comment that was created as part of the review.
24428
+ deprecated: true
24429
+ description: The ID of the response
24430
+ response:
24431
+ description: The response metadata associated with the message.
24432
+ $ref: "#/components/schemas/AIMessageResponseMetadata"
23703
24433
  required:
23704
- - tool
23705
- - spaceId
23706
- - changeRequestId
23707
- - status
23708
- - reviewId
23709
- - commentId
23710
- AIToolCallMCP:
24434
+ - type
24435
+ - messageId
24436
+ - response
24437
+ AIStreamResponseDocument:
23711
24438
  type: object
23712
- description: Tool called from an MCP server
24439
+ description: |
24440
+ Message emitted by the server to indicate the latest block of the document. The block can either be a new block or an update to the previous block.
23713
24441
  properties:
23714
- tool:
24442
+ type:
23715
24443
  type: string
23716
24444
  enum:
23717
- - mcp
23718
- mcpServerId:
23719
- type: string
23720
- description: The ID of the MCP server that has been called.
23721
- mcpToolName:
24445
+ - response_document
24446
+ - response_reasoning
24447
+ messageId:
23722
24448
  type: string
23723
- description: The name of the tool that has been called.
23724
- mcpToolTitle:
24449
+ description: |
24450
+ The ID of the message that this event is composing.
24451
+ stepIndex:
24452
+ type: integer
24453
+ description: |
24454
+ The index of the step of the message that this event is composing.
24455
+ operation:
23725
24456
  type: string
23726
- description: The title of the tool that has been called.
24457
+ enum:
24458
+ - insert
24459
+ - update
24460
+ blocks:
24461
+ type: array
24462
+ items:
24463
+ $ref: "#/components/schemas/DocumentBlocksTopLevels"
23727
24464
  required:
23728
- - tool
23729
- - mcpServerId
23730
- - mcpToolName
23731
- AIToolCallOther:
24465
+ - type
24466
+ - messageId
24467
+ - stepIndex
24468
+ - operation
24469
+ - blocks
24470
+ AIStreamResponseObject:
23732
24471
  type: object
23733
- description: Any tool call that is unknown by GitBook
24472
+ description: |
24473
+ Message emitted by the server to indicate a chunk of the JSON object response.
23734
24474
  properties:
23735
- tool:
24475
+ type:
23736
24476
  type: string
23737
24477
  enum:
23738
- - other
23739
- summary:
23740
- $ref: "#/components/schemas/AIToolCallOtherSummary"
24478
+ - response_object
24479
+ messageId:
24480
+ type: string
24481
+ description: |
24482
+ The ID of the message that this event is composing.
24483
+ jsonChunk:
24484
+ type: string
24485
+ description: The chunk of the JSON object response
23741
24486
  required:
23742
- - tool
23743
- - summary
23744
- AIToolCall:
23745
- oneOf:
23746
- - $ref: "#/components/schemas/AIToolCallGetPageContent"
23747
- - $ref: "#/components/schemas/AIToolCallGetPages"
23748
- - $ref: "#/components/schemas/AIToolCallGetReusableContents"
23749
- - $ref: "#/components/schemas/AIToolCallSearch"
23750
- - $ref: "#/components/schemas/AIToolCallEditPage"
23751
- - $ref: "#/components/schemas/AIToolCallCreatePage"
23752
- - $ref: "#/components/schemas/AIToolCallDeletePage"
23753
- - $ref: "#/components/schemas/AIToolCallRenamePage"
23754
- - $ref: "#/components/schemas/AIToolCallMovePage"
23755
- - $ref: "#/components/schemas/AIToolCallListModifiedPages"
23756
- - $ref: "#/components/schemas/AIToolCallGetPageDiff"
23757
- - $ref: "#/components/schemas/AIToolCallCreateReusableContent"
23758
- - $ref: "#/components/schemas/AIToolCallEditReusableContent"
23759
- - $ref: "#/components/schemas/AIToolCallGetReusableContent"
23760
- - $ref: "#/components/schemas/AIToolCallCreateChangeRequest"
23761
- - $ref: "#/components/schemas/AIToolCallComment"
23762
- - $ref: "#/components/schemas/AIToolCallReplyToComment"
23763
- - $ref: "#/components/schemas/AIToolCallSubmitChangeRequestReview"
23764
- - $ref: "#/components/schemas/AIToolCallMCP"
23765
- - $ref: "#/components/schemas/AIToolCallOther"
24487
+ - type
24488
+ - messageId
24489
+ - jsonChunk
23766
24490
  AIStreamResponseToolCall:
23767
24491
  type: object
23768
24492
  description: |
@@ -23884,62 +24608,56 @@ components:
23884
24608
  - $ref: "#/components/schemas/AIStreamResponseFollowupSuggestion"
23885
24609
  - $ref: "#/components/schemas/AIStreamResponseAttachment"
23886
24610
  SiteInsightsEventSession:
23887
- type: object
23888
- description: Analytics info on the GitBook's site session.
23889
- properties:
23890
- visitorId:
23891
- type: string
23892
- description: GitBook's unique identifier of the visitor.
23893
- sessionId:
23894
- type: string
23895
- description: GitBook's unique identifier of the visitor's session.
23896
- cookies:
23897
- type: object
23898
- description: The visitors cookies.
23899
- additionalProperties:
23900
- type: string
23901
- ip:
23902
- type: string
23903
- description: |
23904
- IP address of the visitor.
23905
- If not defined, it'll default to the IP executing the request.
23906
- userAgent:
23907
- type: string
23908
- description: |
23909
- User-agent of the visitor.
23910
- https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
23911
- language:
23912
- type: string
23913
- nullable: true
23914
- description: |
23915
- Language of the visitor.
23916
- https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language
23917
- referrer:
23918
- description: Referrer of the session
23919
- oneOf:
23920
- - type: string
24611
+ allOf:
24612
+ - $ref: "#/components/schemas/SiteInsightsSession"
24613
+ - type: object
24614
+ description: Analytics info on the GitBook's site session.
24615
+ properties:
24616
+ cookies:
24617
+ type: object
24618
+ description: The visitors cookies.
24619
+ additionalProperties:
24620
+ type: string
24621
+ ip:
24622
+ type: string
24623
+ description: |
24624
+ IP address of the visitor.
24625
+ If not defined, it'll default to the IP executing the request.
24626
+ userAgent:
24627
+ type: string
24628
+ description: |
24629
+ User-agent of the visitor.
24630
+ https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
24631
+ language:
24632
+ type: string
23921
24633
  nullable: true
23922
- enum:
23923
- - null
23924
- - ""
23925
- - $ref: "#/components/schemas/URL"
23926
- visitorAuthToken:
23927
- type: string
23928
- nullable: true
23929
- deprecated: true
23930
- description: Deprecated, use visitorAuthClaims instead.
23931
- visitorAuthClaims:
23932
- description: |
23933
- Claims of the visitor.
23934
- This is used to identify the visitor with adaptive content.
23935
- $ref: "#/components/schemas/PlainObject"
23936
- required:
23937
- - visitorId
23938
- - sessionId
23939
- - cookies
23940
- - userAgent
23941
- - language
23942
- - referrer
24634
+ description: |
24635
+ Language of the visitor.
24636
+ https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language
24637
+ referrer:
24638
+ description: Referrer of the session
24639
+ oneOf:
24640
+ - type: string
24641
+ nullable: true
24642
+ enum:
24643
+ - null
24644
+ - ""
24645
+ - $ref: "#/components/schemas/URL"
24646
+ visitorAuthToken:
24647
+ type: string
24648
+ nullable: true
24649
+ deprecated: true
24650
+ description: Deprecated, use visitorAuthClaims instead.
24651
+ visitorAuthClaims:
24652
+ description: |
24653
+ Claims of the visitor.
24654
+ This is used to identify the visitor with adaptive content.
24655
+ $ref: "#/components/schemas/PlainObject"
24656
+ required:
24657
+ - cookies
24658
+ - userAgent
24659
+ - language
24660
+ - referrer
23943
24661
  SiteInsightsDisplayContext:
23944
24662
  type: string
23945
24663
  description: Context in which the event was recorded.
@@ -25524,6 +26242,27 @@ components:
25524
26242
  - id
25525
26243
  - source
25526
26244
  - destination
26245
+ SiteRedirectInputDestinationPath:
26246
+ type: object
26247
+ properties:
26248
+ kind:
26249
+ type: string
26250
+ enum:
26251
+ - path
26252
+ spaceId:
26253
+ type: string
26254
+ description: Unique identifier for the space containing the page referenced by the path.
26255
+ path:
26256
+ type: string
26257
+ description: Path to the page within the space revision to resolve.
26258
+ required:
26259
+ - kind
26260
+ - spaceId
26261
+ - path
26262
+ SiteRedirectInputDestination:
26263
+ oneOf:
26264
+ - $ref: "#/components/schemas/SiteRedirectDestination"
26265
+ - $ref: "#/components/schemas/SiteRedirectInputDestinationPath"
25527
26266
  SiteMcpServerName:
25528
26267
  type: string
25529
26268
  description: Name of the MCP server
@@ -26068,16 +26807,6 @@ components:
26068
26807
  description: JWT token generated for a authenticated access session.
26069
26808
  unsignedClaims:
26070
26809
  $ref: "#/components/schemas/PlainObject"
26071
- Timerange:
26072
- type: object
26073
- properties:
26074
- start:
26075
- $ref: "#/components/schemas/Timestamp"
26076
- end:
26077
- $ref: "#/components/schemas/Timestamp"
26078
- required:
26079
- - start
26080
- - end
26081
26810
  SHA256:
26082
26811
  type: string
26083
26812
  minLength: 64
@@ -27867,6 +28596,12 @@ components:
27867
28596
  - live
27868
28597
  - rejected
27869
28598
  - disabled
28599
+ SiteQuestionAnswerSourceType:
28600
+ type: string
28601
+ description: Source type used to answer a site question.
28602
+ enum:
28603
+ - page
28604
+ - record
27870
28605
  Seat:
27871
28606
  type: object
27872
28607
  properties:
@@ -27892,55 +28627,6 @@ components:
27892
28627
  - member
27893
28628
  - createdAt
27894
28629
  - updatedAt
27895
- AIMessageRole:
27896
- type: string
27897
- enum:
27898
- - user
27899
- - assistant
27900
- - developer
27901
- AIMessageStep:
27902
- type: object
27903
- description: A step in a message from the AI agent.
27904
- properties:
27905
- content:
27906
- $ref: "#/components/schemas/JSONDocument"
27907
- reasoning:
27908
- $ref: "#/components/schemas/JSONDocument"
27909
- toolCalls:
27910
- type: array
27911
- items:
27912
- $ref: "#/components/schemas/AIToolCall"
27913
- timing:
27914
- type: object
27915
- description: The timing of the step.
27916
- properties:
27917
- reasoning:
27918
- $ref: "#/components/schemas/Timerange"
27919
- attachments:
27920
- type: array
27921
- items:
27922
- $ref: "#/components/schemas/AIAttachment"
27923
- required:
27924
- - content
27925
- AIMessage:
27926
- type: object
27927
- properties:
27928
- id:
27929
- type: string
27930
- role:
27931
- $ref: "#/components/schemas/AIMessageRole"
27932
- steps:
27933
- type: array
27934
- items:
27935
- $ref: "#/components/schemas/AIMessageStep"
27936
- task:
27937
- $ref: "#/components/schemas/AIMessageTask"
27938
- response:
27939
- $ref: "#/components/schemas/AIMessageResponseMetadata"
27940
- required:
27941
- - id
27942
- - role
27943
- - steps
27944
28630
  AgentStreamMessages:
27945
28631
  type: object
27946
28632
  description: |