Crear una carpeta en la base de conocimientos.
Knowledge base
POST /v1/knowledge/folders
Create a folder in the knowledge base, optionally nested under another folder.
POST
Crear una carpeta en la base de conocimientos.
Creates an empty folder in the knowledge base. Folders are containers: they group documents and other folders, but have no content of their own. To create documents use
POST /v1/knowledge/documents.
Endpoint
Required scope
knowledge:write
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer kbai_pk_<token> |
Content-Type | Yes | application/json |
Body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Folder name. Max. 200 characters. |
parent_id | string | No | ObjectId of the parent folder. Omit to create at the root. |
Example request
Response
201 Created
| Field | Type | Description |
|---|---|---|
id | string | ObjectId of the newly created node. |
title | string | Saved title. |
node_type | string | Always folder. |
parent_id | string | null | Parent if provided, null if at the root. |
position | number | Assigned position (last in its level). |
path_cache | string | Absolute path computed at creation. |
400 / 401 / 403 / 404 / 429
400 BAD_REQUEST:titleempty or longer than 200,parent_idwith invalid format, orparent_idpointing to a document (not a folder).403 FORBIDDENwithcode: INSUFFICIENT_SCOPE: the PAT doesn’t haveknowledge:write.404 NOT_FOUND: theparent_iddoesn’t exist or doesn’t belong to your company.
Authorizations
Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.
Body
application/json