Document apiReferenceExport

export.toDocx

Serialize the current document to DOCX bytes under an explicit tracked-change export mode. `review-preserving` (default) keeps open tracked changes as Word revision markup, `final` resolves them as accepted, and `original` resolves them as rejected. Returns the exported bytes plus a structured degradation report of allowed warnings. An invalid mode fails closed with INVALID_INPUT before any work happens.

read-onlyidempotent
doc.export.toDocx(…)

Expected result

Returns an ExportToDocxResult with the resolved mode, base64 DOCX bytes, byte length, and a report.warnings array.

Inputs

mode"review-preserving" | "final" | "original"

Result

Output fields
mode"review-preserving" | "final" | "original"required
byteLengthintegerrequired
contentBase64stringrequired
reportobjectrequired
Fields
warningsobject[]required

Failures

Pre-apply throws

  • INVALID_INPUT
  • CAPABILITY_UNSUPPORTED

Raw schemas

Open the generated JSON artifact for the exact input, output, success, and failure schemas represented by this contract version.

View raw JSON schemas