Crear un documento desde markdown. El contenido se convierte a BlockNote y se reindexa para búsquedas.
Knowledge base
POST /v1/knowledge/documents
Create a document from Markdown. The content is converted to BlockNote and reindexed for search.
POST
Crear un documento desde markdown. El contenido se convierte a BlockNote y se reindexa para búsquedas.
Creates a document in the knowledge base from Markdown. The API converts the Markdown to BlockNote (the editor format used by the portal) and triggers a reindex of the vector store and the full-text index so the document becomes immediately available in
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
application/json
Título del documento.
Maximum string length:
200Example:
"Política de devolución"
Contenido en Markdown. Se convierte a BlockNote JSON al guardar.
Example:
"# Política\n\nTexto de la política..."
ObjectId de la carpeta padre. Omitir para crear en la raíz.