Skip to main content
POST
/
Dataset
/
{datasetId}
/
document
Upload documents to a dataset
curl --request POST \
  --url https://api.starleads.co/Dataset/{datasetId}/document \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-Api-Key: <api-key>' \
  --form 'files=<string>' \
  --form files.items='@example-file'
[
  {
    "id": "doc_xyz",
    "name": "manual.pdf",
    "size": 2048576,
    "status": "pending",
    "createdAt": "2026-04-15T10:30:00Z"
  }
]

Authorizations

X-Api-Key
string
header
required

Headers

X-Api-Key
string
required

Api key to pass as a X-Api-Key request header.

Path Parameters

datasetId
string
required

ID of the dataset.

Body

multipart/form-data
files
file[]
required

Files to upload (1-10 files, max 5 MB each)

Response

Documents uploaded successfully

id
string

Document identifier

name
string

Original filename

size
integer<int64> | null

File size in bytes

status
string | null

Parsing status

chunkMethod
string | null

Chunking method used

createdAt
string<date-time> | null

Upload timestamp