Skip to main content

Summary

Patch exactly one field on an existing comment (text, target, or status). The target branch accepts a plain TextAddress or a TrackedChangeCommentTarget, with or without kind: "trackedChange", that names a logical tracked-change id. The legacy isInternal input is preserved in the schema for v1 backward compatibility but is not supported for new patch behavior and fails with CAPABILITY_UNAVAILABLE (kernel reason internal-comments-unsupported). Multi-field patches and no-op edits are rejected with INVALID_INPUT; reply target / status patches are rejected with INVALID_CONTEXT.
  • Operation ID: comments.patch
  • API member path: editor.doc.comments.patch(...)
  • Mutates document: yes
  • Idempotency: conditional
  • Supports tracked mode: no
  • Supports dry run: no
  • Deterministic target resolution: yes

Expected result

Returns a Receipt with updated populated on success. Reports NO_OP for byte-identical edits, rejects empty-body / trim-equivalent edits with INVALID_INPUT, no-op resolve/reopen with INVALID_INPUT, reply target/status with INVALID_CONTEXT, cross-story moves with INVALID_CONTEXT, materializing inherited slot moves with CAPABILITY_UNAVAILABLE, stale tracked-change targets with TARGET_NOT_FOUND, formatting / structural / unpaired-move tracked-change targets with CAPABILITY_UNAVAILABLE, and isInternal patches with CAPABILITY_UNAVAILABLE.

Input fields

Example request

Output fields

Variant 1 (success=true)

Variant 2 (success=false)

Example response

Pre-apply throws

  • TARGET_NOT_FOUND
  • CAPABILITY_UNAVAILABLE
  • INVALID_TARGET
  • INVALID_INPUT

Non-applied failure codes

  • INVALID_INPUT
  • INVALID_TARGET
  • INVALID_CONTEXT
  • TARGET_NOT_FOUND
  • CAPABILITY_UNAVAILABLE
  • NO_OP

Raw schemas