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 inid 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
| Field | Type | Required | Description |
|---|---|---|---|
parentCommentId | string | no | |
side | enum | no | "inserted", "deleted", "source", "destination" |
story | StoryLocator | no | StoryLocator |
target | TextAddress | TextTarget | SelectionTarget | CommentTrackedChangeTarget | object | no | One of: TextAddress, TextTarget, SelectionTarget, CommentTrackedChangeTarget, object |
text | string | yes | |
trackedChangeId | string | no |
Example request
Output fields
Variant 1 (success=true)
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
inserted | EntityAddress[] | no | |
removed | EntityAddress[] | no | |
success | true | yes | Constant: true |
updated | EntityAddress[] | no |
Variant 2 (success=false)
| Field | Type | Required | Description |
|---|---|---|---|
failure | object | yes | |
failure.code | enum | yes | "INVALID_INPUT", "INVALID_TARGET", "INVALID_CONTEXT", "TARGET_NOT_FOUND", "CAPABILITY_UNAVAILABLE" |
failure.details | any | no | |
failure.message | string | yes | |
success | false | yes | Constant: false |
Example response
Pre-apply throws
TARGET_NOT_FOUNDCAPABILITY_UNAVAILABLEINVALID_TARGETINVALID_INPUT
Non-applied failure codes
INVALID_INPUTINVALID_TARGETINVALID_CONTEXTTARGET_NOT_FOUNDCAPABILITY_UNAVAILABLE
Raw schemas
Raw input schema
Raw input schema
Raw output schema
Raw output schema
Raw success schema
Raw success schema
Raw failure schema
Raw failure schema

