Eliminar un nodo (carpeta o documento). Si es carpeta, elimina sus descendientes.
Knowledge base
DELETE /v1/knowledge/nodes/:id
Delete a node (folder or document). If it’s a folder, all of its descendants are deleted too.
DELETE
Eliminar un nodo (carpeta o documento). Si es carpeta, elimina sus descendientes.
Deletes a node from the knowledge base. If the node is a folder, all of its descendants (subfolders and documents) are deactivated along with it. The delete is logical (
is_active: false); data stays in the database in case the support team needs to restore it, but it stops appearing in GET /v1/knowledge/tree and is no longer eligible for POST /v1/knowledge/search.
After deletion, the API enqueues a reindex to clean up the chunks tied to the node.
Endpoint
Required scope
knowledge:delete
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer kbai_pk_<token> |
Path params
| Param | Type | Description |
|---|---|---|
id | string | ObjectId of the node (folder or document) to delete. |
Example request
Response
204 No Content
No body. The delete is idempotent only within the same request: if the node was already deleted, it returns404 NOT_FOUND.
401 / 403 / 404 / 429
403 FORBIDDENwithcode: INSUFFICIENT_SCOPE: the PAT doesn’t haveknowledge:delete.404 NOT_FOUND: the node doesn’t exist, was already deleted, or belongs to another company.