v4

latestOpenAPI 3.1.0raw.githubusercontent.com2026-06-13216144508.7 KB
kb

Check Documents Exist Api

Check which of the given filenames already exist in the collection.

Used by the frontend to show "file already exists, re-upload?" before ingest. New records resolve names via file_id -> UploadedFile.filename; legacy records fall back to source_path basename.

For duplicate check we always filter by current user's documents only (including for admins), so "already exists" matches what will be overwritten on re-upload.

post/api/kb/collections/{collection_name}/documents/check

Path parameters

collection_namestring required

Request body

object required

JSON body with 'filenames': list of filename strings

Response

Successful Response

object required