Document apiReferenceComments

comments.delete

Remove the targeted comment or reply by ID. Deleting a root does not delete descendant replies.

mutates documentconditional
doc.comments.delete(…)

Expected result

Returns a Receipt with the targeted removed commentId in `removed` and every story touched in `affectedStories`. Rejects with `TARGET_NOT_FOUND` when the comment id does not exist and reports `NO_OP` when the command layer accepts the target but removes nothing.

Inputs

commentIdstringrequired

Result

Output fields
true
successtruerequired
idstring
insertedEntityAddress[]
updatedEntityAddress[]
removedEntityAddress[]
invalidatedRefsAffectedRef[]
remappedRefsAffectedRefRemapping[]
affectedStoriesStoryLocator[]
textRangeShiftsTextRangeShift[]
txIdstring
false
successfalserequired
failureobjectrequired
Fields
code"TARGET_NOT_FOUND" | "CAPABILITY_UNAVAILABLE" | "NO_OP"required
messagestringrequired
detailsunknown

Failures

Pre-apply throws

  • TARGET_NOT_FOUND
  • CAPABILITY_UNAVAILABLE

Non-applied receipt codes

  • TARGET_NOT_FOUND
  • CAPABILITY_UNAVAILABLE
  • NO_OP

Raw schemas

Open the generated JSON artifact for the exact input, output, success, and failure schemas represented by this contract version.

View raw JSON schemas