Skip to main content
GET
Error

Authorizations

Authorization
string
header
required

API Key authentication. For all API requests, include your API Key in the Authorization HTTP Header, prefixed with Bearer . Example: Authorization: Bearer {API_KEY}. Strongly recommend storing your API Key on the server-side, not shared or stored on the client-side, to avoid possible API-Key leakage that can lead to serious consequences.

Path Parameters

dataset_id
string<uuid>
required

Knowledge base ID.

document_id
string<uuid>
required

Document ID.

Query Parameters

metadata
enum<string>
default:all

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

Available options:
all,
only,
without

Response

Document details. The response shape varies based on the metadata query parameter. When metadata is only, only id, doc_type, and doc_metadata are returned. When metadata is without, doc_type and doc_metadata are omitted.

id
string

Document identifier.

position
integer

Position index within the knowledge base.

data_source_type
string

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

data_source_info
object

Raw data source information.

dataset_process_rule_id
string

ID of the processing rule applied to this document.

dataset_process_rule
object

Knowledge-base-level processing rule configuration.

document_process_rule
object

Document-level processing rule configuration.

name
string

Document name.

created_from
string

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

created_by
string

ID of the user who created the document.

created_at
number

Unix timestamp of document creation.

tokens
integer

Number of tokens in the document.

indexing_status
string

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

error
string | null

Error message if indexing failed, null otherwise.

enabled
boolean

Whether the document is enabled for retrieval.

disabled_at
number | null

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

disabled_by
string | null

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

archived
boolean

Whether the document is archived.

display_status
string

Display-friendly indexing status for the UI.

word_count
integer

Total word count of the document.

hit_count
integer

Number of times this document has been retrieved.

doc_form
string

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

doc_language
string

Language of the document content.

doc_type
string | null

Document type classification, null if not set.

doc_metadata
object[]

Custom metadata key-value pairs for this document.

completed_at
number | null

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

updated_at
number | null

Unix timestamp of last update, null if never updated.

indexing_latency
number | null

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

segment_count
integer

Number of chunks in the document.

average_segment_length
number

Average character length of chunks.

summary_index_status
string | null

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

need_summary
boolean

Whether the document needs summary generation.