Skip to main content
POST
/
api
/
v2
/
collection
/
update_chunks
cURL
curl --request POST \
  --url https://paradigm.lighton.ai/api/v2/collection/update_chunks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "chunks": [
    {
      "text": "<string>",
      "benchmark_id": "<string>"
    }
  ],
  "document_id": 123,
  "document_name": "<string>",
  "collection": "<string>"
}
'
{
  "success": 123,
  "document_id": 123
}

Authorizations

Authorization
string
header
required

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

Body

Request serializer for updating document chunks.

chunks
object[]
required

List of chunks to update or add to the document

document_id
integer

ID of existing document to update (optional, creates new document if not provided)

document_name
string

Name for new document (required when creating new document)

collection
string

Collection name (required when creating new document)

Response

200 - application/json

Response serializer for chunk update results.

success
integer
required

Number of chunks successfully processed

document_id
integer
required

ID of the document that was created or updated