Skip to main content
POST
/
v1
/
documents
/
ingest
Ingest Document Handler
curl --request POST \
  --url http://localhost:8000/v1/documents/ingest \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form path_part_id=3c90c3cc-0d44-4b50-8888-8dd25736052a \
  --form 'name=<string>' \
  --form ingestion_mode=high_accuracy \
  --form chunk_type=TEXT \
  --form secondary_taxonomy=picture \
  --form page_dpi=72
{
  "workflow_id": "<string>",
  "document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "document_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Documentation Index

Fetch the complete documentation index at: https://docs.knowledgestack.ai/llms.txt

Use this file to discover all available pages before exploring further.

Headers

authorization
string | null

Cookies

ks_uat
string | null

Body

multipart/form-data
file
file
required
path_part_id
string<uuid>
required

Parent path part ID (must be a FOLDER type)

name
string | null

Document name (defaults to filename)

ingestion_mode
enum<string> | null

Ingestion pipeline mode: 'high_accuracy' (default for PDF), 'standard' (default for DOCX/XLSX/PPTX/PLAINTEXT), or 'single_chunk' (default for IMAGE/CSV). Auto-resolved when omitted.

Available options:
high_accuracy,
standard,
single_chunk
chunk_type
enum<string> | null

Force chunk type (TABLE/IMAGE/HTML). Only valid with single_chunk mode.

Available options:
TEXT,
TABLE,
IMAGE,
HTML,
UNKNOWN
secondary_taxonomy
enum<string> | null

Force secondary taxonomy (e.g. 'picture', 'flowchart'). Only valid with single_chunk mode and chunk_type=IMAGE.

Available options:
picture,
flowchart
page_dpi
integer
default:72

DPI for PDF page screenshots (default 72, min 36, max 216).

Required range: 36 <= x <= 216

Response

Successful Response

Response with workflow execution details.

workflow_id
string
required

Temporal workflow ID

document_id
string<uuid>
required
document_version_id
string<uuid>
required