Skip to main content

Summary

Apply a previously computed diff payload to the current document. The document fingerprint must match the diff base fingerprint. Tracked mode governs body content only; styles, numbering, and comments are always applied directly.
  • Operation ID: diff.apply
  • API member path: editor.doc.diff.apply(...)
  • Mutates document: yes
  • Idempotency: conditional
  • Supports tracked mode: yes
  • Supports dry run: no
  • Deterministic target resolution: yes

Expected result

Returns a DiffApplyResult with applied operation count and diagnostics.

Input fields

Example request

Output fields

Example response

Pre-apply throws

  • INVALID_INPUT
  • CAPABILITY_UNSUPPORTED
  • PRECONDITION_FAILED
  • CAPABILITY_UNAVAILABLE

Non-applied failure codes

  • None

Raw schemas