Obtener el árbol completo de carpetas y documentos de la base de conocimientos.
Knowledge base
GET /v1/knowledge/tree
Returns the full tree of folders and documents in your company’s knowledge base.
GET
Obtener el árbol completo de carpetas y documentos de la base de conocimientos.
Returns the full hierarchy of active folders and documents in the knowledge base. The response is a tree nested by
parent_id, ordered by position. Nodes don’t include content (content_json / content_text) to keep the response lightweight — to create documents use POST /v1/knowledge/documents, and to search within their content use POST /v1/knowledge/search.
Endpoint
Required scope
knowledge:read
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer kbai_pk_<token> |
Example request
Response
200 OK
| Field | Type | Description |
|---|---|---|
items[].id | string | ObjectId of the node. |
items[].title | string | Title as shown in the portal. |
items[].node_type | string | folder or document. |
items[].parent_id | string | null | ObjectId of the parent folder. null if at the root. |
items[].position | number | Order within the parent (lowest first). |
items[].path_cache | string | Concatenated path (e.g. /Soporte/Política de devolución). |
items[].children | array | Direct children of the node, with the same structure. |