v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1433660423.8 KB

Retrieves the content of an ingested document from a knowledge base. Returns a pre-signed URL for secure document access.

post/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/documents/{documentId}/content

Path parameters

dataSourceIdstring required

The unique identifier of the data source that contains the document.

documentIdstring required

The unique identifier of the document to retrieve content for.

knowledgeBaseIdstring required

The unique identifier of the knowledge base that contains the document.

Request body

outputFormat'RAW' | 'EXTRACTED'

The output format for the document content. <code>RAW</code> returns the original file. <code>EXTRACTED</code> returns parsed text as JSON. Defaults to <code>RAW</code>.

Response

Success

documentContentLengthinteger

The size of the document content in bytes available at the pre-signed URL.

mimeTypestring required

The MIME type of the document content. For <code>RAW</code> format, this is the original file type (for example, <code>application/pdf</code>). For <code>EXTRACTED</code> format, this is always <code>application/json</code>.

presignedUrlstring password required

A pre-signed URL for downloading the document content. The URL expires after 5 minutes.