Skip to main content
POST
Creates a knowledge item. Two request formats are accepted: JSON (for text content) or multipart/form-data (to upload a file).

Body

string
required
Display name of the knowledge item (1 to 255 characters)
string
Text that will be indexed. Optional when you upload a file.
string
Free-form description, up to 1000 characters
string
Tells the assistant when to use this knowledge (up to 2000 characters)
string
UUID of the assistant that owns the knowledge item. Omit it to create a global knowledge item, visible to every assistant.
The assistant_id you provide must belong to an assistant in your own organization. Otherwise the request returns 404.

Response

Returns 201 Created with the created knowledge item.

Create from a file

Send the request as multipart/form-data with the file field. The text is extracted from the file and indexed automatically.

Form Fields

Accepted extensions

.txt · .md · .mdx · .rst · .adoc · .html · .pdf · .xlsx · .xls · .csv

Create for a specific assistant

cURL

Errors