DELETE
/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}Delete Child Chunk
Permanently delete a child chunk from its parent chunk.
dataset_idstringrequired
Knowledge base ID, from [List Knowledge Bases](/en/api-reference/knowledge-bases/list-knowledge-bases). For a scoped key, [copy the ID from the Dify URL](/en/api-reference/guides/knowledge#knowledge-base-id).
document_idstringrequired
Document ID. Obtain it from [List Documents](/en/api-reference/documents/list-documents).
segment_idstringrequired
Parent chunk ID. Obtain it from [List Chunks](/en/api-reference/chunks/list-chunks).
child_chunk_idstringrequired
Child chunk ID.
204Success.
400`invalid_param` : Removing the child chunk index from the vector store failed; the message carries the underlying vector-store error.
One documented failure
invalid_paramVector store operation failed: [Errno 111] Connection refused
invalid_param
403- `forbidden` : Dataset api access is not enabled.
- `forbidden` : Sorry, you have reached the knowledge base request rate limit of your subscription.
- `forbidden` : To unlock this feature and elevate your Dify experience, please upgrade to a paid plan.
- `forbidden` : The API key is scoped to specific knowledge bases, and this knowledge base is not one of them.
One documented failure
forbiddenDataset api access is not enabled.
forbidden (api access)
404- `not_found` : Dataset not found.
- `not_found` : Document not found.
- `not_found` : Segment not found.
- `not_found` : Child chunk not found.
One documented failure
not_foundDataset not found.
not_found
Error handling
A 400 is returned: invalid_param : Removing the child chunk index from the vector store failed; the message carries the underlying vector-store error. A 403 is returned: - forbidden : Dataset api access is not enabled.
forbidden: Sorry, you have reached the knowledge base request rate limit of your subscription.forbidden: To unlock this feature and elevate your Dify experience, please upgrade to a paid plan.forbidden: The API key is scoped to specific knowledge bases, and this knowledge base is not one of them. A 404 is returned: -not_found: Dataset not found.not_found: Document not found.not_found: Segment not found.not_found: Child chunk not found.