> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeus.agentspro.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 上传文档

> 上传文档到知识库

上传文档后状态为 `pending`，需要手动调用 [处理文档](/zh/knowledge-base/api/process-document) 触发处理。

<ParamField header="Authorization" type="string" required>
  Bearer JWT Token
</ParamField>

<ParamField header="Content-Type" type="string" required>
  `multipart/form-data`
</ParamField>

<ParamField path="id" type="string" required>
  知识库 ID
</ParamField>

<ParamField body="file" type="file" required>
  要上传的文档文件。支持格式：PDF、Word（`.doc`/`.docx`）、Excel（`.xls`/`.xlsx`）、PowerPoint（`.ppt`/`.pptx`）、Markdown、CSV、纯文本
</ParamField>

<ResponseField name="document_id" type="string">
  文档唯一标识
</ResponseField>

<ResponseField name="status" type="string">
  文档状态，上传后为 `pending`
</ResponseField>

<ResponseField name="file_name" type="string">
  文件名
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://zeus-api.agentspro.cn/api/knowledge-base/kb_abc123/documents \
    --header 'Authorization: Bearer <token>' \
    --form 'file=@/path/to/document.pdf'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "document_id": "doc_xyz789",
    "status": "pending",
    "file_name": "document.pdf"
  }
  ```
</ResponseExample>
