POST /v1/knowledge/documents
Create a document from Markdown. The content is converted to BlockNote and reindexed for search.
POST /v1/knowledge/search.
The reindex is enqueued asynchronously in the processing service; the endpoint returns as soon as the document is persisted. Search may take a few seconds to surface the new content (depends on the queue).
Endpoint
Required scope
knowledge:write
Headers
Body
Example request
Response
201 Created
400 / 401 / 403 / 404 / 429
400 BAD_REQUEST:titleormarkdownempty,parent_idpoints to a document.403 FORBIDDENwithcode: INSUFFICIENT_SCOPE: the PAT doesn’t haveknowledge:write.404 NOT_FOUND:parent_iddoesn’t exist or belongs to another company.
Authorizations
Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.
Body
Título del documento.
200"Política de devolución"
Contenido en Markdown. Se convierte a BlockNote JSON al guardar.
"# Política\n\nTexto de la política..."
ObjectId de la carpeta padre. Omitir para crear en la raíz.
Response
folder, document Estado de la vigencia efectiva: la del nodo cruzada con la de sus carpetas. Los agentes solo leen nodos always o active.
always, active, scheduled, expired La vigencia efectiva viene de una carpeta ancestro.
Inicio de la vigencia propia del nodo (UTC ISO 8601).
Fin de la vigencia propia del nodo (UTC ISO 8601).
Carpeta que define el límite heredado.