Upload files for a knowledge collection
The only knowledge endpoint taking multipart/form-data. Uploading stores the files and adds nothing yet; post the returned configuration as an upload source.
POST
This is the only knowledge endpoint that takes
multipart/form-data. Uploading stores the files and adds nothing to the collection yet. To ingest them, post the response’s configuration object unchanged as the configuration of an upload source with Create a source, then sync that source. See File uploads.
The whole batch is checked before anything is stored. If any single file is unacceptable, the request returns 400 and no file is stored, so a 201 means every file was accepted.
Limits:
- The whole request body is at most 64 MiB. A request that declares a larger
Content-Lengthreturns400. A body that exceeds the limit while it is being read is cut off with413. - At most 1,000 files per request.
- Each file must be non-empty and within your deployment’s per-document size limit, which is 1 MiB by default.
- The files together must be within your deployment’s per-source byte limit, which is 256 MiB by default, so by default the 64 MiB request limit is the one you reach first.
- be at most 255 characters
- be a plain relative name: no leading
/, no\, no drive letter, no control characters, no.or..segments, no empty segments, no segment that starts or ends with a space or ends with., at most 32 segments, no|, and not a reserved device name such asCON - end in a supported extension:
A file with no extension is accepted only when it is named
README, LICENSE, NOTICE, AUTHORS, CHANGELOG or CONTRIBUTING (read as plain_text), or Dockerfile or Makefile (read as source_code). Extensions and names are matched without regard to case. The type is decided by the filename alone, not by the file’s content. Legacy .doc files, spreadsheets and slide decks are not supported.
Uploading requires a role that can manage knowledge. A read-only member receives 403. A collection that is not in your organization returns 404.
string
required
Form field. ID (a UUID) of the collection the files are for.
file
required
Form field. One file. Repeat the field to upload several files in one request.
Response
Returns201.
object[]
required
The accepted files, in the order they were sent.
integer
required
Number of files accepted.
object
required
Ready-made configuration for an
upload source. Post it back unchanged.Last modified on September 26, 2026