Skip to main content
Version: v3

Uploads a file to knowledge base (max file size: 10MB)

POST 

/knowledge-bases/files

Uploads a PDF, DOC, or DOCX file (max 10MB) into a knowledge base for training. WHEN TO USE: use this when you need to add a document source; use getFilesByKnowledgeBasePublic to list uploads; use deleteFile to remove a file. Do not use this for website pages — use discoverWebsite / trainDiscoveredUrls. RETURNS: success and the uploaded file url, fileId, and folder path.

Request

Version stringrequired

API Version

Available optionsv3
multipart/form-data

Bodyrequired

File upload with metadata

    locationIdstring

    location id

    knowledgeBaseIdstringrequired

    knowledge base id

    filestring<binary>required

    File to upload (max size: 10MB). Supported formats: PDF, DOC, DOCX

application/json

Uploads a file to knowledge base

Schema
    successbooleanrequired

    success

    dataobjectrequired

    details of the uploaded file