Skip to main content
PUT
Replace document (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 UUID, or default / me for the account's default agentProfile.

id
string
required

Document id.

Body

Provide exactly one of text, url, or file_base64.

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

http or https URL to fetch.

file_base64
string

Base64 bytes; 50MB decoded max.

filename
string
Maximum string length: 255
content_type
string
Maximum string length: 100

Response

Replaced document.

Brain document (contracts/brain.ts formatDocumentRow).

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