Skip to main content
POST
Ingest a document for a tenant user

Authorizations

Authorization
string
header
required

Workspace API key. Create one via the dashboard or POST /v1/auth/keys.

Headers

X-Naive-Project-Id
string<uuid>

Act inside this project. The header form of the /v1/projects/{project_id}/... prefix, for clients that cannot rewrite their base path. Lower precedence than the path, higher than the key's pinned project; omitted resolves to the organization's default project.

Path Parameters

user_id
string
required

Tenant user id, or default/me.

Body

text
string
Maximum string length: 1000000
url
string<uri>

http/https source to fetch.

file_base64
string

Base64 bytes, 50MB decoded max.

filename
string
Maximum string length: 255
content_type
string
Maximum string length: 100
knowledge_base_id
string<uuid>

Knowledge base to scope to; defaults to the company default.

source
string

Provenance label, e.g. upload.

Maximum string length: 120

Response

Document ingested.

id
string
knowledge_base_id
string
filename
string | null
source
string | null
source_url
string | null
status
string
bytes
integer | null
created_at
string<date-time>
updated_at
string<date-time>