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"required
engine"superdoc-v2"required
fingerprintstringrequired
coverageobjectrequired
Fields
bodytruerequired
commentsbooleanrequired
stylesbooleanrequired
numberingbooleanrequired
headerFootersbooleanrequired
payloadobjectrequired

Opaque 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