Skip to main content
PUT
/
Dataset
/
{datasetId}
/
document
/
{documentId}
Update a document
curl --request PUT \
  --url https://api.starleads.co/Dataset/{datasetId}/document/{documentId} \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "name": "renamed-file.pdf",
  "chunkMethod": "manual",
  "parserConfig": {
    "chunkTokenNum": 128
  },
  "enabled": 1
}
'
{
  "id": "<string>",
  "name": "<string>",
  "size": 123,
  "status": "<string>",
  "chunkMethod": "<string>",
  "createdAt": "2023-11-07T05:31:56Z"
}

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.

documentId
string
required

ID of the document.

Body

application/json

Request to update document metadata

name
string | null

Renamed filename

chunkMethod
string | null

Chunking method identifier

parserConfig
object

Configuration options for dataset document parsing

enabled
integer<int32> | null

Whether the document is enabled (1 = enabled, 0 = disabled)

Response

Document updated successfully

Public representation of a document

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