tencent cloud

Tencent Cloud Agent Development Platform

Release Notes and Announcements
Release Notes
Product Announcement
Product Introduction
Product Overview
Advantages
Use Cases
Model Introduction
Purchase Guide
Package Subscription
Previous Version
Getting Started
Agent Application and Its Three Modes
Creating a "Content Summary Assistant" in Standard Mode
Creating a “Webpage Scraping Assistant” in Single Workflow Mode
Creating a “Stand-up Comedy Content Creation Assistant” in Multi-Agent Mode
Operation Guide
Application Development
Workflow
Multi-Agent
Knowledge Base
Widget
Plugin Marketplace
Model List 
Prompt Templates
Application Templates
Platform Management
Business, Workspace and Permissions
API Documentation
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
Application API Documentation
Dialogue API Overview
Dialog API Documentation (WebSocket)
Dialog API Documentation (HTTP SSE)
Image Chat or File Chat (Real-time Document Parsing + Chat)
Offline Document Upload
Tencent Cloud Agent Development Platform Operation COS Guide
ADP Document Parsing Protocol
FAQs
Product FAQs
Technical FAQs
Related Agreements
Tencent Cloud Agent Development Platform Service Level Agreement
Tencent Cloud Agent Development Platform Service Specific Terms
Tencent Cloud Agent Development Platform Privacy Policy
Tencent Cloud Agent Development Platform Data Processing and Security Agreement
Open-Source License Statement
Lighthouse OpenClaw Connector Plugin Service Agreement
Contact Us
Glossary

SaveDoc

PDF
フォーカスモード
フォントサイズ
最終更新日: 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>

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック