Skip to main content
DELETE
/
v1
/
knowledge
/
nodes
/
{id}
Eliminar un nodo (carpeta o documento). Si es carpeta, elimina sus descendientes.
curl --request DELETE \
  --url https://api.keebai.com/v1/knowledge/nodes/{id} \
  --header 'Authorization: Bearer <token>'
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

DELETE https://api.keebai.com/v1/knowledge/nodes/{id}

Required scope

knowledge:delete

Headers

HeaderRequiredValue
AuthorizationYesBearer kbai_pk_<token>

Path params

ParamTypeDescription
idstringObjectId of the node (folder or document) to delete.

Example request

curl -X DELETE https://api.keebai.com/v1/knowledge/nodes/65f3a1b2c3d4e5f6a7b8c9d3 \
  -H "Authorization: Bearer kbai_pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response

204 No Content

No body. The delete is idempotent only within the same request: if the node was already deleted, it returns 404 NOT_FOUND.

401 / 403 / 404 / 429

  • 403 FORBIDDEN with code: INSUFFICIENT_SCOPE: the PAT doesn’t have knowledge:delete.
  • 404 NOT_FOUND: the node doesn’t exist, was already deleted, or belongs to another company.
Worker assignments (see POST /v1/knowledge/assignments) keep pointing to the deleted node. Since the chunk is removed from the index on the next rebuild, the assistant loses access to the content even if the knowledge_node_id is still referenced.

Authorizations

Authorization
string
header
required

Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.

Path Parameters

id
string
required

ObjectId del nodo a eliminar.

Response

204 - undefined