Skip to main content
POST
Core - Create chunks
Related guide: Knowledge bases guide. See the Knowledge bases guide for a walkthrough with examples.

Authorizations

Authorization
string
header
required

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

Path Parameters

knowledge_id
string
required
datasource_id
string
required

Body

application/json
Required array length: 1 - 100 elements
text
string
required

The text content of the chunk

Minimum string length: 1
embedding
number<double>[]
metadata
object

Metadata of the chunk

_id
string

Optional client-supplied chunk id. Reusing the same _id makes creation idempotent: an existing chunk with that _id in this datasource is replaced instead of duplicated.

Pattern: ^chunk_[0-9A-HJKMNP-TV-Z]{26}$

Response

Chunk successfully created

text
string
required
enabled
boolean
required
status
enum<string>
required

The status of the chunk

Available options:
pending,
processing,
completed,
failed,
queued
created
string
required
updated
string
required
_id
string
required
metadata
object

Metadata of the chunk. Can include page_number or any other key-value pairs

created_by_id
string | null

The unique identifier of the user who created the chunk

update_by_id
string | null

The unique identifier of the user who updated the chunk

processing_attempts
object[]

Additive compatibility fields from the database document.

count_metadata
object