Skip to main content
POST
Upload a file source

Authorizations

X-API-KEY
string
header
required

Path Parameters

agentId
string
required

Body

multipart/form-data

A file to add to the agent's knowledge base, sent as multipart/form-data.

file
file
required

The document to upload, up to 64 MiB. Supported formats: PDF, Word, Excel, PowerPoint, OpenDocument text (ODT), RTF, EPUB, HTML, XML, JSON, Markdown, CSV, plain text, and email (EML, MSG)

targetEnvSandbox
boolean | null

Whether the source is used in sandbox

targetEnvPrerelease
boolean | null

Whether the source is used in pre-release

targetEnvLive
boolean | null

Whether the source is used in live

variantIds
string[] | null

Variants the source applies to. An empty list or null applies it to all variants

name
string | null

Display name of the source. Defaults to the file name

Minimum string length: 1

Response

Successful response

The created file source. The file is stored and queued for processing.

source
object
required

The saved source

Last modified on November 25, 2026