Skip to main content
POST
Create a new datasource

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

The unique identifier of the knowledge base

Body

application/json
display_name
string

The display name for the datasource visible in the UI. If omitted, the display name is derived from the uploaded file. When both display_name and file_id are provided, the provided display_name is prioritized.

description
string | null

The description of the knowledge base

file_id
string

The unique identifier of the file used for datasource creation. If provided, the file is immediately queued for chunking.

chunking_options
object

Configuration options specifying how the datasource file is chunked. Required if file_id is specified. Defaults to standard chunking options if omitted.

Response

Datasource successfully created

display_name
string
required

The display name of the datasource. Normally the name of the uploaded file

status
enum<string>
required
Available options:
pending,
processing,
completed,
failed,
queued
created
string
required

The date and time the datasource was created

updated
string
required

The date and time the datasource was updated

knowledge_id
string
required

The unique identifier of the knowledge base

chunks_count
number
required

The number of chunks in the datasource

_id
string<ulid>
default:01KTRG2896TFH1QXYJ2VK91A0V
read-only

The unique identifier of the data source

Pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
description
string | null

The description of the knowledge base

file_id
string | null

The unique identifier of the file used to create the datasource.

created_by_id
string<uuid> | null
read-only

The user ID of the creator of the knowledge base

Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
update_by_id
string<uuid> | null
read-only

The user ID of the last user who updated the knowledge base

Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$