Skip to main content
POST
Bulk upload documents

Authorizations

Authorization
string
header
required

Use Authorization: Bearer

Path Parameters

project_id
string<uuid>
required

UUID of the project

Body

multipart/form-data
files
file[]
required

One or more files to upload

files_metadata
string

Optional JSON-encoded array of per-file metadata, aligned by position with files. Each entry is itself a list of [key, value] string pairs for the corresponding file, e.g. [[["author","Alice"],["year","2024"]], [["author","Bob"]]].

The array length must equal the number of uploaded files. If the lengths do not match, all metadata is silently ignored and the files are uploaded without any metadata.

collection_id
string<uuid>

Optional collection (in this project) to upload every file into. Sets each document's collection foreign key and writes the mirrored ["tag", slug] pair. Omit to leave the documents in "Default".

skip_parsing
enum<string>
default:false

Set to "true" to skip automatic parsing pipeline

Available options:
true,
false

Response

Documents uploaded successfully

id
string<uuid>
name
string

Document filename

file
string<uri>

URL to the document file

content_type
string

MIME type of the document

Example:

"application/pdf"

computed_pdf_file
string<uri> | null

URL to generated PDF version (if applicable)

source
enum<string>

Origin of the document

Available options:
upload,
connector
source_metadata
object

Metadata about the document source

page_count
integer | null

Number of pages in the document

file_size
integer | null

File size in bytes

metadata
string[][]

List of key-value metadata pairs. Each element is a two-element array [key, value].

Required array length: 2 elements
Example:
collection
object | null

The collection this document belongs to (the membership foreign key); null means the "Default" (uncategorised) bucket. A mirrored ["tag", slug] pair is also kept on metadata. Move a document with the set-collection action.

status
enum<string>

Document deletion status

Available options:
active,
deleting,
deleted
created_at
string<date-time>
read-only

When the document was added to the project.

created_by
object | null
read-only

The user who uploaded the document. Only returned to callers with admin permission on the project; null for non-admin callers. Also null for connector-imported documents (which are attributed to the connector, not a person) and for documents created before this was tracked.