tencent cloud

腾讯云智能体开发平台

动态与公告
产品动态
产品公告
产品简介
产品概述
产品优势
应用场景
模型介绍
购买指南
套餐订阅
旧版计费
快速入门
智能体应用及其三种模式
基于“标准模式”创建“内容总结助手”
基于“单工作流模式”创建“网页内容抓取助手”
基于“Multi-Agent 模式”创建“脱口秀素材创作助手”
操作指南
应用开发
工作流
Multi-Agent
知识库
Widget
插件广场
模型列表
提示词模板
应用模板
平台管理
企业、工作空间与权限
API 文档
History
API Category
Making API Requests
Atomic Capability APIs
Operation Optimization APIs
Document Library APIs
Q&A Database APIs
Knowledge Tag APIs
Application Management APIs
Enterprise Management APIs
Billing APIs
Release Management APIs
Dialogue Endpoint APIs
Data Statistics APIs
Data Types
Error Codes
应用接口文档
对话接口总体概述
对话端接口文档(WebSocket)
对话端接口文档(HTTP SSE)
图片对话或文件对话(实时文档解析+对话)
离线文档上传
腾讯云智能体开发平台操作 cos 指南
ADP 文档解析协议
常见问题
产品常见问题
技术常见问题
相关协议
腾讯云智能体开发平台服务等级协议
腾讯云智能体开发平台服务特别条款
腾讯云智能体开发平台隐私政策
腾讯云智能体开发平台数据处理和安全协议
开源许可声明
联系我们
词汇表

SaveDoc

聚焦模式
字号
最后更新时间: 2026-03-26 22:26:45

1. API Description

Domain name for API request: lke.intl.tencentcloudapi.com.

This API is used to save a knowledge base document Q&As.
Three steps to store a file in the knowledge library of the application:

  1. Obtain a temporary key. For more information, see API Documentation. Different parameter combinations of the temporary key have different permissions. For more information, see Tencent Cloud Agent Development Platform/ADP COS Guide.
  2. Call the COS storage API provided by Tencent Cloud to store the file in the COS of ADP. For details, see COS SDK Overview. Note that the temporary key method is used to operate COS.
  3. Call this API to store the basic information of the file in ADP.
    For the above steps, see Documentation. At the end of the documentation, there is a code demo, which can be used as a reference.

A maximum of 100 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: SaveDoc.
Version Yes String Common Params. The value used for this API: 2023-11-30.
Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-jakarta.
BotBizId Yes String Application ID.
FileName Yes String File name.
FileType Yes String File type (md
CosUrl Yes String The cos path of the platform, consistent with the UploadPath parameter queried by the DescribeStorageCredential api.
ETag Yes String ETag, short for entity tag, is an information tag that identifies the content of an object when it is created and can be used to check whether the content of the object has changed.
CosHash Yes String Verify the consistency of the uploaded file on the cloud and the local file by validating the crc64 encoding in the cos_hash x-cos-hash-crc64ecma header.
After the COS is successfully uploaded, obtain it from the response header.
Size Yes String File size.
AttrRange No Integer Applicable scope of labels: 1: all; 2: by conditional range.
Source No Integer Source (0: source file import; 1: web page import).
WebUrl No String Web page (or custom link) address.
AttrLabels.N No Array of AttrLabelRefer Label reference.
ReferUrlType No Integer External reference link type: 0: system link; 1: custom link.
When the value is 1, the weburl field cannot be empty; otherwise, it will not take effect.
ExpireStart No String Effective start time, unix timestamp.
ExpireEnd No String Effective end time, unix timestamp. 0 indicates permanent validity.
IsRefer No Boolean Whether to reference a link.
Opt No Integer Document operation type: 1: batch import (import Q&A pairs in batches); 2: document import (normally import a single document). The default value is 1.
Please note that when opt = 1, please download the Excel template from the Tencent Cloud Agent Development Platform/ADP page.
CateBizId No String Category ID.
IsDownload No Boolean Whether it can be downloaded. This value is meaningful only when IsRefer is true and ReferUrlType is 0.
DuplicateFileHandles.N No Array of DuplicateFileHandle Duplicate document handling method, processed by sequentially matching the first condition that is met
SplitRule No String Custom Segmentation Rules

The request parameter is a JSON Object. For specific format, refer to the interface sample value. It contains the following main fields:



### Field Description:

Field Name Type Description


### Field Description:

Field Name Type Description


### Field Description:

Field Name Type Description
UpdatePeriodInfo No UpdatePeriodInfo Document update frequency, default value is 0 (no updates)

3. Output Parameters

Parameter Name Type Description
DocBizId String Document ID.
ErrorMsg String Import error message.
ErrorLink String Error link.
ErrorLinkText String Error link text.
DuplicateFileCheckType Integer
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1

Input Example

POST / HTTP/1.1
Host: lke.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: SaveDoc
<Common request parameters>

{
    "BotBizId": "1727231073371148288",
    "FileName": "test.docx",
    "FileType": "docx",
    "CosUrl": "/corp/23432432/233432/doc/zeSOHIBjwcWoEmlMMXOp-1796022574489010176.docx",
    "ETag": "\"58e88ad7665f11c4f66eba0eada383a5\"",
    "CosHash": "xxxxxxxxx",
    "Size": "643000",
    "Source": 0,
    "WebUrl": "",
    "AttrRange": 1,
    "AttrLabels": [],
    "ReferUrlType": 0
}

Output Example

{
    "Response": {
        "DocBizId": "1694921462777761792",
        "ErrorMsg": "",
        "ErrorLink": "",
        "ErrorLinkText": "",
        "RequestId": "e3338103-3165-49c0-b218-245be865cca5"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation Operation failed.
</string></number>

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈