Skip to main content
POST
Add a document (file, URL, or text)

Authorizations

Authorization
string
header
required

Use Authorization: Bearer pyai_live_... (or pyai_test_...).

Path Parameters

id
string
required

Body

url
string<uri>
text
string
title
string
Maximum string length: 200

Response

Document registered (pending ingestion)

A knowledge base document and its ingestion state.

id
string
kbId
string
orgId
string
source
enum<string>

upload = file, url = fetched page, api = pasted text.

Available options:
upload,
url,
api
uri
string | null
title
string | null
filename
string | null
mime
string | null
sizeBytes
integer
chunks
integer

Indexed chunk count (0 until indexed).

status
enum<string>
Available options:
pending,
indexed,
failed
error
string | null

Human-readable failure/stall reason.

indexedAt
integer | null

Unix ms.

createdAt
integer

Unix ms.