Skip to main content
POST
Upload data sources

Authorizations

Authorization
string
header
required

All of WotNot's APIs use Bearer token authentication. Send your account token as Bearer <token>. You can find it in Settings > Account Settings > Developer. Keep it on your server: anyone who has it can call the API as your account.

Path Parameters

knowledge_base_id
string
required

The ID of the knowledge base to add the data sources to.

Body

multipart/form-data

Send files and text as multipart form data. Give each form field a unique key, and put either a file or text in it.

file_data_source_name
file

A form field that holds a file. Its value is the location of the file to upload. Give each form field its own unique key.

text_data_source_name
string

A form field that holds text. Its value is the text content to add. Give each form field its own unique key.

Example:

"Text content"

{key}

Add more form fields the same way, each with its own unique key. Each one holds either a file or text.

Response

Returns ok set to true, the knowledge base's ID, and the new data sources grouped by the form field they came from (q1 and d2 in the example). Each one starts with status set to in-progress.

knowledge_base_id
integer
required

The ID of the knowledge base the data sources were added to.

Example:

876

ok
boolean
required

true when the request worked. Errors return false.

Example:

true

{key}
object[]

The data sources created from one form field. The key is that form field's name.

Last modified on October 23, 2026