Knowledge base

Create document

Add knowledge from text, a URL or a file.

POSThttps://app.elunos.ai/api/v1/knowledge/documents

Creates a document. The content comes as text, as the address of a web page that is read in, or as a file.

Body

namestringPflicht

Display name of the document.

source_typetext | url | filePflicht

Where the content comes from. Decides which of the following fields is needed.

content_textstring

The text itself, for `source_type=text`.

content_urlstring

Address that is read in, for `source_type=url`.

filemultipart

File up to 20 MB, for `source_type=file`. PDF, DOCX, TXT, HTML, MD and EPUB are allowed.

folder_iduuid

Puts 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.