Skip to main content
POST
Create file source

Authorizations

Authorization
string
header
required

API key from your account settings

Path Parameters

agentId
string
required

The agent ID

Minimum string length: 1
Example:

"5QHA6VB-DIAbBhxwqxfdi"

Body

multipart/form-data
name
string
required

Display name for the source.

Minimum string length: 1
Example:

"Employee Handbook"

file
file
required

File to upload. Formats: .pdf, .doc, .docx, .txt. Max 20 MB.

Response

File source created. Status is untrained until the agent is retrained.

id
string
required

Source ID

type
enum<string>
required

Source type

Available options:
link,
file,
qna,
notionPage,
text
name
string | null
required

Source name or URL

size
number
required

Source size in bytes

createdAt
string
required

ISO 8601 creation timestamp

status
enum<string>
required

Training status of the source

Available options:
untrained,
trained,
toBeDeleted,
updated
metadata
object
required

Link-specific metadata. Present only for type="link".