Skip to main content
docx_comment Manage document comment threads: create, read, update, and delete. To create a comment, first use docx_search to find the target text, then pass action “create” with the comment text and a target: {kind:“text”, blockId:“<blockId>”, range:{start:<N>, end:<N>}} using the blockId and highlightRange from the search result. For threaded replies, pass “parentId” with the parent comment ID. Action “list” returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). Action “get” retrieves a single comment by ID. Action “update” changes status to “resolved” or marks as internal. Action “delete” removes a comment or reply by ID. Do NOT pass “ref”, “id”, or “parentId” when creating a new top-level comment; only “action”, “text”, and “target” are needed.

Parameters

string, enum: 'create' | 'delete' | 'get' | 'list' | 'update'
required
The action to perform. One of: create, delete, get, list, update.
boolean
Bypass confirmation checks.
string, enum: 'direct' | 'tracked'
Edit mode: “direct” applies changes immediately, “tracked” records as suggestions.
string
Comment text content. Required for action ‘create’.
Text range to anchor the comment. Accepts either a single-block TextAddress {kind:‘text’, blockId, range} or a multi-segment TextTarget {kind:‘text’, segments:[{blockId, range}, …]} for selections that span blocks. Only for actions ‘create’, ‘update’. Omit for other actions.
string
Parent comment ID for creating a threaded reply. Only for action ‘create’. Omit for other actions.
string
Required for actions ‘delete’, ‘get’.
string, enum: 'resolved' | 'active'
Set comment status. Use ‘resolved’ to resolve a comment, or ‘active’ to reopen a previously resolved comment (lifecycle inverse). Only for action ‘update’. Omit for other actions.
boolean
When true, marks the comment as internal (hidden from external collaborators). Only for action ‘update’. Omit for other actions.
boolean
When true, includes resolved comments in results. Default: false. Only for action ‘list’. Omit for other actions.
number
Maximum number of comments to return. Only for action ‘list’. Omit for other actions.
number
Number of comments to skip for pagination. Only for action ‘list’. Omit for other actions.
string
required
The HERO documentId of the docx to target.