Skip to main content
POST
Reupload Knowledge Document

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

knowledge_id
string
required
document_id
string
required

The existing document to overwrite

Body

multipart/form-data
file
file
required
document_metadata
string | null

Extra document metadata as a JSON string. It is merged into the existing metadata_info rather than replacing it. Business fields such as title, entity_names, time_periods and custom_data are carried over from the previous document when omitted — the entity_names tags used for metadata pre-filtering survive a reupload, so you do not have to resend them. Passing a field overrides it; pass null to clear one. folder_id, folder_ids, url, source_url, file_path, file_size, file_name and file_type are filled in by the server from the new file and are ignored if supplied. Example: {"title":"SY500 Service Manual","entity_names":["model:SY500"]}

document_setting
string | null

Processing settings as a JSON string. Omit it and the previous document's settings are reused in full — the knowledge base is not consulted. Supplying it overrides only the fields you pass and leaves the rest of the previous document's settings untouched, which is the opposite of the upload endpoints, where the field is all-or-nothing. Example: {"pdf_parsing_mode":2,"smart_indexing_enabled":false}

Response

Successful Response

org_id
string
required
Maximum string length: 20
user_id
string
required
Maximum string length: 20
dataset_id
string
required
file_id
string
required
document_id
string
required
created_at
integer
updated_at
integer
overall_summarize_enabled
boolean | null
default:true

Generate an overall summary. Boolean

smart_indexing_mode
integer | null
default:0

Smart indexing mode. 0: disabled (recommended), 1: standard, 2: advanced

smart_indexing_enabled
boolean | null
default:true

Enable smart indexing. Boolean. Takes effect only together with smart_indexing_mode 2 (advanced); leaving it false is recommended unless the corpus needs it, as it adds noticeable processing time and token cost

split_media_enabled
boolean | null
default:true

Generate media segments. Boolean

pdf_parsing_mode
integer | null
default:2

PDF parsing mode. 1: page, 2: section (recommended), 3: section v2

pdf_parsing_element_types
integer[] | null

pdf parsing element list, eg: [1, 2]. 1: table, 2: image, 3: formula

read_pdf_pages
string | null

read pdf pages, Example: '1,3,4' or '1,4-end' or 'all'

audio_parsing_mode
integer | null

audio parsing mode, 1: transcript, 2: speaker diarization

audio_chunk_mode
integer | null
default:1
name
string | null
Maximum string length: 256
document_type
integer | null
default:1
next_step
boolean | null
default:true

next step

llm
Llm · object | null
metadata_info
Metadata Info · object
task_priority
integer | null

task priority

description
string | null
default:""
Maximum string length: 512
summary
string | null
default:""
step_status
integer | null
default:100
status
integer | null
default:1
process_status
integer | null
default:100
version
integer | null
default:2
splitter_type
integer | null
default:1
splitter
Splitter · object
sections
Sections · object[]
content_text
string | null
trim_text
boolean | null
default:true