---
title: "更新分块"
method: PUT
path: "/chunks/{knowledge_id}/{id}"
tags: ["分块管理"]
---

# 更新分块

`PUT /chunks/{knowledge_id}/{id}`

更新指定分块的内容和属性

## Path parameters

- `knowledge_id` string, required
- `id` string, required

## Request body

- InternalHandlerUpdateChunkRequest
  - `chunk_index` integer
  - `content` string
  - `embedding` number[]
  - `end_at` integer
  - `image_info` string
  - `is_enabled` boolean
  - `start_at` integer

## Response `200`

更新后的分块

- object

## Other responses

- `400` — 请求参数错误
- `404` — 分块不存在

## Changes

- **2025-12-22** `e625bcd5b8b9` — 1 info
  - the endpoint scheme security `ApiKeyAuth` was added to the API
- **2025-12-16** `edf61e68559d` — 1 info
  - the endpoint scheme security `ApiKeyAuth` was removed from the API

[Change history](https://skmtc.dev/tencentblueking/apis/weknora-api/changes/chunks/:knowledge_id/:id/put.md)

---

[API](https://skmtc.dev/tencentblueking/apis/weknora-api.md) · [All operations](https://skmtc.dev/tencentblueking/apis/weknora-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tencentblueking/weknora-api/revisions/cb35cf1ea852/schema)
