Document apiReferenceDiff
diff.capture
Capture the current document's diffable state as a versioned snapshot. v2 capture requires source-complete state and reports coverage for body, comments, styles, numbering, and header/footers, with extended family coverage carried in the opaque payload. Legacy body-only v2 artifacts remain accepted for compare/apply compatibility.
read-onlyidempotent
doc.diff.capture(…)Expected result
Returns a DiffSnapshot with a fingerprint and opaque payload.
Inputs
This operation takes no input fields.
Result
Output fields
version"sd-diff-snapshot/v1" | "sd-diff-snapshot/v2"requiredengine"superdoc-v2"requiredfingerprintstringrequiredcoverageobjectrequiredFields
bodytruerequiredcommentsbooleanrequiredstylesbooleanrequirednumberingbooleanrequiredheaderFootersbooleanrequiredpayloadobjectrequiredOpaque engine-owned snapshot data.
Failures
Pre-apply throws
PRECONDITION_FAILED
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