Skip to main content

Upload & Manage Documents

Documents are uploaded into a Document Source. After upload, ingestion extracts and indexes the content for RAG retrieval.

Upload via the UI

For File-type sources:

  1. Open the source detail page at /sources/{sourceCode}.
  2. Click the Upload tab — navigates to /sources/{sourceCode}/upload.
  3. Drag and drop files onto the dropzone, or click to browse and select files.
  4. Files appear in the upload queue. Upload triggers automatic ingestion.
  5. After upload, documents appear in the Archive tab with status Uploaded.

Upload files to a source (API)

Endpoint: POST /api/documentSources/{code}/documents

The upload request is multipart/form-data and supports uploading multiple files.

The server accepts one or many file parts. In the OpenAPI spec the field is named files, and many internal clients use filename.

In practice, the upload handler accepts any file part name as long as it is a file part.

Example (two files):

curl -X POST "https://app.noema.ai/api/documentSources/my-source/documents" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-F "files=@./docs/handbook.pdf" \
-F "files=@./docs/policy.docx"

Upload flags

The upload endpoint supports optional query flags:

  • temporary: tag uploads as temporary
  • overwriteExisting: overwrite a document with the same name/id
  • generateName: ignore the original filename and generate a random name

Example:

curl -X POST "https://app.noema.ai/api/documentSources/my-source/documents?temporary=true&generateName=true" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-F "files=@./docs/handbook.pdf"

Add per-document metadata (properties)

You can include an optional multipart form field called properties containing a JSON string. This gets applied as document metadata/properties for the next file part.

curl -X POST "https://app.noema.ai/api/documentSources/my-source/documents" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-F 'properties={"department":"Legal","confidential":"true"}' \
-F "files=@./docs/policy.pdf"

The response returns the uploaded document objects (including an id). You’ll use that id to trigger processing.

List documents in a source

Endpoint: GET /api/documentSources/{code}/documents

curl "https://app.noema.ai/api/documentSources/my-source/documents" \
-H "Authorization: Bearer $ACCESS_TOKEN"

Pagination:

  • pageSize controls how many results to return.
  • nextPageToken fetches the next page.

Next steps