Knowledge base
Create document
Add knowledge from text, a URL or a file.
https://app.elunos.ai/api/v1/knowledge/documentsCreates a document. The content comes as text, as the address of a web page that is read in, or as a file.
Body
namestringPflichtDisplay name of the document.
source_typetext | url | filePflichtWhere the content comes from. Decides which of the following fields is needed.
content_textstringThe text itself, for `source_type=text`.
content_urlstringAddress that is read in, for `source_type=url`.
filemultipartFile up to 20 MB, for `source_type=file`. PDF, DOCX, TXT, HTML, MD and EPUB are allowed.
folder_iduuidPuts the document into a [folder](/docs/api-reference/list-folders).
Example
curl -X POST https://app.elunos.ai/api/v1/knowledge/documents \
-H "Authorization: Bearer np_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Öffnungszeiten",
"source_type": "text",
"content_text": "Mo bis Fr 8 bis 18 Uhr",
"folder_id": "019f94f8-0a1b-7c2d-8e3f-4a5b6c7d8e9f"
}'Response
{
"data": {
"id": "019f94f9-f54b-7303-a1b6-672be034af82",
"name": "Öffnungszeiten",
"source_type": "text",
"folder_id": "019f94f8-0a1b-7c2d-8e3f-4a5b6c7d8e9f",
"sync_status": "synced",
"sync_error": null,
"created_at": "2026-09-01T09:00:00+02:00",
"updated_at": "2026-09-01T09:00:00+02:00"
}
}Upload a file as multipart/form-data:
curl -X POST https://app.elunos.ai/api/v1/knowledge/documents \
-H "Authorization: Bearer np_xxxxxxxx" \
-F "name=Price list" \
-F "source_type=file" \
-F "file=@price-list.pdf"The handover to the agents happens right with the call. An agent can use the document once the document or its folder is assigned to it, see knowledge_ids and knowledge_folder_ids in Update agent.