POST
Upload a knowledge file

Authorizations

Authorization
string
header
required

A project API key, alt_live_… or alt_test_….

Headers

Idempotency-Key
string

Up to 255 characters. Repeating a request with the same key replays the stored response for 24 hours; the same key with a different request is a 409.

Maximum string length: 255

Path Parameters

id
string
required

Body

application/json
name
string
required
Required string length: 1 - 200
content_type
enum<string>
Available options:
text/plain,
text/markdown,
text/csv,
text/html,
application/json
content
string
content_base64
string

Response

The stored file.

id
string
required
object
string
required
Allowed value: "knowledge_file"
agent_id
string
required
account_id
string
required
name
string
required
content_type
string
required
bytes
integer
required
chunk_count
integer
required

Searchable pieces (about 1,200 characters each).

created_at
string<date-time>
required