chatbase 0.2.0 → 0.4.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/README.md +120 -55
- package/dist/commands/conversations/export.js +41 -2
- package/dist/commands/conversations/list.js +24 -1
- package/dist/commands/voice/start.js +78 -0
- package/oclif.manifest.json +833 -669
- package/package.json +4 -1
- package/spec/coverage-ignore.json +12 -0
- package/spec/openapi.json +1119 -67
package/spec/openapi.json
CHANGED
|
@@ -3173,6 +3173,65 @@
|
|
|
3173
3173
|
"messageId"
|
|
3174
3174
|
]
|
|
3175
3175
|
},
|
|
3176
|
+
"VoiceSessionResponse": {
|
|
3177
|
+
"type": "object",
|
|
3178
|
+
"properties": {
|
|
3179
|
+
"participantToken": {
|
|
3180
|
+
"type": "string",
|
|
3181
|
+
"description": "Short-lived token scoped to this session. Pass the response `data` to the Chatbase Voice SDK in your client; safe to hand to the browser or mobile app."
|
|
3182
|
+
},
|
|
3183
|
+
"sessionId": {
|
|
3184
|
+
"type": "string",
|
|
3185
|
+
"description": "The voice session ID."
|
|
3186
|
+
},
|
|
3187
|
+
"roomName": {
|
|
3188
|
+
"type": "string",
|
|
3189
|
+
"description": "The session room name, for correlating logs."
|
|
3190
|
+
},
|
|
3191
|
+
"maxDurationSeconds": {
|
|
3192
|
+
"type": "integer",
|
|
3193
|
+
"description": "Maximum session duration; the session ends automatically when it elapses."
|
|
3194
|
+
},
|
|
3195
|
+
"conversationId": {
|
|
3196
|
+
"type": "string",
|
|
3197
|
+
"description": "The conversation this session belongs to (echoed or generated)."
|
|
3198
|
+
},
|
|
3199
|
+
"userId": {
|
|
3200
|
+
"type": "string",
|
|
3201
|
+
"description": "The end-user ID for this session (echoed or generated)."
|
|
3202
|
+
}
|
|
3203
|
+
},
|
|
3204
|
+
"required": [
|
|
3205
|
+
"participantToken",
|
|
3206
|
+
"sessionId",
|
|
3207
|
+
"roomName",
|
|
3208
|
+
"maxDurationSeconds",
|
|
3209
|
+
"conversationId",
|
|
3210
|
+
"userId"
|
|
3211
|
+
]
|
|
3212
|
+
},
|
|
3213
|
+
"VoiceSessionRequest": {
|
|
3214
|
+
"type": "object",
|
|
3215
|
+
"properties": {
|
|
3216
|
+
"conversationId": {
|
|
3217
|
+
"type": "string",
|
|
3218
|
+
"format": "uuid",
|
|
3219
|
+
"description": "Optional conversation UUID. Reuse a value to group multiple voice sessions into one conversation in chat logs. If omitted, a new conversation is created. A conversation belongs to the end-user who started it: when reusing, send that same userId or omit userId to inherit it. Sending a different userId is rejected with CONVERSATION_USER_MISMATCH, unless the conversation is still anonymous — then it is claimed by the userId you send."
|
|
3220
|
+
},
|
|
3221
|
+
"userId": {
|
|
3222
|
+
"type": "string",
|
|
3223
|
+
"maxLength": 128,
|
|
3224
|
+
"pattern": "^[a-zA-Z0-9._-]+$",
|
|
3225
|
+
"description": "Your end-user ID. Send a stable ID so per-user voice limits apply; if omitted a random one is generated per session (or inherited from the conversation when reusing a conversationId). Sessions with the same userId but no conversationId are separate conversations owned by the same end-user. Must contain only URL-safe characters (letters, digits, hyphens, underscores, dots)."
|
|
3226
|
+
},
|
|
3227
|
+
"timezone": {
|
|
3228
|
+
"type": "string",
|
|
3229
|
+
"maxLength": 64,
|
|
3230
|
+
"default": "UTC",
|
|
3231
|
+
"description": "IANA timezone of the end user (e.g. \"Europe/Paris\"), used by the agent for time-aware answers. Defaults to UTC."
|
|
3232
|
+
}
|
|
3233
|
+
}
|
|
3234
|
+
},
|
|
3176
3235
|
"ListConversationsResponse": {
|
|
3177
3236
|
"type": "object",
|
|
3178
3237
|
"properties": {
|
|
@@ -3376,7 +3435,7 @@
|
|
|
3376
3435
|
"items": {
|
|
3377
3436
|
"$ref": "#/components/schemas/ExportMessage"
|
|
3378
3437
|
},
|
|
3379
|
-
"description": "Conversation messages"
|
|
3438
|
+
"description": "Conversation messages. Present unless `include=summary` was requested."
|
|
3380
3439
|
}
|
|
3381
3440
|
},
|
|
3382
3441
|
"required": [
|
|
@@ -3386,8 +3445,7 @@
|
|
|
3386
3445
|
"updatedAt",
|
|
3387
3446
|
"userId",
|
|
3388
3447
|
"source",
|
|
3389
|
-
"status"
|
|
3390
|
-
"messages"
|
|
3448
|
+
"status"
|
|
3391
3449
|
]
|
|
3392
3450
|
},
|
|
3393
3451
|
"ExportMessage": {
|
|
@@ -5582,6 +5640,7 @@
|
|
|
5582
5640
|
"paths": {
|
|
5583
5641
|
"/health": {
|
|
5584
5642
|
"get": {
|
|
5643
|
+
"operationId": "getHealth",
|
|
5585
5644
|
"tags": [
|
|
5586
5645
|
"Health"
|
|
5587
5646
|
],
|
|
@@ -5622,6 +5681,33 @@
|
|
|
5622
5681
|
},
|
|
5623
5682
|
"/agents": {
|
|
5624
5683
|
"get": {
|
|
5684
|
+
"operationId": "listAgents",
|
|
5685
|
+
"x-mcp": {
|
|
5686
|
+
"tool": "chatbase_list_agents",
|
|
5687
|
+
"scopes": [
|
|
5688
|
+
"agents:read"
|
|
5689
|
+
],
|
|
5690
|
+
"annotations": {
|
|
5691
|
+
"readOnly": true,
|
|
5692
|
+
"idempotent": true
|
|
5693
|
+
},
|
|
5694
|
+
"fields": [
|
|
5695
|
+
"id",
|
|
5696
|
+
"name",
|
|
5697
|
+
"status",
|
|
5698
|
+
"createdAt",
|
|
5699
|
+
"model",
|
|
5700
|
+
"autoRetrain",
|
|
5701
|
+
"lastTrainedAt",
|
|
5702
|
+
"lastMessageAt",
|
|
5703
|
+
"size",
|
|
5704
|
+
"visibility",
|
|
5705
|
+
"temp",
|
|
5706
|
+
"creditLimit",
|
|
5707
|
+
"creditsUsed"
|
|
5708
|
+
],
|
|
5709
|
+
"maxItems": 25
|
|
5710
|
+
},
|
|
5625
5711
|
"tags": [
|
|
5626
5712
|
"Agents"
|
|
5627
5713
|
],
|
|
@@ -5769,11 +5855,19 @@
|
|
|
5769
5855
|
}
|
|
5770
5856
|
},
|
|
5771
5857
|
"post": {
|
|
5858
|
+
"operationId": "createAgent",
|
|
5859
|
+
"x-mcp": {
|
|
5860
|
+
"tool": "chatbase_create_agent",
|
|
5861
|
+
"scopes": [
|
|
5862
|
+
"agents:write"
|
|
5863
|
+
],
|
|
5864
|
+
"annotations": {}
|
|
5865
|
+
},
|
|
5772
5866
|
"tags": [
|
|
5773
5867
|
"Agents"
|
|
5774
5868
|
],
|
|
5775
5869
|
"summary": "Create agent",
|
|
5776
|
-
"description": "Creates a new agent. If `url` is provided, a link source is created from that URL and training is queued automatically —
|
|
5870
|
+
"description": "Creates a new agent. If `url` is provided, a link source is created from that URL and training is queued automatically.\n\nThe agent is always created even if source setup or training fails — `id` is always returned. Check `pendingSteps` in the response to see which steps need to be retried:\n- `ADD_SOURCE` — the URL could not be added as a source. Add sources manually via the Sources API.\n- `TRAIN_AGENT` — training could not be started. Trigger it manually via `POST /agents/{agentId}/train`.\n\nWhen `pendingSteps` is absent, all steps succeeded.\n\nSubject to plan agent limits — returns `AGENT_LIMIT_REACHED` (403) when the account has reached its maximum number of agents.",
|
|
5777
5871
|
"security": [
|
|
5778
5872
|
{
|
|
5779
5873
|
"bearerAuth": []
|
|
@@ -5901,6 +5995,17 @@
|
|
|
5901
5995
|
},
|
|
5902
5996
|
"/agents/{agentId}": {
|
|
5903
5997
|
"get": {
|
|
5998
|
+
"operationId": "getAgent",
|
|
5999
|
+
"x-mcp": {
|
|
6000
|
+
"tool": "chatbase_get_agent",
|
|
6001
|
+
"scopes": [
|
|
6002
|
+
"agents:read"
|
|
6003
|
+
],
|
|
6004
|
+
"annotations": {
|
|
6005
|
+
"readOnly": true,
|
|
6006
|
+
"idempotent": true
|
|
6007
|
+
}
|
|
6008
|
+
},
|
|
5904
6009
|
"tags": [
|
|
5905
6010
|
"Agents"
|
|
5906
6011
|
],
|
|
@@ -6035,6 +6140,16 @@
|
|
|
6035
6140
|
}
|
|
6036
6141
|
},
|
|
6037
6142
|
"put": {
|
|
6143
|
+
"operationId": "updateAgent",
|
|
6144
|
+
"x-mcp": {
|
|
6145
|
+
"tool": "chatbase_update_agent",
|
|
6146
|
+
"scopes": [
|
|
6147
|
+
"agents:write"
|
|
6148
|
+
],
|
|
6149
|
+
"annotations": {
|
|
6150
|
+
"idempotent": true
|
|
6151
|
+
}
|
|
6152
|
+
},
|
|
6038
6153
|
"tags": [
|
|
6039
6154
|
"Agents"
|
|
6040
6155
|
],
|
|
@@ -6195,6 +6310,16 @@
|
|
|
6195
6310
|
}
|
|
6196
6311
|
},
|
|
6197
6312
|
"delete": {
|
|
6313
|
+
"operationId": "deleteAgent",
|
|
6314
|
+
"x-mcp": {
|
|
6315
|
+
"tool": "chatbase_delete_agent",
|
|
6316
|
+
"scopes": [
|
|
6317
|
+
"agents:delete"
|
|
6318
|
+
],
|
|
6319
|
+
"annotations": {
|
|
6320
|
+
"destructive": true
|
|
6321
|
+
}
|
|
6322
|
+
},
|
|
6198
6323
|
"tags": [
|
|
6199
6324
|
"Agents"
|
|
6200
6325
|
],
|
|
@@ -6331,6 +6456,7 @@
|
|
|
6331
6456
|
},
|
|
6332
6457
|
"/agents/{agentId}/styles": {
|
|
6333
6458
|
"put": {
|
|
6459
|
+
"operationId": "updateAgentStyles",
|
|
6334
6460
|
"tags": [
|
|
6335
6461
|
"Agents"
|
|
6336
6462
|
],
|
|
@@ -6493,11 +6619,21 @@
|
|
|
6493
6619
|
},
|
|
6494
6620
|
"/agents/{agentId}/auto-retrain": {
|
|
6495
6621
|
"put": {
|
|
6622
|
+
"operationId": "updateAgentAutoRetrain",
|
|
6623
|
+
"x-mcp": {
|
|
6624
|
+
"tool": "chatbase_update_agent_auto_retrain",
|
|
6625
|
+
"scopes": [
|
|
6626
|
+
"sources:write"
|
|
6627
|
+
],
|
|
6628
|
+
"annotations": {
|
|
6629
|
+
"idempotent": true
|
|
6630
|
+
}
|
|
6631
|
+
},
|
|
6496
6632
|
"tags": [
|
|
6497
6633
|
"Agents"
|
|
6498
6634
|
],
|
|
6499
6635
|
"summary": "Toggle auto-retrain",
|
|
6500
|
-
"description": "Enables or disables automatic retraining. When enabled, the agent
|
|
6636
|
+
"description": "Enables or disables automatic retraining. When enabled, the agent retrains every 7 days to reflect any source changes.\n\nRequirements:\n- The agent must have been trained at least once — returns `AGENT_NOT_TRAINED` (409) otherwise.\n- Requires the Standard plan or higher — returns `PLAN_FEATURE_NOT_AVAILABLE` (403) on unsupported plans.",
|
|
6501
6637
|
"security": [
|
|
6502
6638
|
{
|
|
6503
6639
|
"bearerAuth": []
|
|
@@ -6671,11 +6807,19 @@
|
|
|
6671
6807
|
},
|
|
6672
6808
|
"/agents/{agentId}/clone": {
|
|
6673
6809
|
"post": {
|
|
6810
|
+
"operationId": "cloneAgent",
|
|
6811
|
+
"x-mcp": {
|
|
6812
|
+
"tool": "chatbase_clone_agent",
|
|
6813
|
+
"scopes": [
|
|
6814
|
+
"agents:write"
|
|
6815
|
+
],
|
|
6816
|
+
"annotations": {}
|
|
6817
|
+
},
|
|
6674
6818
|
"tags": [
|
|
6675
6819
|
"Agents"
|
|
6676
6820
|
],
|
|
6677
6821
|
"summary": "Clone agent",
|
|
6678
|
-
"description": "Creates a full deep-clone of an agent, including all its sources (excluding Notion). Returns the new agent ID.",
|
|
6822
|
+
"description": "Creates a full deep-clone of an agent, including all its sources (excluding Notion). Returns the new agent ID.\n\nSame response shape as Create Agent — `pendingSteps` indicates if training could not start automatically. The clone is a new, independent agent; changes to the original do not affect it.\n\nSubject to plan agent limits — returns `AGENT_LIMIT_REACHED` (403) when the account has reached its maximum number of agents.",
|
|
6679
6823
|
"security": [
|
|
6680
6824
|
{
|
|
6681
6825
|
"bearerAuth": []
|
|
@@ -6807,6 +6951,16 @@
|
|
|
6807
6951
|
},
|
|
6808
6952
|
"/agents/{agentId}/train": {
|
|
6809
6953
|
"post": {
|
|
6954
|
+
"operationId": "trainAgent",
|
|
6955
|
+
"x-mcp": {
|
|
6956
|
+
"tool": "chatbase_train_agent",
|
|
6957
|
+
"scopes": [
|
|
6958
|
+
"sources:write"
|
|
6959
|
+
],
|
|
6960
|
+
"annotations": {
|
|
6961
|
+
"destructive": true
|
|
6962
|
+
}
|
|
6963
|
+
},
|
|
6810
6964
|
"tags": [
|
|
6811
6965
|
"Agents"
|
|
6812
6966
|
],
|
|
@@ -6959,6 +7113,16 @@
|
|
|
6959
7113
|
},
|
|
6960
7114
|
"/agents/{agentId}/chat": {
|
|
6961
7115
|
"post": {
|
|
7116
|
+
"operationId": "chatWithAgent",
|
|
7117
|
+
"x-mcp": {
|
|
7118
|
+
"tool": "chatbase_chat",
|
|
7119
|
+
"scopes": [
|
|
7120
|
+
"chatlogs:write"
|
|
7121
|
+
],
|
|
7122
|
+
"annotations": {
|
|
7123
|
+
"openWorld": true
|
|
7124
|
+
}
|
|
7125
|
+
},
|
|
6962
7126
|
"tags": [
|
|
6963
7127
|
"Agents"
|
|
6964
7128
|
],
|
|
@@ -7150,6 +7314,7 @@
|
|
|
7150
7314
|
},
|
|
7151
7315
|
"/agents/{agentId}/conversations/{conversationId}/retry": {
|
|
7152
7316
|
"post": {
|
|
7317
|
+
"operationId": "retryMessage",
|
|
7153
7318
|
"tags": [
|
|
7154
7319
|
"Agents"
|
|
7155
7320
|
],
|
|
@@ -7352,13 +7517,14 @@
|
|
|
7352
7517
|
}
|
|
7353
7518
|
}
|
|
7354
7519
|
},
|
|
7355
|
-
"/agents/{agentId}/
|
|
7356
|
-
"
|
|
7520
|
+
"/agents/{agentId}/voice/sessions": {
|
|
7521
|
+
"post": {
|
|
7522
|
+
"operationId": "createVoiceSession",
|
|
7357
7523
|
"tags": [
|
|
7358
|
-
"
|
|
7524
|
+
"Agents"
|
|
7359
7525
|
],
|
|
7360
|
-
"summary": "
|
|
7361
|
-
"description": "
|
|
7526
|
+
"summary": "Start a voice session",
|
|
7527
|
+
"description": "Create a real-time voice session for an agent. Pass the response `data` to the Chatbase Voice SDK (`@chatbase-co/voice-sdk`) in your client: the SDK connects, publishes the microphone, and the agent joins automatically. Requires a plan with voice mode enabled; voice minutes consume message credits. Send `{}` when no options are needed.",
|
|
7362
7528
|
"security": [
|
|
7363
7529
|
{
|
|
7364
7530
|
"bearerAuth": []
|
|
@@ -7376,40 +7542,33 @@
|
|
|
7376
7542
|
"description": "The agent ID",
|
|
7377
7543
|
"name": "agentId",
|
|
7378
7544
|
"in": "path"
|
|
7379
|
-
},
|
|
7380
|
-
{
|
|
7381
|
-
"schema": {
|
|
7382
|
-
"type": "string",
|
|
7383
|
-
"description": "Opaque cursor from a previous response to fetch the next page",
|
|
7384
|
-
"example": "eyJ0IjoiMjAyNC0wMS0xNVQxMDozMDowMC4wMDBaIiwiaWQiOiJhYmMxMjMifQ=="
|
|
7385
|
-
},
|
|
7386
|
-
"required": false,
|
|
7387
|
-
"description": "Opaque cursor from a previous response to fetch the next page",
|
|
7388
|
-
"name": "cursor",
|
|
7389
|
-
"in": "query"
|
|
7390
|
-
},
|
|
7391
|
-
{
|
|
7392
|
-
"schema": {
|
|
7393
|
-
"type": "integer",
|
|
7394
|
-
"minimum": 1,
|
|
7395
|
-
"maximum": 100,
|
|
7396
|
-
"default": 20,
|
|
7397
|
-
"description": "Number of items per page (1 to 100, default 20)",
|
|
7398
|
-
"example": 20
|
|
7399
|
-
},
|
|
7400
|
-
"required": false,
|
|
7401
|
-
"description": "Number of items per page (1 to 100, default 20)",
|
|
7402
|
-
"name": "limit",
|
|
7403
|
-
"in": "query"
|
|
7404
7545
|
}
|
|
7405
7546
|
],
|
|
7547
|
+
"requestBody": {
|
|
7548
|
+
"required": true,
|
|
7549
|
+
"content": {
|
|
7550
|
+
"application/json": {
|
|
7551
|
+
"schema": {
|
|
7552
|
+
"$ref": "#/components/schemas/VoiceSessionRequest"
|
|
7553
|
+
}
|
|
7554
|
+
}
|
|
7555
|
+
}
|
|
7556
|
+
},
|
|
7406
7557
|
"responses": {
|
|
7407
7558
|
"200": {
|
|
7408
|
-
"description": "
|
|
7559
|
+
"description": "Voice session created",
|
|
7409
7560
|
"content": {
|
|
7410
7561
|
"application/json": {
|
|
7411
7562
|
"schema": {
|
|
7412
|
-
"
|
|
7563
|
+
"type": "object",
|
|
7564
|
+
"properties": {
|
|
7565
|
+
"data": {
|
|
7566
|
+
"$ref": "#/components/schemas/VoiceSessionResponse"
|
|
7567
|
+
}
|
|
7568
|
+
},
|
|
7569
|
+
"required": [
|
|
7570
|
+
"data"
|
|
7571
|
+
]
|
|
7413
7572
|
}
|
|
7414
7573
|
}
|
|
7415
7574
|
}
|
|
@@ -7462,6 +7621,22 @@
|
|
|
7462
7621
|
}
|
|
7463
7622
|
}
|
|
7464
7623
|
},
|
|
7624
|
+
"404": {
|
|
7625
|
+
"description": "No agent matches the provided `agentId`, or it does not belong to the authenticated account.",
|
|
7626
|
+
"content": {
|
|
7627
|
+
"application/json": {
|
|
7628
|
+
"schema": {
|
|
7629
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
7630
|
+
},
|
|
7631
|
+
"example": {
|
|
7632
|
+
"error": {
|
|
7633
|
+
"code": "AGENT_NOT_FOUND",
|
|
7634
|
+
"message": "Agent not found"
|
|
7635
|
+
}
|
|
7636
|
+
}
|
|
7637
|
+
}
|
|
7638
|
+
}
|
|
7639
|
+
},
|
|
7465
7640
|
"429": {
|
|
7466
7641
|
"description": "Rate limit exceeded. Check the `X-RateLimit-Reset` response header for the Unix epoch seconds when the limit resets.",
|
|
7467
7642
|
"content": {
|
|
@@ -7513,13 +7688,14 @@
|
|
|
7513
7688
|
}
|
|
7514
7689
|
}
|
|
7515
7690
|
},
|
|
7516
|
-
"/agents/{agentId}/conversations
|
|
7691
|
+
"/agents/{agentId}/conversations": {
|
|
7517
7692
|
"get": {
|
|
7693
|
+
"operationId": "listConversations",
|
|
7518
7694
|
"tags": [
|
|
7519
7695
|
"Conversations"
|
|
7520
7696
|
],
|
|
7521
|
-
"summary": "
|
|
7522
|
-
"description": "
|
|
7697
|
+
"summary": "List conversations",
|
|
7698
|
+
"description": "List conversations for an agent, ordered by createdAt date. Supports cursor-based pagination. Pass `startDate` and/or `endDate` to restrict the results to a createdAt window.",
|
|
7523
7699
|
"security": [
|
|
7524
7700
|
{
|
|
7525
7701
|
"bearerAuth": []
|
|
@@ -7553,49 +7729,75 @@
|
|
|
7553
7729
|
"schema": {
|
|
7554
7730
|
"type": "integer",
|
|
7555
7731
|
"minimum": 1,
|
|
7556
|
-
"maximum":
|
|
7732
|
+
"maximum": 100,
|
|
7557
7733
|
"default": 20,
|
|
7558
|
-
"description": "Number of items per page (1
|
|
7734
|
+
"description": "Number of items per page (1 to 100, default 20)",
|
|
7559
7735
|
"example": 20
|
|
7560
7736
|
},
|
|
7561
7737
|
"required": false,
|
|
7562
|
-
"description": "Number of items per page (1
|
|
7738
|
+
"description": "Number of items per page (1 to 100, default 20)",
|
|
7563
7739
|
"name": "limit",
|
|
7564
7740
|
"in": "query"
|
|
7565
7741
|
},
|
|
7566
7742
|
{
|
|
7567
7743
|
"schema": {
|
|
7568
7744
|
"type": "string",
|
|
7569
|
-
"description": "
|
|
7745
|
+
"description": "Only return conversations created at or after this point. Accepts a calendar date (`YYYY-MM-DD`, interpreted as the start of that day in UTC) or an ISO 8601 date-time.",
|
|
7746
|
+
"example": "2024-01-01"
|
|
7570
7747
|
},
|
|
7571
7748
|
"required": false,
|
|
7572
|
-
"description": "
|
|
7573
|
-
"name": "
|
|
7749
|
+
"description": "Only return conversations created at or after this point. Accepts a calendar date (`YYYY-MM-DD`, interpreted as the start of that day in UTC) or an ISO 8601 date-time.",
|
|
7750
|
+
"name": "startDate",
|
|
7751
|
+
"in": "query"
|
|
7752
|
+
},
|
|
7753
|
+
{
|
|
7754
|
+
"schema": {
|
|
7755
|
+
"type": "string",
|
|
7756
|
+
"description": "Only return conversations created at or before this point. Accepts a calendar date (`YYYY-MM-DD`, interpreted as the *end* of that day in UTC, so the day itself is included) or an ISO 8601 date-time.",
|
|
7757
|
+
"example": "2024-01-31"
|
|
7758
|
+
},
|
|
7759
|
+
"required": false,
|
|
7760
|
+
"description": "Only return conversations created at or before this point. Accepts a calendar date (`YYYY-MM-DD`, interpreted as the *end* of that day in UTC, so the day itself is included) or an ISO 8601 date-time.",
|
|
7761
|
+
"name": "endDate",
|
|
7574
7762
|
"in": "query"
|
|
7575
7763
|
}
|
|
7576
7764
|
],
|
|
7577
7765
|
"responses": {
|
|
7578
7766
|
"200": {
|
|
7579
|
-
"description": "Paginated list of conversations
|
|
7767
|
+
"description": "Paginated list of conversations",
|
|
7580
7768
|
"content": {
|
|
7581
7769
|
"application/json": {
|
|
7582
7770
|
"schema": {
|
|
7583
|
-
"$ref": "#/components/schemas/
|
|
7771
|
+
"$ref": "#/components/schemas/ListConversationsResponse"
|
|
7584
7772
|
}
|
|
7585
7773
|
}
|
|
7586
7774
|
}
|
|
7587
7775
|
},
|
|
7588
7776
|
"400": {
|
|
7589
|
-
"description": "
|
|
7777
|
+
"description": "Invalid request",
|
|
7590
7778
|
"content": {
|
|
7591
7779
|
"application/json": {
|
|
7592
7780
|
"schema": {
|
|
7593
7781
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
7594
7782
|
},
|
|
7595
|
-
"
|
|
7596
|
-
"
|
|
7597
|
-
"
|
|
7598
|
-
"
|
|
7783
|
+
"examples": {
|
|
7784
|
+
"VALIDATION_INVALID_BODY": {
|
|
7785
|
+
"summary": "The request body failed schema validation. Inspect the `details` object in the error response for field-level errors.",
|
|
7786
|
+
"value": {
|
|
7787
|
+
"error": {
|
|
7788
|
+
"code": "VALIDATION_INVALID_BODY",
|
|
7789
|
+
"message": "Invalid request"
|
|
7790
|
+
}
|
|
7791
|
+
}
|
|
7792
|
+
},
|
|
7793
|
+
"VALIDATION_INVALID_DATE_RANGE": {
|
|
7794
|
+
"summary": "The requested `createdAt` window is inverted. An inverted window can never match a row, so it is rejected rather than silently returning an empty page.",
|
|
7795
|
+
"value": {
|
|
7796
|
+
"error": {
|
|
7797
|
+
"code": "VALIDATION_INVALID_DATE_RANGE",
|
|
7798
|
+
"message": "startDate must not be after endDate"
|
|
7799
|
+
}
|
|
7800
|
+
}
|
|
7599
7801
|
}
|
|
7600
7802
|
}
|
|
7601
7803
|
}
|
|
@@ -7684,13 +7886,35 @@
|
|
|
7684
7886
|
}
|
|
7685
7887
|
}
|
|
7686
7888
|
},
|
|
7687
|
-
"/agents/{agentId}/conversations/
|
|
7889
|
+
"/agents/{agentId}/conversations/export": {
|
|
7688
7890
|
"get": {
|
|
7891
|
+
"operationId": "exportConversations",
|
|
7892
|
+
"x-mcp": {
|
|
7893
|
+
"tool": "chatbase_export_conversations",
|
|
7894
|
+
"scopes": [
|
|
7895
|
+
"chatlogs:export"
|
|
7896
|
+
],
|
|
7897
|
+
"annotations": {
|
|
7898
|
+
"readOnly": true,
|
|
7899
|
+
"idempotent": true
|
|
7900
|
+
},
|
|
7901
|
+
"fields": [
|
|
7902
|
+
"id",
|
|
7903
|
+
"title",
|
|
7904
|
+
"source",
|
|
7905
|
+
"status",
|
|
7906
|
+
"userId",
|
|
7907
|
+
"createdAt",
|
|
7908
|
+
"updatedAt",
|
|
7909
|
+
"messages"
|
|
7910
|
+
],
|
|
7911
|
+
"maxItems": 10
|
|
7912
|
+
},
|
|
7689
7913
|
"tags": [
|
|
7690
7914
|
"Conversations"
|
|
7691
7915
|
],
|
|
7692
|
-
"summary": "
|
|
7693
|
-
"description": "
|
|
7916
|
+
"summary": "Export conversations",
|
|
7917
|
+
"description": "Export all conversations with full message history for an agent. Includes conversations from all sources. Tool results are sanitized to remove internal data. Supports cursor-based pagination. Pass `conversationId` to fetch a single conversation from any source (widget, API, WhatsApp, etc.). Pass `include=summary` to omit message bodies for a cheaper triage pass, `source` to restrict to one or more conversation sources, and `startDate` / `endDate` to restrict to a createdAt window.",
|
|
7694
7918
|
"security": [
|
|
7695
7919
|
{
|
|
7696
7920
|
"bearerAuth": []
|
|
@@ -7712,23 +7936,258 @@
|
|
|
7712
7936
|
{
|
|
7713
7937
|
"schema": {
|
|
7714
7938
|
"type": "string",
|
|
7715
|
-
"
|
|
7716
|
-
"
|
|
7717
|
-
"example": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
|
|
7939
|
+
"description": "Opaque cursor from a previous response to fetch the next page",
|
|
7940
|
+
"example": "eyJ0IjoiMjAyNC0wMS0xNVQxMDozMDowMC4wMDBaIiwiaWQiOiJhYmMxMjMifQ=="
|
|
7718
7941
|
},
|
|
7719
|
-
"required":
|
|
7720
|
-
"description": "
|
|
7942
|
+
"required": false,
|
|
7943
|
+
"description": "Opaque cursor from a previous response to fetch the next page",
|
|
7944
|
+
"name": "cursor",
|
|
7945
|
+
"in": "query"
|
|
7946
|
+
},
|
|
7947
|
+
{
|
|
7948
|
+
"schema": {
|
|
7949
|
+
"type": "integer",
|
|
7950
|
+
"minimum": 1,
|
|
7951
|
+
"maximum": 20,
|
|
7952
|
+
"default": 20,
|
|
7953
|
+
"description": "Number of items per page (1–20, default 20)",
|
|
7954
|
+
"example": 20
|
|
7955
|
+
},
|
|
7956
|
+
"required": false,
|
|
7957
|
+
"description": "Number of items per page (1–20, default 20)",
|
|
7958
|
+
"name": "limit",
|
|
7959
|
+
"in": "query"
|
|
7960
|
+
},
|
|
7961
|
+
{
|
|
7962
|
+
"schema": {
|
|
7963
|
+
"type": "string",
|
|
7964
|
+
"description": "Only return conversations created at or after this point. Accepts a calendar date (`YYYY-MM-DD`, interpreted as the start of that day in UTC) or an ISO 8601 date-time.",
|
|
7965
|
+
"example": "2024-01-01"
|
|
7966
|
+
},
|
|
7967
|
+
"required": false,
|
|
7968
|
+
"description": "Only return conversations created at or after this point. Accepts a calendar date (`YYYY-MM-DD`, interpreted as the start of that day in UTC) or an ISO 8601 date-time.",
|
|
7969
|
+
"name": "startDate",
|
|
7970
|
+
"in": "query"
|
|
7971
|
+
},
|
|
7972
|
+
{
|
|
7973
|
+
"schema": {
|
|
7974
|
+
"type": "string",
|
|
7975
|
+
"description": "Only return conversations created at or before this point. Accepts a calendar date (`YYYY-MM-DD`, interpreted as the *end* of that day in UTC, so the day itself is included) or an ISO 8601 date-time.",
|
|
7976
|
+
"example": "2024-01-31"
|
|
7977
|
+
},
|
|
7978
|
+
"required": false,
|
|
7979
|
+
"description": "Only return conversations created at or before this point. Accepts a calendar date (`YYYY-MM-DD`, interpreted as the *end* of that day in UTC, so the day itself is included) or an ISO 8601 date-time.",
|
|
7980
|
+
"name": "endDate",
|
|
7981
|
+
"in": "query"
|
|
7982
|
+
},
|
|
7983
|
+
{
|
|
7984
|
+
"schema": {
|
|
7985
|
+
"type": "string",
|
|
7986
|
+
"description": "Return only the conversation with this ID. Use this to fetch a single conversation from any source (widget, API, WhatsApp, etc.)."
|
|
7987
|
+
},
|
|
7988
|
+
"required": false,
|
|
7989
|
+
"description": "Return only the conversation with this ID. Use this to fetch a single conversation from any source (widget, API, WhatsApp, etc.).",
|
|
7721
7990
|
"name": "conversationId",
|
|
7722
|
-
"in": "
|
|
7991
|
+
"in": "query"
|
|
7992
|
+
},
|
|
7993
|
+
{
|
|
7994
|
+
"schema": {
|
|
7995
|
+
"type": "string",
|
|
7996
|
+
"enum": [
|
|
7997
|
+
"summary",
|
|
7998
|
+
"messages"
|
|
7999
|
+
],
|
|
8000
|
+
"default": "messages",
|
|
8001
|
+
"description": "Whether to include message bodies. `summary` omits them and skips reading them from the database — use it to triage a page cheaply, then re-request a specific conversation with `conversationId`. Defaults to `messages`.",
|
|
8002
|
+
"example": "summary"
|
|
8003
|
+
},
|
|
8004
|
+
"required": false,
|
|
8005
|
+
"description": "Whether to include message bodies. `summary` omits them and skips reading them from the database — use it to triage a page cheaply, then re-request a specific conversation with `conversationId`. Defaults to `messages`.",
|
|
8006
|
+
"name": "include",
|
|
8007
|
+
"in": "query"
|
|
8008
|
+
},
|
|
8009
|
+
{
|
|
8010
|
+
"schema": {
|
|
8011
|
+
"type": "string",
|
|
8012
|
+
"description": "Comma-separated conversation sources to include, e.g. `API,WhatsApp`. Omit for all sources.",
|
|
8013
|
+
"example": "Widget or Iframe"
|
|
8014
|
+
},
|
|
8015
|
+
"required": false,
|
|
8016
|
+
"description": "Comma-separated conversation sources to include, e.g. `API,WhatsApp`. Omit for all sources.",
|
|
8017
|
+
"name": "source",
|
|
8018
|
+
"in": "query"
|
|
7723
8019
|
}
|
|
7724
8020
|
],
|
|
7725
8021
|
"responses": {
|
|
7726
8022
|
"200": {
|
|
7727
|
-
"description": "
|
|
8023
|
+
"description": "Paginated list of conversations with full message history",
|
|
7728
8024
|
"content": {
|
|
7729
8025
|
"application/json": {
|
|
7730
8026
|
"schema": {
|
|
7731
|
-
"$ref": "#/components/schemas/
|
|
8027
|
+
"$ref": "#/components/schemas/ExportConversationsResponse"
|
|
8028
|
+
}
|
|
8029
|
+
}
|
|
8030
|
+
}
|
|
8031
|
+
},
|
|
8032
|
+
"400": {
|
|
8033
|
+
"description": "Invalid request",
|
|
8034
|
+
"content": {
|
|
8035
|
+
"application/json": {
|
|
8036
|
+
"schema": {
|
|
8037
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
8038
|
+
},
|
|
8039
|
+
"examples": {
|
|
8040
|
+
"VALIDATION_INVALID_BODY": {
|
|
8041
|
+
"summary": "The request body failed schema validation. Inspect the `details` object in the error response for field-level errors.",
|
|
8042
|
+
"value": {
|
|
8043
|
+
"error": {
|
|
8044
|
+
"code": "VALIDATION_INVALID_BODY",
|
|
8045
|
+
"message": "Invalid request"
|
|
8046
|
+
}
|
|
8047
|
+
}
|
|
8048
|
+
},
|
|
8049
|
+
"VALIDATION_INVALID_DATE_RANGE": {
|
|
8050
|
+
"summary": "The requested `createdAt` window is inverted. An inverted window can never match a row, so it is rejected rather than silently returning an empty page.",
|
|
8051
|
+
"value": {
|
|
8052
|
+
"error": {
|
|
8053
|
+
"code": "VALIDATION_INVALID_DATE_RANGE",
|
|
8054
|
+
"message": "startDate must not be after endDate"
|
|
8055
|
+
}
|
|
8056
|
+
}
|
|
8057
|
+
}
|
|
8058
|
+
}
|
|
8059
|
+
}
|
|
8060
|
+
}
|
|
8061
|
+
},
|
|
8062
|
+
"401": {
|
|
8063
|
+
"description": "No Authorization header present. Provide a valid API key as a Bearer token in the Authorization header: `Authorization: Bearer <api-key>`.",
|
|
8064
|
+
"content": {
|
|
8065
|
+
"application/json": {
|
|
8066
|
+
"schema": {
|
|
8067
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
8068
|
+
},
|
|
8069
|
+
"example": {
|
|
8070
|
+
"error": {
|
|
8071
|
+
"code": "AUTH_MISSING_API_KEY",
|
|
8072
|
+
"message": "Authentication required"
|
|
8073
|
+
}
|
|
8074
|
+
}
|
|
8075
|
+
}
|
|
8076
|
+
}
|
|
8077
|
+
},
|
|
8078
|
+
"403": {
|
|
8079
|
+
"description": "Your current plan does not include API access. Upgrade to the Standard plan or higher to use the API.",
|
|
8080
|
+
"content": {
|
|
8081
|
+
"application/json": {
|
|
8082
|
+
"schema": {
|
|
8083
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
8084
|
+
},
|
|
8085
|
+
"example": {
|
|
8086
|
+
"error": {
|
|
8087
|
+
"code": "SUBSCRIPTION_API_RESTRICTED_PLAN",
|
|
8088
|
+
"message": "A Standard plan or higher is required to access the API"
|
|
8089
|
+
}
|
|
8090
|
+
}
|
|
8091
|
+
}
|
|
8092
|
+
}
|
|
8093
|
+
},
|
|
8094
|
+
"429": {
|
|
8095
|
+
"description": "Rate limit exceeded. Check the `X-RateLimit-Reset` response header for the Unix epoch seconds when the limit resets.",
|
|
8096
|
+
"content": {
|
|
8097
|
+
"application/json": {
|
|
8098
|
+
"schema": {
|
|
8099
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
8100
|
+
},
|
|
8101
|
+
"example": {
|
|
8102
|
+
"error": {
|
|
8103
|
+
"code": "RATE_LIMIT_TOO_MANY_REQUESTS",
|
|
8104
|
+
"message": "Too many requests, please try again later"
|
|
8105
|
+
}
|
|
8106
|
+
}
|
|
8107
|
+
}
|
|
8108
|
+
}
|
|
8109
|
+
},
|
|
8110
|
+
"500": {
|
|
8111
|
+
"description": "An unhandled server error occurred. If the issue persists, contact support with the `x-request-id` response header value for debugging.",
|
|
8112
|
+
"content": {
|
|
8113
|
+
"application/json": {
|
|
8114
|
+
"schema": {
|
|
8115
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
8116
|
+
},
|
|
8117
|
+
"example": {
|
|
8118
|
+
"error": {
|
|
8119
|
+
"code": "INTERNAL_SERVER_ERROR",
|
|
8120
|
+
"message": "Something went wrong, please try again"
|
|
8121
|
+
}
|
|
8122
|
+
}
|
|
8123
|
+
}
|
|
8124
|
+
}
|
|
8125
|
+
},
|
|
8126
|
+
"503": {
|
|
8127
|
+
"description": "Chatbase is undergoing scheduled maintenance and the API is temporarily rejecting requests. This is transient; retry after a short delay. Requests are rejected before any data is read or written, so no partial changes are applied.",
|
|
8128
|
+
"content": {
|
|
8129
|
+
"application/json": {
|
|
8130
|
+
"schema": {
|
|
8131
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
8132
|
+
},
|
|
8133
|
+
"example": {
|
|
8134
|
+
"error": {
|
|
8135
|
+
"code": "SERVICE_UNDER_MAINTENANCE",
|
|
8136
|
+
"message": "The API is temporarily unavailable for scheduled maintenance, please try again later"
|
|
8137
|
+
}
|
|
8138
|
+
}
|
|
8139
|
+
}
|
|
8140
|
+
}
|
|
8141
|
+
}
|
|
8142
|
+
}
|
|
8143
|
+
}
|
|
8144
|
+
},
|
|
8145
|
+
"/agents/{agentId}/conversations/{conversationId}": {
|
|
8146
|
+
"get": {
|
|
8147
|
+
"operationId": "getConversation",
|
|
8148
|
+
"tags": [
|
|
8149
|
+
"Conversations"
|
|
8150
|
+
],
|
|
8151
|
+
"summary": "Get a conversation",
|
|
8152
|
+
"description": "Get conversation metadata and its most recent messages. The pagination cursor can be used with the list messages endpoint to fetch older messages. Only returns conversations created through the API. To fetch a conversation from any source (widget, WhatsApp, etc.), use GET /agents/{agentId}/conversations/export?conversationId={conversationId} instead.",
|
|
8153
|
+
"security": [
|
|
8154
|
+
{
|
|
8155
|
+
"bearerAuth": []
|
|
8156
|
+
}
|
|
8157
|
+
],
|
|
8158
|
+
"parameters": [
|
|
8159
|
+
{
|
|
8160
|
+
"schema": {
|
|
8161
|
+
"type": "string",
|
|
8162
|
+
"minLength": 1,
|
|
8163
|
+
"description": "The agent ID",
|
|
8164
|
+
"example": "5QHA6VB-DIAbBhxwqxfdi"
|
|
8165
|
+
},
|
|
8166
|
+
"required": true,
|
|
8167
|
+
"description": "The agent ID",
|
|
8168
|
+
"name": "agentId",
|
|
8169
|
+
"in": "path"
|
|
8170
|
+
},
|
|
8171
|
+
{
|
|
8172
|
+
"schema": {
|
|
8173
|
+
"type": "string",
|
|
8174
|
+
"minLength": 1,
|
|
8175
|
+
"description": "The conversation ID",
|
|
8176
|
+
"example": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
|
|
8177
|
+
},
|
|
8178
|
+
"required": true,
|
|
8179
|
+
"description": "The conversation ID",
|
|
8180
|
+
"name": "conversationId",
|
|
8181
|
+
"in": "path"
|
|
8182
|
+
}
|
|
8183
|
+
],
|
|
8184
|
+
"responses": {
|
|
8185
|
+
"200": {
|
|
8186
|
+
"description": "Conversation metadata with recent messages",
|
|
8187
|
+
"content": {
|
|
8188
|
+
"application/json": {
|
|
8189
|
+
"schema": {
|
|
8190
|
+
"$ref": "#/components/schemas/GetConversationResponse"
|
|
7732
8191
|
}
|
|
7733
8192
|
}
|
|
7734
8193
|
}
|
|
@@ -7834,6 +8293,7 @@
|
|
|
7834
8293
|
},
|
|
7835
8294
|
"/agents/{agentId}/conversations/{conversationId}/messages": {
|
|
7836
8295
|
"get": {
|
|
8296
|
+
"operationId": "listConversationMessages",
|
|
7837
8297
|
"tags": [
|
|
7838
8298
|
"Conversations"
|
|
7839
8299
|
],
|
|
@@ -8023,6 +8483,7 @@
|
|
|
8023
8483
|
},
|
|
8024
8484
|
"/agents/{agentId}/users/{userId}/conversations": {
|
|
8025
8485
|
"get": {
|
|
8486
|
+
"operationId": "listUserConversations",
|
|
8026
8487
|
"tags": [
|
|
8027
8488
|
"Conversations"
|
|
8028
8489
|
],
|
|
@@ -8198,6 +8659,7 @@
|
|
|
8198
8659
|
},
|
|
8199
8660
|
"/agents/{agentId}/conversations/{conversationId}/messages/{messageId}/feedback": {
|
|
8200
8661
|
"patch": {
|
|
8662
|
+
"operationId": "updateMessageFeedback",
|
|
8201
8663
|
"tags": [
|
|
8202
8664
|
"Conversations"
|
|
8203
8665
|
],
|
|
@@ -8398,6 +8860,7 @@
|
|
|
8398
8860
|
},
|
|
8399
8861
|
"/agents/{agentId}/conversations/{conversationId}/tool-result": {
|
|
8400
8862
|
"post": {
|
|
8863
|
+
"operationId": "submitToolResult",
|
|
8401
8864
|
"tags": [
|
|
8402
8865
|
"Agents"
|
|
8403
8866
|
],
|
|
@@ -8571,6 +9034,17 @@
|
|
|
8571
9034
|
},
|
|
8572
9035
|
"/agents/{agentId}/sources/summary": {
|
|
8573
9036
|
"get": {
|
|
9037
|
+
"operationId": "getSourcesSummary",
|
|
9038
|
+
"x-mcp": {
|
|
9039
|
+
"tool": "chatbase_get_sources_summary",
|
|
9040
|
+
"scopes": [
|
|
9041
|
+
"sources:read"
|
|
9042
|
+
],
|
|
9043
|
+
"annotations": {
|
|
9044
|
+
"readOnly": true,
|
|
9045
|
+
"idempotent": true
|
|
9046
|
+
}
|
|
9047
|
+
},
|
|
8574
9048
|
"tags": [
|
|
8575
9049
|
"Sources"
|
|
8576
9050
|
],
|
|
@@ -8691,6 +9165,18 @@
|
|
|
8691
9165
|
},
|
|
8692
9166
|
"/agents/{agentId}/sources": {
|
|
8693
9167
|
"get": {
|
|
9168
|
+
"operationId": "listSources",
|
|
9169
|
+
"x-mcp": {
|
|
9170
|
+
"tool": "chatbase_list_sources",
|
|
9171
|
+
"scopes": [
|
|
9172
|
+
"sources:read"
|
|
9173
|
+
],
|
|
9174
|
+
"annotations": {
|
|
9175
|
+
"readOnly": true,
|
|
9176
|
+
"idempotent": true
|
|
9177
|
+
},
|
|
9178
|
+
"maxItems": 50
|
|
9179
|
+
},
|
|
8694
9180
|
"tags": [
|
|
8695
9181
|
"Sources"
|
|
8696
9182
|
],
|
|
@@ -8872,6 +9358,14 @@
|
|
|
8872
9358
|
}
|
|
8873
9359
|
},
|
|
8874
9360
|
"post": {
|
|
9361
|
+
"operationId": "createSource",
|
|
9362
|
+
"x-mcp": {
|
|
9363
|
+
"tool": "chatbase_create_source",
|
|
9364
|
+
"scopes": [
|
|
9365
|
+
"sources:write"
|
|
9366
|
+
],
|
|
9367
|
+
"annotations": {}
|
|
9368
|
+
},
|
|
8875
9369
|
"tags": [
|
|
8876
9370
|
"Sources"
|
|
8877
9371
|
],
|
|
@@ -9049,6 +9543,17 @@
|
|
|
9049
9543
|
},
|
|
9050
9544
|
"/agents/{agentId}/sources/{sourceId}": {
|
|
9051
9545
|
"get": {
|
|
9546
|
+
"operationId": "getSource",
|
|
9547
|
+
"x-mcp": {
|
|
9548
|
+
"tool": "chatbase_get_source",
|
|
9549
|
+
"scopes": [
|
|
9550
|
+
"sources:read"
|
|
9551
|
+
],
|
|
9552
|
+
"annotations": {
|
|
9553
|
+
"readOnly": true,
|
|
9554
|
+
"idempotent": true
|
|
9555
|
+
}
|
|
9556
|
+
},
|
|
9052
9557
|
"tags": [
|
|
9053
9558
|
"Sources"
|
|
9054
9559
|
],
|
|
@@ -9195,6 +9700,16 @@
|
|
|
9195
9700
|
}
|
|
9196
9701
|
},
|
|
9197
9702
|
"delete": {
|
|
9703
|
+
"operationId": "deleteSource",
|
|
9704
|
+
"x-mcp": {
|
|
9705
|
+
"tool": "chatbase_delete_source",
|
|
9706
|
+
"scopes": [
|
|
9707
|
+
"sources:delete"
|
|
9708
|
+
],
|
|
9709
|
+
"annotations": {
|
|
9710
|
+
"destructive": true
|
|
9711
|
+
}
|
|
9712
|
+
},
|
|
9198
9713
|
"tags": [
|
|
9199
9714
|
"Sources"
|
|
9200
9715
|
],
|
|
@@ -9357,11 +9872,21 @@
|
|
|
9357
9872
|
}
|
|
9358
9873
|
},
|
|
9359
9874
|
"put": {
|
|
9875
|
+
"operationId": "updateSource",
|
|
9876
|
+
"x-mcp": {
|
|
9877
|
+
"tool": "chatbase_update_source",
|
|
9878
|
+
"scopes": [
|
|
9879
|
+
"sources:write"
|
|
9880
|
+
],
|
|
9881
|
+
"annotations": {
|
|
9882
|
+
"idempotent": true
|
|
9883
|
+
}
|
|
9884
|
+
},
|
|
9360
9885
|
"tags": [
|
|
9361
9886
|
"Sources"
|
|
9362
9887
|
],
|
|
9363
9888
|
"summary": "Update source",
|
|
9364
|
-
"description": "Updates an existing source. Accepts text, qna, and link sources.File sources require a dedicated endpoint. Link URL is immutable — to change it, delete and recreate the source. Ticket and Notion sources are not accepted.\n\n**Q&A request body limit:** The total request body must not exceed 4.5 MB for Q&A sources.",
|
|
9889
|
+
"description": "Updates an existing source. Accepts text, qna, and link sources. File sources require a dedicated endpoint. Link URL is immutable — to change it, delete and recreate the source. Ticket and Notion sources are not accepted.\n\n**Q&A request body limit:** The total request body must not exceed 4.5 MB for Q&A sources.",
|
|
9365
9890
|
"security": [
|
|
9366
9891
|
{
|
|
9367
9892
|
"bearerAuth": []
|
|
@@ -9562,6 +10087,16 @@
|
|
|
9562
10087
|
},
|
|
9563
10088
|
"/agents/{agentId}/sources/{sourceId}/restore": {
|
|
9564
10089
|
"post": {
|
|
10090
|
+
"operationId": "restoreSource",
|
|
10091
|
+
"x-mcp": {
|
|
10092
|
+
"tool": "chatbase_restore_source",
|
|
10093
|
+
"scopes": [
|
|
10094
|
+
"sources:write"
|
|
10095
|
+
],
|
|
10096
|
+
"annotations": {
|
|
10097
|
+
"idempotent": true
|
|
10098
|
+
}
|
|
10099
|
+
},
|
|
9565
10100
|
"tags": [
|
|
9566
10101
|
"Sources"
|
|
9567
10102
|
],
|
|
@@ -9742,6 +10277,7 @@
|
|
|
9742
10277
|
},
|
|
9743
10278
|
"/agents/{agentId}/whatsapp/templates": {
|
|
9744
10279
|
"get": {
|
|
10280
|
+
"operationId": "listWhatsAppTemplates",
|
|
9745
10281
|
"tags": [
|
|
9746
10282
|
"WhatsApp"
|
|
9747
10283
|
],
|
|
@@ -9862,6 +10398,7 @@
|
|
|
9862
10398
|
},
|
|
9863
10399
|
"/agents/{agentId}/whatsapp/messages/template": {
|
|
9864
10400
|
"post": {
|
|
10401
|
+
"operationId": "sendWhatsAppTemplateMessage",
|
|
9865
10402
|
"tags": [
|
|
9866
10403
|
"WhatsApp"
|
|
9867
10404
|
],
|
|
@@ -10161,6 +10698,17 @@
|
|
|
10161
10698
|
},
|
|
10162
10699
|
"/agents/{agentId}/helpdesk/ticket-statuses": {
|
|
10163
10700
|
"get": {
|
|
10701
|
+
"operationId": "listTicketStatuses",
|
|
10702
|
+
"x-mcp": {
|
|
10703
|
+
"tool": "chatbase_list_ticket_statuses",
|
|
10704
|
+
"scopes": [
|
|
10705
|
+
"helpdesk_tickets:read"
|
|
10706
|
+
],
|
|
10707
|
+
"annotations": {
|
|
10708
|
+
"readOnly": true,
|
|
10709
|
+
"idempotent": true
|
|
10710
|
+
}
|
|
10711
|
+
},
|
|
10164
10712
|
"tags": [
|
|
10165
10713
|
"Helpdesk"
|
|
10166
10714
|
],
|
|
@@ -10297,6 +10845,17 @@
|
|
|
10297
10845
|
},
|
|
10298
10846
|
"/agents/{agentId}/helpdesk/teams": {
|
|
10299
10847
|
"get": {
|
|
10848
|
+
"operationId": "listHelpdeskTeams",
|
|
10849
|
+
"x-mcp": {
|
|
10850
|
+
"tool": "chatbase_list_helpdesk_teams",
|
|
10851
|
+
"scopes": [
|
|
10852
|
+
"helpdesk_tickets:read"
|
|
10853
|
+
],
|
|
10854
|
+
"annotations": {
|
|
10855
|
+
"readOnly": true,
|
|
10856
|
+
"idempotent": true
|
|
10857
|
+
}
|
|
10858
|
+
},
|
|
10300
10859
|
"tags": [
|
|
10301
10860
|
"Helpdesk"
|
|
10302
10861
|
],
|
|
@@ -10433,6 +10992,14 @@
|
|
|
10433
10992
|
},
|
|
10434
10993
|
"/agents/{agentId}/helpdesk/tickets": {
|
|
10435
10994
|
"post": {
|
|
10995
|
+
"operationId": "createTicket",
|
|
10996
|
+
"x-mcp": {
|
|
10997
|
+
"tool": "chatbase_create_ticket",
|
|
10998
|
+
"scopes": [
|
|
10999
|
+
"helpdesk_tickets:write"
|
|
11000
|
+
],
|
|
11001
|
+
"annotations": {}
|
|
11002
|
+
},
|
|
10436
11003
|
"tags": [
|
|
10437
11004
|
"Helpdesk"
|
|
10438
11005
|
],
|
|
@@ -10592,6 +11159,18 @@
|
|
|
10592
11159
|
}
|
|
10593
11160
|
},
|
|
10594
11161
|
"get": {
|
|
11162
|
+
"operationId": "listTickets",
|
|
11163
|
+
"x-mcp": {
|
|
11164
|
+
"tool": "chatbase_list_tickets",
|
|
11165
|
+
"scopes": [
|
|
11166
|
+
"helpdesk_tickets:read"
|
|
11167
|
+
],
|
|
11168
|
+
"annotations": {
|
|
11169
|
+
"readOnly": true,
|
|
11170
|
+
"idempotent": true
|
|
11171
|
+
},
|
|
11172
|
+
"maxItems": 25
|
|
11173
|
+
},
|
|
10595
11174
|
"tags": [
|
|
10596
11175
|
"Helpdesk"
|
|
10597
11176
|
],
|
|
@@ -10906,6 +11485,18 @@
|
|
|
10906
11485
|
},
|
|
10907
11486
|
"/agents/{agentId}/helpdesk/tickets/search": {
|
|
10908
11487
|
"post": {
|
|
11488
|
+
"operationId": "searchTickets",
|
|
11489
|
+
"x-mcp": {
|
|
11490
|
+
"tool": "chatbase_search_tickets",
|
|
11491
|
+
"scopes": [
|
|
11492
|
+
"helpdesk_tickets:write"
|
|
11493
|
+
],
|
|
11494
|
+
"annotations": {
|
|
11495
|
+
"readOnly": true,
|
|
11496
|
+
"idempotent": true
|
|
11497
|
+
},
|
|
11498
|
+
"maxItems": 25
|
|
11499
|
+
},
|
|
10909
11500
|
"tags": [
|
|
10910
11501
|
"Helpdesk"
|
|
10911
11502
|
],
|
|
@@ -11068,6 +11659,17 @@
|
|
|
11068
11659
|
},
|
|
11069
11660
|
"/agents/{agentId}/helpdesk/tickets/{ticketNumber}": {
|
|
11070
11661
|
"get": {
|
|
11662
|
+
"operationId": "getTicket",
|
|
11663
|
+
"x-mcp": {
|
|
11664
|
+
"tool": "chatbase_get_ticket",
|
|
11665
|
+
"scopes": [
|
|
11666
|
+
"helpdesk_tickets:read"
|
|
11667
|
+
],
|
|
11668
|
+
"annotations": {
|
|
11669
|
+
"readOnly": true,
|
|
11670
|
+
"idempotent": true
|
|
11671
|
+
}
|
|
11672
|
+
},
|
|
11071
11673
|
"tags": [
|
|
11072
11674
|
"Helpdesk"
|
|
11073
11675
|
],
|
|
@@ -11229,6 +11831,16 @@
|
|
|
11229
11831
|
}
|
|
11230
11832
|
},
|
|
11231
11833
|
"patch": {
|
|
11834
|
+
"operationId": "updateTicket",
|
|
11835
|
+
"x-mcp": {
|
|
11836
|
+
"tool": "chatbase_update_ticket",
|
|
11837
|
+
"scopes": [
|
|
11838
|
+
"helpdesk_tickets:write"
|
|
11839
|
+
],
|
|
11840
|
+
"annotations": {
|
|
11841
|
+
"idempotent": true
|
|
11842
|
+
}
|
|
11843
|
+
},
|
|
11232
11844
|
"tags": [
|
|
11233
11845
|
"Helpdesk"
|
|
11234
11846
|
],
|
|
@@ -11440,6 +12052,27 @@
|
|
|
11440
12052
|
},
|
|
11441
12053
|
"/agents/{agentId}/helpdesk/tickets/{ticketNumber}/messages": {
|
|
11442
12054
|
"get": {
|
|
12055
|
+
"operationId": "listTicketMessages",
|
|
12056
|
+
"x-mcp": {
|
|
12057
|
+
"tool": "chatbase_list_ticket_messages",
|
|
12058
|
+
"scopes": [
|
|
12059
|
+
"helpdesk_tickets:read"
|
|
12060
|
+
],
|
|
12061
|
+
"annotations": {
|
|
12062
|
+
"readOnly": true,
|
|
12063
|
+
"idempotent": true
|
|
12064
|
+
},
|
|
12065
|
+
"fields": [
|
|
12066
|
+
"id",
|
|
12067
|
+
"type",
|
|
12068
|
+
"sender",
|
|
12069
|
+
"contentText",
|
|
12070
|
+
"attachments",
|
|
12071
|
+
"createdAt",
|
|
12072
|
+
"metadata"
|
|
12073
|
+
],
|
|
12074
|
+
"maxItems": 50
|
|
12075
|
+
},
|
|
11443
12076
|
"tags": [
|
|
11444
12077
|
"Helpdesk"
|
|
11445
12078
|
],
|
|
@@ -11670,6 +12303,14 @@
|
|
|
11670
12303
|
}
|
|
11671
12304
|
},
|
|
11672
12305
|
"post": {
|
|
12306
|
+
"operationId": "createTicketMessage",
|
|
12307
|
+
"x-mcp": {
|
|
12308
|
+
"tool": "chatbase_create_ticket_message",
|
|
12309
|
+
"scopes": [
|
|
12310
|
+
"helpdesk_tickets:write"
|
|
12311
|
+
],
|
|
12312
|
+
"annotations": {}
|
|
12313
|
+
},
|
|
11673
12314
|
"tags": [
|
|
11674
12315
|
"Helpdesk"
|
|
11675
12316
|
],
|
|
@@ -11874,7 +12515,418 @@
|
|
|
11874
12515
|
}
|
|
11875
12516
|
}
|
|
11876
12517
|
}
|
|
12518
|
+
},
|
|
12519
|
+
"/api/v2/agents/{agentId}/sources": {
|
|
12520
|
+
"post": {
|
|
12521
|
+
"operationId": "createFileSource",
|
|
12522
|
+
"tags": [
|
|
12523
|
+
"Sources"
|
|
12524
|
+
],
|
|
12525
|
+
"summary": "Create file source",
|
|
12526
|
+
"description": "Upload a file as a knowledge source for an agent. Accepts PDF, DOC, DOCX, and TXT files up to 20 MB.\n\n**Base URL:** `https://files.chatbase.co/api/v2` — this endpoint uses a different host from all other Sources endpoints.",
|
|
12527
|
+
"security": [
|
|
12528
|
+
{
|
|
12529
|
+
"bearerAuth": []
|
|
12530
|
+
}
|
|
12531
|
+
],
|
|
12532
|
+
"parameters": [
|
|
12533
|
+
{
|
|
12534
|
+
"schema": {
|
|
12535
|
+
"type": "string",
|
|
12536
|
+
"minLength": 1,
|
|
12537
|
+
"example": "5QHA6VB-DIAbBhxwqxfdi"
|
|
12538
|
+
},
|
|
12539
|
+
"required": true,
|
|
12540
|
+
"name": "agentId",
|
|
12541
|
+
"in": "path",
|
|
12542
|
+
"description": "The agent ID"
|
|
12543
|
+
}
|
|
12544
|
+
],
|
|
12545
|
+
"requestBody": {
|
|
12546
|
+
"required": true,
|
|
12547
|
+
"content": {
|
|
12548
|
+
"multipart/form-data": {
|
|
12549
|
+
"schema": {
|
|
12550
|
+
"type": "object",
|
|
12551
|
+
"properties": {
|
|
12552
|
+
"name": {
|
|
12553
|
+
"type": "string",
|
|
12554
|
+
"minLength": 1,
|
|
12555
|
+
"description": "Display name for the source.",
|
|
12556
|
+
"example": "Employee Handbook"
|
|
12557
|
+
},
|
|
12558
|
+
"file": {
|
|
12559
|
+
"type": "string",
|
|
12560
|
+
"format": "binary",
|
|
12561
|
+
"description": "File to upload. Formats: .pdf, .doc, .docx, .txt. Max 20 MB."
|
|
12562
|
+
}
|
|
12563
|
+
},
|
|
12564
|
+
"required": [
|
|
12565
|
+
"name",
|
|
12566
|
+
"file"
|
|
12567
|
+
]
|
|
12568
|
+
}
|
|
12569
|
+
}
|
|
12570
|
+
}
|
|
12571
|
+
},
|
|
12572
|
+
"responses": {
|
|
12573
|
+
"201": {
|
|
12574
|
+
"description": "File source created. Status is `untrained` until the agent is retrained.",
|
|
12575
|
+
"content": {
|
|
12576
|
+
"application/json": {
|
|
12577
|
+
"schema": {
|
|
12578
|
+
"$ref": "#/components/schemas/SourceListItem"
|
|
12579
|
+
},
|
|
12580
|
+
"example": {
|
|
12581
|
+
"id": "a63a69a5-e7a9-4757-b73b-2041854d435d",
|
|
12582
|
+
"type": "file",
|
|
12583
|
+
"name": "Employee Handbook",
|
|
12584
|
+
"size": 245760,
|
|
12585
|
+
"createdAt": "2025-01-15T10:30:00.000Z",
|
|
12586
|
+
"status": "untrained",
|
|
12587
|
+
"metadata": null
|
|
12588
|
+
}
|
|
12589
|
+
}
|
|
12590
|
+
}
|
|
12591
|
+
},
|
|
12592
|
+
"400": {
|
|
12593
|
+
"description": "Missing required field, unsupported file type, or a file outside the allowed size range.",
|
|
12594
|
+
"content": {
|
|
12595
|
+
"application/json": {
|
|
12596
|
+
"schema": {
|
|
12597
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12598
|
+
},
|
|
12599
|
+
"example": {
|
|
12600
|
+
"error": {
|
|
12601
|
+
"code": "VALIDATION_INVALID_BODY",
|
|
12602
|
+
"message": "Missing required field, unsupported file type, or a file outside the allowed size range."
|
|
12603
|
+
}
|
|
12604
|
+
}
|
|
12605
|
+
}
|
|
12606
|
+
}
|
|
12607
|
+
},
|
|
12608
|
+
"401": {
|
|
12609
|
+
"description": "No Authorization header present.",
|
|
12610
|
+
"content": {
|
|
12611
|
+
"application/json": {
|
|
12612
|
+
"schema": {
|
|
12613
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12614
|
+
},
|
|
12615
|
+
"example": {
|
|
12616
|
+
"error": {
|
|
12617
|
+
"code": "AUTH_MISSING_API_KEY",
|
|
12618
|
+
"message": "No Authorization header present."
|
|
12619
|
+
}
|
|
12620
|
+
}
|
|
12621
|
+
}
|
|
12622
|
+
}
|
|
12623
|
+
},
|
|
12624
|
+
"403": {
|
|
12625
|
+
"description": "Standard plan or higher required.",
|
|
12626
|
+
"content": {
|
|
12627
|
+
"application/json": {
|
|
12628
|
+
"schema": {
|
|
12629
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12630
|
+
},
|
|
12631
|
+
"example": {
|
|
12632
|
+
"error": {
|
|
12633
|
+
"code": "SUBSCRIPTION_API_RESTRICTED_PLAN",
|
|
12634
|
+
"message": "Standard plan or higher required."
|
|
12635
|
+
}
|
|
12636
|
+
}
|
|
12637
|
+
}
|
|
12638
|
+
}
|
|
12639
|
+
},
|
|
12640
|
+
"404": {
|
|
12641
|
+
"description": "Agent not found.",
|
|
12642
|
+
"content": {
|
|
12643
|
+
"application/json": {
|
|
12644
|
+
"schema": {
|
|
12645
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12646
|
+
},
|
|
12647
|
+
"example": {
|
|
12648
|
+
"error": {
|
|
12649
|
+
"code": "AGENT_NOT_FOUND",
|
|
12650
|
+
"message": "Agent not found."
|
|
12651
|
+
}
|
|
12652
|
+
}
|
|
12653
|
+
}
|
|
12654
|
+
}
|
|
12655
|
+
},
|
|
12656
|
+
"422": {
|
|
12657
|
+
"description": "Adding this file would exceed the plan storage limit for this agent.",
|
|
12658
|
+
"content": {
|
|
12659
|
+
"application/json": {
|
|
12660
|
+
"schema": {
|
|
12661
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12662
|
+
},
|
|
12663
|
+
"example": {
|
|
12664
|
+
"error": {
|
|
12665
|
+
"code": "SOURCE_SIZE_LIMIT_EXCEEDED",
|
|
12666
|
+
"message": "Adding this file would exceed the plan storage limit for this agent."
|
|
12667
|
+
}
|
|
12668
|
+
}
|
|
12669
|
+
}
|
|
12670
|
+
}
|
|
12671
|
+
},
|
|
12672
|
+
"429": {
|
|
12673
|
+
"description": "Rate limit exceeded.",
|
|
12674
|
+
"content": {
|
|
12675
|
+
"application/json": {
|
|
12676
|
+
"schema": {
|
|
12677
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12678
|
+
},
|
|
12679
|
+
"example": {
|
|
12680
|
+
"error": {
|
|
12681
|
+
"code": "RATE_LIMIT_TOO_MANY_REQUESTS",
|
|
12682
|
+
"message": "Rate limit exceeded."
|
|
12683
|
+
}
|
|
12684
|
+
}
|
|
12685
|
+
}
|
|
12686
|
+
}
|
|
12687
|
+
},
|
|
12688
|
+
"500": {
|
|
12689
|
+
"description": "Unhandled server error.",
|
|
12690
|
+
"content": {
|
|
12691
|
+
"application/json": {
|
|
12692
|
+
"schema": {
|
|
12693
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12694
|
+
},
|
|
12695
|
+
"example": {
|
|
12696
|
+
"error": {
|
|
12697
|
+
"code": "INTERNAL_SERVER_ERROR",
|
|
12698
|
+
"message": "Unhandled server error."
|
|
12699
|
+
}
|
|
12700
|
+
}
|
|
12701
|
+
}
|
|
12702
|
+
}
|
|
12703
|
+
}
|
|
12704
|
+
},
|
|
12705
|
+
"servers": [
|
|
12706
|
+
{
|
|
12707
|
+
"url": "https://files.chatbase.co",
|
|
12708
|
+
"description": "Chatbase file upload server"
|
|
12709
|
+
}
|
|
12710
|
+
]
|
|
12711
|
+
}
|
|
12712
|
+
},
|
|
12713
|
+
"/api/v2/agents/{agentId}/sources/{sourceId}": {
|
|
12714
|
+
"put": {
|
|
12715
|
+
"operationId": "updateFileSource",
|
|
12716
|
+
"tags": [
|
|
12717
|
+
"Sources"
|
|
12718
|
+
],
|
|
12719
|
+
"summary": "Update file source",
|
|
12720
|
+
"description": "Replace a file source's content, rename it, or both. At least one of `name` or `file` must be provided.\n\n**Base URL:** `https://files.chatbase.co/api/v2` — this endpoint uses a different host from all other Sources endpoints.",
|
|
12721
|
+
"security": [
|
|
12722
|
+
{
|
|
12723
|
+
"bearerAuth": []
|
|
12724
|
+
}
|
|
12725
|
+
],
|
|
12726
|
+
"parameters": [
|
|
12727
|
+
{
|
|
12728
|
+
"schema": {
|
|
12729
|
+
"type": "string",
|
|
12730
|
+
"minLength": 1,
|
|
12731
|
+
"example": "5QHA6VB-DIAbBhxwqxfdi"
|
|
12732
|
+
},
|
|
12733
|
+
"required": true,
|
|
12734
|
+
"name": "agentId",
|
|
12735
|
+
"in": "path",
|
|
12736
|
+
"description": "The agent ID"
|
|
12737
|
+
},
|
|
12738
|
+
{
|
|
12739
|
+
"schema": {
|
|
12740
|
+
"type": "string",
|
|
12741
|
+
"minLength": 1,
|
|
12742
|
+
"example": "a63a69a5-e7a9-4757-b73b-2041854d435d"
|
|
12743
|
+
},
|
|
12744
|
+
"required": true,
|
|
12745
|
+
"name": "sourceId",
|
|
12746
|
+
"in": "path",
|
|
12747
|
+
"description": "The source ID"
|
|
12748
|
+
}
|
|
12749
|
+
],
|
|
12750
|
+
"requestBody": {
|
|
12751
|
+
"required": true,
|
|
12752
|
+
"content": {
|
|
12753
|
+
"multipart/form-data": {
|
|
12754
|
+
"schema": {
|
|
12755
|
+
"type": "object",
|
|
12756
|
+
"properties": {
|
|
12757
|
+
"name": {
|
|
12758
|
+
"type": "string",
|
|
12759
|
+
"minLength": 1,
|
|
12760
|
+
"description": "New display name. If omitted, the existing name is preserved.",
|
|
12761
|
+
"example": "Employee Handbook v2"
|
|
12762
|
+
},
|
|
12763
|
+
"file": {
|
|
12764
|
+
"type": "string",
|
|
12765
|
+
"format": "binary",
|
|
12766
|
+
"description": "Replacement file. Same constraints as create. If omitted, existing content is preserved."
|
|
12767
|
+
}
|
|
12768
|
+
}
|
|
12769
|
+
}
|
|
12770
|
+
}
|
|
12771
|
+
}
|
|
12772
|
+
},
|
|
12773
|
+
"responses": {
|
|
12774
|
+
"200": {
|
|
12775
|
+
"description": "Updated file source. If the file was replaced and previously `trained`, status becomes `updated`.",
|
|
12776
|
+
"content": {
|
|
12777
|
+
"application/json": {
|
|
12778
|
+
"schema": {
|
|
12779
|
+
"$ref": "#/components/schemas/SourceListItem"
|
|
12780
|
+
},
|
|
12781
|
+
"example": {
|
|
12782
|
+
"id": "a63a69a5-e7a9-4757-b73b-2041854d435d",
|
|
12783
|
+
"type": "file",
|
|
12784
|
+
"name": "Employee Handbook v2",
|
|
12785
|
+
"size": 261120,
|
|
12786
|
+
"createdAt": "2025-01-15T10:30:00.000Z",
|
|
12787
|
+
"status": "updated",
|
|
12788
|
+
"metadata": null
|
|
12789
|
+
}
|
|
12790
|
+
}
|
|
12791
|
+
}
|
|
12792
|
+
},
|
|
12793
|
+
"400": {
|
|
12794
|
+
"description": "No fields provided, unsupported file type, or a file outside the allowed size range.",
|
|
12795
|
+
"content": {
|
|
12796
|
+
"application/json": {
|
|
12797
|
+
"schema": {
|
|
12798
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12799
|
+
},
|
|
12800
|
+
"example": {
|
|
12801
|
+
"error": {
|
|
12802
|
+
"code": "VALIDATION_INVALID_BODY",
|
|
12803
|
+
"message": "No fields provided, unsupported file type, or a file outside the allowed size range."
|
|
12804
|
+
}
|
|
12805
|
+
}
|
|
12806
|
+
}
|
|
12807
|
+
}
|
|
12808
|
+
},
|
|
12809
|
+
"401": {
|
|
12810
|
+
"description": "No Authorization header present.",
|
|
12811
|
+
"content": {
|
|
12812
|
+
"application/json": {
|
|
12813
|
+
"schema": {
|
|
12814
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12815
|
+
},
|
|
12816
|
+
"example": {
|
|
12817
|
+
"error": {
|
|
12818
|
+
"code": "AUTH_MISSING_API_KEY",
|
|
12819
|
+
"message": "No Authorization header present."
|
|
12820
|
+
}
|
|
12821
|
+
}
|
|
12822
|
+
}
|
|
12823
|
+
}
|
|
12824
|
+
},
|
|
12825
|
+
"403": {
|
|
12826
|
+
"description": "Standard plan or higher required.",
|
|
12827
|
+
"content": {
|
|
12828
|
+
"application/json": {
|
|
12829
|
+
"schema": {
|
|
12830
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12831
|
+
},
|
|
12832
|
+
"example": {
|
|
12833
|
+
"error": {
|
|
12834
|
+
"code": "SUBSCRIPTION_API_RESTRICTED_PLAN",
|
|
12835
|
+
"message": "Standard plan or higher required."
|
|
12836
|
+
}
|
|
12837
|
+
}
|
|
12838
|
+
}
|
|
12839
|
+
}
|
|
12840
|
+
},
|
|
12841
|
+
"404": {
|
|
12842
|
+
"description": "Agent or source not found.",
|
|
12843
|
+
"content": {
|
|
12844
|
+
"application/json": {
|
|
12845
|
+
"schema": {
|
|
12846
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12847
|
+
},
|
|
12848
|
+
"example": {
|
|
12849
|
+
"error": {
|
|
12850
|
+
"code": "SOURCE_NOT_FOUND",
|
|
12851
|
+
"message": "Agent or source not found."
|
|
12852
|
+
}
|
|
12853
|
+
}
|
|
12854
|
+
}
|
|
12855
|
+
}
|
|
12856
|
+
},
|
|
12857
|
+
"409": {
|
|
12858
|
+
"description": "Source is pending deletion. Restore it before editing.",
|
|
12859
|
+
"content": {
|
|
12860
|
+
"application/json": {
|
|
12861
|
+
"schema": {
|
|
12862
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12863
|
+
},
|
|
12864
|
+
"example": {
|
|
12865
|
+
"error": {
|
|
12866
|
+
"code": "SOURCE_PENDING_DELETION",
|
|
12867
|
+
"message": "Source is pending deletion. Restore it before editing."
|
|
12868
|
+
}
|
|
12869
|
+
}
|
|
12870
|
+
}
|
|
12871
|
+
}
|
|
12872
|
+
},
|
|
12873
|
+
"422": {
|
|
12874
|
+
"description": "Adding this file would exceed the plan storage limit for this agent.",
|
|
12875
|
+
"content": {
|
|
12876
|
+
"application/json": {
|
|
12877
|
+
"schema": {
|
|
12878
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12879
|
+
},
|
|
12880
|
+
"example": {
|
|
12881
|
+
"error": {
|
|
12882
|
+
"code": "SOURCE_SIZE_LIMIT_EXCEEDED",
|
|
12883
|
+
"message": "Adding this file would exceed the plan storage limit for this agent."
|
|
12884
|
+
}
|
|
12885
|
+
}
|
|
12886
|
+
}
|
|
12887
|
+
}
|
|
12888
|
+
},
|
|
12889
|
+
"429": {
|
|
12890
|
+
"description": "Rate limit exceeded.",
|
|
12891
|
+
"content": {
|
|
12892
|
+
"application/json": {
|
|
12893
|
+
"schema": {
|
|
12894
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12895
|
+
},
|
|
12896
|
+
"example": {
|
|
12897
|
+
"error": {
|
|
12898
|
+
"code": "RATE_LIMIT_TOO_MANY_REQUESTS",
|
|
12899
|
+
"message": "Rate limit exceeded."
|
|
12900
|
+
}
|
|
12901
|
+
}
|
|
12902
|
+
}
|
|
12903
|
+
}
|
|
12904
|
+
},
|
|
12905
|
+
"500": {
|
|
12906
|
+
"description": "Unhandled server error.",
|
|
12907
|
+
"content": {
|
|
12908
|
+
"application/json": {
|
|
12909
|
+
"schema": {
|
|
12910
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12911
|
+
},
|
|
12912
|
+
"example": {
|
|
12913
|
+
"error": {
|
|
12914
|
+
"code": "INTERNAL_SERVER_ERROR",
|
|
12915
|
+
"message": "Unhandled server error."
|
|
12916
|
+
}
|
|
12917
|
+
}
|
|
12918
|
+
}
|
|
12919
|
+
}
|
|
12920
|
+
}
|
|
12921
|
+
},
|
|
12922
|
+
"servers": [
|
|
12923
|
+
{
|
|
12924
|
+
"url": "https://files.chatbase.co",
|
|
12925
|
+
"description": "Chatbase file upload server"
|
|
12926
|
+
}
|
|
12927
|
+
]
|
|
12928
|
+
}
|
|
11877
12929
|
}
|
|
11878
12930
|
},
|
|
11879
12931
|
"webhooks": {}
|
|
11880
|
-
}
|
|
12932
|
+
}
|