v6

latestOpenAPI 3.0.1raw.githubusercontent.com2026-08-0182128753.1 KB
Documents

Get Document

Returns detailed information for a single document.

get/datasets/{dataset_id}/documents/{document_id}

Path parameters

dataset_idstring uuid required

Knowledge base ID. From List Knowledge Bases.

document_idstring uuid required

Document ID. From List Documents.

Query parameters

metadata'all' | 'only' | 'without'

all returns all fields including metadata. only returns only id, doc_type, and doc_metadata. without returns all fields except doc_metadata.

Response

Document details. The returned fields depend on the metadata query parameter.

idstring

Document identifier.

positioninteger

Position index within the knowledge base.

data_source_typestring

How the document was uploaded. upload_file for file uploads, notion_import for Notion imports.

dataset_process_rule_idstring

ID of the processing rule applied to this document.

dataset_process_ruleobject

Knowledge-base-level processing rule configuration.

document_process_ruleobject

Document-level processing rule configuration.

namestring

Document name.

created_fromstring

Origin of the document. api for API creation, web for UI creation.

created_bystring

ID of the user who created the document.

created_atnumber

Unix timestamp of document creation.

tokensinteger

Number of tokens in the document.

indexing_statusstring

Current indexing status, e.g. waiting, parsing, cleaning, splitting, indexing, completed, error, paused.

errorstring nullable

Error message if indexing failed, null otherwise.

enabledboolean

Whether the document is enabled for retrieval.

disabled_atnumber nullable

Unix timestamp when the document was disabled, null if enabled.

disabled_bystring nullable

ID of the user who disabled the document, null if enabled.

archivedboolean

Whether the document is archived.

display_statusstring

Display-friendly indexing status for the UI.

hit_countinteger

Number of times this document has been retrieved.

doc_formstring

Document chunking mode. text_model for standard text, hierarchical_model for parent-child, qa_model for QA pairs.

doc_languagestring

Language of the document content.

doc_typestring nullable

Document type classification, null if not set.

completed_atnumber nullable

Unix timestamp when processing completed, null if not yet completed.

updated_atnumber nullable

Unix timestamp of last update, null if never updated.

indexing_latencynumber nullable

Time taken for indexing in seconds, null if not completed.

segment_countinteger

Number of chunks in the document.

average_segment_lengthnumber

Average character length of chunks.

summary_index_statusstring nullable

Status of summary indexing, null if summary index is not enabled.

need_summaryboolean

Whether the document needs summary generation.