Skip to main content
POST
/
api
/
v1
/
upload
Upload
curl --request POST \
  --url https://api.example.com/api/v1/upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'collection_id=<string>' \
  --form 'file=<string>' \
  --form 'files=<string>' \
  --form 'content=<string>' \
  --form 'urls=<string>' \
  --form content_type=file \
  --form 'metadata=<string>' \
  --form 'user_id=<string>' \
  --form 'label=<string>' \
  --form 'description=<string>' \
  --form crawl=false \
  --form ingest=true \
  --form 'reader=<string>' \
  --form file.0='@example-file' \
  --form files.0.items='@example-file'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Workspace-Id
string | null

The workspace ID

Body

multipart/form-data
collection_id
string
required
file
file | null
files
file[] | null
content
string | null
urls
string[] | null
content_type
string | null
default:file
metadata
string | null
user_id
string | null
label
string | null
description
string | null
crawl
boolean | null
default:false
ingest
boolean | null
default:true
reader
string | null
Reader to use for processing files. Supported values:
- 'native': Use native implementation (default)
- 'langchain': Use LangChain readers for all files
- 'markitdown': Use MarkItDown for universal conversion to markdown

Provider + Type Format:
- 'langchain_pdfplumber': LangChain with PDFPlumber (better OCR, tables)
- 'langchain_pypdf': LangChain with PyPDF (faster for text-based PDFs)

Specific Reader:
- 'pdf', 'csv', 'docx', 'json', 'markdown', 'text'

Response

Successful Response