Skip to main content

Summary

Create a new comment thread (or reply when parentCommentId is given). Accepts TextAddress / TextTarget anchors, or a TrackedChangeCommentTarget that names a logical tracked-change id. The tracked-change target accepts both the explicit kind form and the Labs-compatible trackedChangeId-only form; the adapter normalizes it to a Word-compatible content anchor on the requested revision side.
  • Operation ID: comments.create
  • API member path: editor.doc.comments.create(...)
  • Mutates document: yes
  • Idempotency: non-idempotent
  • Supports tracked mode: no
  • Supports dry run: no
  • Deterministic target resolution: yes

Expected result

Returns a Receipt with the new commentId in id and inserted on success; rejects whitespace-only bodies, unsupported anchor contexts, and cross-story targets. Tracked-change comment targets support insertion, deletion, replacement, and paired-move revisions; they fail with TARGET_NOT_FOUND for stale ids, CAPABILITY_UNAVAILABLE for formatting / structural revisions and unpaired move sides, and INVALID_TARGET for incompatible side requests or ambiguous replacement targets that omit a required side.

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

Raw schemas