Knowledge Base

Replace a document's file

Replaces a file-backed document with a new file and re-ingests it. Returns the per-file registration result — PUT the file bytes to the returned upload_url to start ingestion. Markdown content must use the raw-text endpoint instead.

put/org/kb/nodes/{id}/file

Request

  • Base URL
    https://apiv2.senso.ai/api/v1
  • Auth
    API key in header X-API-Key

Path parameters

idstring uuid required

The document node's kb_node_id.

Request body

Response

The file registration result (PUT bytes to upload_url).

filenamestring required
statusstring required

upload_pending (accepted — PUT the bytes to upload_url), conflict (an active run is already processing this content), duplicate (the same file appears twice in the request), invalid (failed metadata validation), or markdown_requires_raw_ingestion (a .md/.markdown file was supplied — create markdown documents via the raw-text endpoint instead).

ingestion_run_idstring uuid
content_idstring uuid
kb_node_idstring uuid

The created/replaced document node. Absent on skipped items (any status other than upload_pending).

upload_urlstring

Presigned URL to PUT the file bytes to (accepted items only).

expires_ininteger

Seconds until upload_url expires.

errorstring

Why the file was skipped (skipped items only).

existing_content_idstring uuid

The already-processing content's id (conflict items only).

Changes

No recorded changes to this operation across all 1 revision of this API.