Upload Document

Deprecated
Upload and process documents synchronously, returning the created documents directly in the response body. Deprecated in favor of `POST /document`, which processes documents asynchronously and returns a job ID for tracking status. Each item in the `data` array must include a `strategy`, one of: `csv`, `docx`, `git`, `pdf`, `txt`, `url`, `xlsx`, `youtube`, `zip`. Descriptors are matched positionally to the uploaded `files`: the first `data` item corresponds to the first uploaded file, and so on. `target` is optional for a descriptor paired with an uploaded file. It is required only for descriptors with no corresponding uploaded file (for example, a `url` or `youtube` strategy that fetches content directly), where it must contain the source location to fetch. A descriptor paired with an uploaded file does not name the document: `title` and `description` sent in the descriptor are ignored for uploaded files. The created document's `title` is the uploaded filename and its `description` is `null`. Rename it afterwards with `POST /document/{document_id}`.

Authentication

AuthorizationBearer

API key or access token, sent as Authorization: Bearer <token>. The simplest option: create an API key in your dashboard under Settings, then paste it here.

OR
AuthorizationBearer

API key or access token, sent as Authorization: Bearer <token>. The simplest option: create an API key in your dashboard under Settings, then paste it here.

Path parameters

org_idstringRequiredformat: "uuid"
The unique identifier of the organization.
project_idstringRequiredformat: "uuid"
The unique identifier of the project.

Request

This endpoint expects a multipart form with multiple files.
datastringRequired
filesfilesOptional

Response

Documents uploaded and processed
titlestring
project_idstringformat: "uuid"
strategystring
idstringformat: "uuid"
chunksinteger
original_mimestring
embedding_instanceslist of objects or null
descriptionstring or nullOptional
sourceenum or nullOptional
Source types for documents in the system.
source_metamap from strings to any or nullOptional
connection_idstring or nullOptionalformat: "uuid"

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
413
Content Too Large Error
422
Unprocessable Entity Error
500
Internal Server Error