Export the content body of a doc in either HTML or Markdown format. Use the type path parameter to specify the desired format: html or markdown.
This is the only GET endpoint that returns the content body of a doc. List docs, List personal docs, and Get doc return metadata only (no body text).
Returns the same identifying fields as Get doc, plus either content_html or content_markdown with the full document content.
When a doc contains a mermaid diagram, markdown export returns a mermaid code fence and HTML export returns an escaped pre element with class mermaid. The rendered PNG stays on the doc's files and is not embedded in the body.
Including file content: pass ?include_file_content=true to also read the extracted text of attached document files (PDF, DOCX, PPTX, XLSX) from the search index — in the plain export, attached files appear only as links. The response then additionally includes:
content_text— the doc's full indexed body: its own text with file text inlined. Each file's pages are preceded by a<file name> - <page number>header, so content can be attributed to its source file.files— the doc's attached files with a per-filetext_status(ready/pending/failed/unsupported/unavailable).indexed— whenfalse, the document has not reached the search index yet andcontent_textis empty; retry shortly.truncated— whentrue, the indexed body exceeded the search index's size limit andcontent_textis incomplete.
Attached file text is returned under insight:read: files are part of the document, and their visibility is implied by the document's visibility. (file:read gates binary file egress via the file download API, not extracted text.)
With include_file_content=true, returns 403 when the workspace has export disabled (HIPAA restriction), and when any attached file is past its retention window: retention removes the file's bytes but its extracted text remains in the search index, so the flag is refused rather than returning content the files list would label unavailable. The plain export (without the flag) is unaffected in both cases.
Required scope: insight:read
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||