> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# DeleteCommentReply

# Package: feedback

# Namespace: Comments

# Method link: https://dev.wix.com/docs/api-reference/account-level/studio-workspace/feedback/comment-v1/delete-comment-reply.md

## Permission Scopes:
Manage Site Feedback: SCOPE.PARTNERS.FEEDBACK_MANAGE

## Introduction

Deletes a reply to a comment.

Each time the comment is updated, `revision` increments by 1. The current `revision` must be passed when updating the comment. This ensures you're working with the latest comment and prevents unintended overwrites.

The site owner can delete any reply, not only their own, as part of moderating the comment.

The reply is addressed by `replyIndex`, its position in the comment's `replies` list. Because
indexes shift when an earlier reply is deleted, a stale `revision` is rejected rather than
applied to whichever reply now sits at that index.

---

## REST API

### Schema

```
 Method: deleteCommentReply
 Description: Deletes a reply to a comment.  Each time the comment is updated, `revision` increments by 1. The current `revision` must be passed when updating the comment. This ensures you're working with the latest comment and prevents unintended overwrites.  The site owner can delete any reply, not only their own, as part of moderating the comment.  The reply is addressed by `replyIndex`, its position in the comment's `replies` list. Because indexes shift when an earlier reply is deleted, a stale `revision` is rejected rather than applied to whichever reply now sits at that index.
 URL: https://www.wixapis.com/partners/feedback/v1/comments/{commentId}/replies/{replyIndex}
 Method: DELETE
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  commentId, replyIndex, revision
 Method parameters: 
   param name: commentId | type:   none | required: true 
   param name: replyIndex | type:   none | required: true 
   query param name: revision | type: revision | description: Current revision of the comment. | required: true | validation: format int64
 Return type: DeleteCommentReplyResponse
  - name: comment | type: Comment | description: Updated comment, without the deleted reply.  
     - name: id | type: string | description: Comment GUID.  | read-only: true | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time the comment is updated. To prevent conflicting changes, the current revision must be passed when updating the comment.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the comment was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the comment was updated.  | read-only: true | validation: format date-time
     - name: feedbackId | type: string | description: GUID of the [feedback session](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/feedback/feedback-session-v1/introduction.md) the comment belongs to.  A feedback session scopes a round of review on a site and carries an expiration date. Once a session lapses it accepts no new comments, but the comments already in it stay readable and can still be triaged and replied to.  | read-only: true | validation: format GUID
     - name: commenterId | type: string | description: GUID of the commenter who left the comment.  | read-only: true | validation: format GUID
     - name: message | type: string | description: Text of the comment.  | validation: minLength 2, maxLength 2000
     - name: status | type: Status | description: Triage status of the comment.  Every comment starts as `NEW`. [Update Comment Status](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/feedback/comment-v1/update-comment-status.md) is the only way for the site owner to change it, and a commenter can't set the status of their own comment. A comment does return to `NEW` on its own when the commenter replies to it, whatever it was triaged as; a reply from anyone else leaves the status alone. The commenter can also reopen a `RESOLVED` comment, which returns it to `NEW`.  | read-only: true 
         - enum:
         -     NEW: The comment hasn't been read yet.
         -     OPEN: The comment has been read but isn't resolved.
         -     RESOLVED: The comment has been dealt with.
     - name: commentLocation | type: CommentLocation | description: Where on the page the comment is anchored.  
        - name: pageId | type: string | description: GUID of the editor page the comment was left on.  | validation: maxLength 100
        - name: x | type: number | description: Horizontal position of the comment on the page.  
        - name: y | type: number | description: Vertical position of the comment on the page.  
        - name: breakpoint | type: Breakpoint | description: Responsive-design breakpoint the comment was left at.  
           - name: id | type: string | description: Breakpoint GUID.  | validation: maxLength 100
           - name: minWidth | type: integer | description: Lowest viewport width the breakpoint applies to, in pixels.  
           - name: maxWidth | type: integer | description: Highest viewport width the breakpoint applies to, in pixels.  
        - name: innerPath | type: string | description: Inner path of the Wix dynamic page the comment was left on.  | validation: maxLength 2048
        - name: position | type: Position | description: Position of the comment relative to the element it's attached to.  
           - name: selector | type: string | description: DOM selector of the target element.  | validation: maxLength 1024
           - name: offsetXPct | type: number | description: Horizontal offset within the element, as a percentage of its width.  
           - name: offsetYPct | type: number | description: Vertical offset within the element, as a percentage of its height.  
           - name: innerPath | type: string | description: Inner path of the Wix dynamic page the element is on.  | validation: maxLength 2048
     - name: replies | type: array<CommentReply> | description: Replies to the comment, ordered oldest first.  A reply is addressed by its index in this list, so indexes shift when an earlier reply is deleted. Pass the comment's current `revision` when updating or deleting a reply to be sure the index you're addressing is still the one you read.  | read-only: true | validation: maxItems 1000
        - name: message | type: string | description: Text of the reply.  | validation: minLength 1, maxLength 2000
        - name: createdDate | type: string | description: Date and time the reply was created.  | read-only: true | validation: format date-time
        - name: replier | type: Replier | description: Who wrote the reply.  | read-only: true 
           - ONE-OF: 
              - name: wixUserOptions | type: WixUserOptions | description: The Wix user who wrote the reply, when `type` is `WIX_USER`.  
                 - name: accountId | type: string | description: GUID of the account the Wix user was logged in to when they replied. This isn't necessarily the account that owns the site.  A `WIX_USER` replier with no `accountId` is the agency that owns the site.  | validation: format GUID
           - name: type | type: Type | description: What kind of identity wrote the reply.  
                 - enum:
                 -     COMMENTER: The comment's commenter. Their name comes from the commenter with the comment's `commenterId`.
                 -     WIX_USER: A Wix user: a user of the agency that owns the site, or of a collaborator account. Details are in `wixUserOptions`.  A `WIX_USER` replier with no `accountId` is the agency that owns the site.


```

### Examples

### Delete Comment Reply
Removes a reply, addressed by its position in the replies list

```curl
curl -X DELETE \
'https://www.wixapis.com/partners/feedback/v1/comments/8046df3c-7575-4098-a5ab-c91ad8f33c47/replies/0?revision=3' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.feedback.comments.deleteCommentReply(identifiers, revision)
 Description: Deletes a reply to a comment.  Each time the comment is updated, `revision` increments by 1. The current `revision` must be passed when updating the comment. This ensures you're working with the latest comment and prevents unintended overwrites.  The site owner can delete any reply, not only their own, as part of moderating the comment.  The reply is addressed by `replyIndex`, its position in the comment's `replies` list. Because indexes shift when an earlier reply is deleted, a stale `revision` is rejected rather than applied to whichever reply now sits at that index.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  identifiers.commentId, revision, identifiers.replyIndex, identifiers
 Method parameters: 
   param name: identifiers | type: DeleteCommentReplyIdentifiers  none | required: true 
        - name: commentId | type: string | description: GUID of the comment the reply belongs to. | required: true | validation: format GUID
        - name: replyIndex | type: integer | description: Position of the reply in the comment's `replies` list. | required: true | validation: minimum 0
   param name: revision | type: string | description: Current revision of the comment. | required: true | validation: format int64
 Return type: PROMISE<DeleteCommentReplyResponse>
  - name: comment | type: Comment | description: Updated comment, without the deleted reply.  
     - name: _id | type: string | description: Comment GUID.  | read-only: true | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time the comment is updated. To prevent conflicting changes, the current revision must be passed when updating the comment.  | read-only: true | validation: format int64
     - name: _createdDate | type: Date | description: Date and time the comment was created.  | read-only: true 
     - name: _updatedDate | type: Date | description: Date and time the comment was updated.  | read-only: true 
     - name: feedbackId | type: string | description: GUID of the [feedback session](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/feedback/feedback-session-v1/introduction.md) the comment belongs to.  A feedback session scopes a round of review on a site and carries an expiration date. Once a session lapses it accepts no new comments, but the comments already in it stay readable and can still be triaged and replied to.  | read-only: true | validation: format GUID
     - name: commenterId | type: string | description: GUID of the commenter who left the comment.  | read-only: true | validation: format GUID
     - name: message | type: string | description: Text of the comment.  | validation: minLength 2, maxLength 2000
     - name: status | type: Status | description: Triage status of the comment.  Every comment starts as `NEW`. [Update Comment Status](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/feedback/comment-v1/update-comment-status.md) is the only way for the site owner to change it, and a commenter can't set the status of their own comment. A comment does return to `NEW` on its own when the commenter replies to it, whatever it was triaged as; a reply from anyone else leaves the status alone. The commenter can also reopen a `RESOLVED` comment, which returns it to `NEW`.  | read-only: true 
         - enum:
         -     NEW: The comment hasn't been read yet.
         -     OPEN: The comment has been read but isn't resolved.
         -     RESOLVED: The comment has been dealt with.
     - name: commentLocation | type: CommentLocation | description: Where on the page the comment is anchored.  
        - name: pageId | type: string | description: GUID of the editor page the comment was left on.  | validation: maxLength 100
        - name: x | type: number | description: Horizontal position of the comment on the page.  
        - name: y | type: number | description: Vertical position of the comment on the page.  
        - name: breakpoint | type: Breakpoint | description: Responsive-design breakpoint the comment was left at.  
           - name: _id | type: string | description: Breakpoint GUID.  | validation: maxLength 100
           - name: minWidth | type: integer | description: Lowest viewport width the breakpoint applies to, in pixels.  
           - name: maxWidth | type: integer | description: Highest viewport width the breakpoint applies to, in pixels.  
        - name: innerPath | type: string | description: Inner path of the Wix dynamic page the comment was left on.  | validation: maxLength 2048
        - name: position | type: Position | description: Position of the comment relative to the element it's attached to.  
           - name: selector | type: string | description: DOM selector of the target element.  | validation: maxLength 1024
           - name: offsetXPct | type: number | description: Horizontal offset within the element, as a percentage of its width.  
           - name: offsetYPct | type: number | description: Vertical offset within the element, as a percentage of its height.  
           - name: innerPath | type: string | description: Inner path of the Wix dynamic page the element is on.  | validation: maxLength 2048
     - name: replies | type: array<CommentReply> | description: Replies to the comment, ordered oldest first.  A reply is addressed by its index in this list, so indexes shift when an earlier reply is deleted. Pass the comment's current `revision` when updating or deleting a reply to be sure the index you're addressing is still the one you read.  | read-only: true | validation: maxItems 1000
        - name: message | type: string | description: Text of the reply.  | validation: minLength 1, maxLength 2000
        - name: _createdDate | type: Date | description: Date and time the reply was created.  | read-only: true 
        - name: replier | type: Replier | description: Who wrote the reply.  | read-only: true 
           - ONE-OF: 
              - name: wixUserOptions | type: WixUserOptions | description: The Wix user who wrote the reply, when `type` is `WIX_USER`.  
                 - name: accountId | type: string | description: GUID of the account the Wix user was logged in to when they replied. This isn't necessarily the account that owns the site.  A `WIX_USER` replier with no `accountId` is the agency that owns the site.  | validation: format GUID
           - name: type | type: Type | description: What kind of identity wrote the reply.  
                 - enum:
                 -     COMMENTER: The comment's commenter. Their name comes from the commenter with the comment's `commenterId`.
                 -     WIX_USER: A Wix user: a user of the agency that owns the site, or of a collaborator account. Details are in `wixUserOptions`.  A `WIX_USER` replier with no `accountId` is the agency that owns the site.


```

### Examples

### Delete a reply
Removes a reply, addressed by its position in the replies list

```javascript
import { comments } from "@wix/feedback";

async function deleteCommentReply() {
  const response = await comments.deleteCommentReply(
    { commentId: "8046df3c-7575-4098-a5ab-c91ad8f33c47", replyIndex: 0 },
    "3",
  );
}

```

### deleteCommentReply (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { comments } from '@wix/feedback';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { comments },
  // Include the auth strategy and host as relevant
});


async function deleteCommentReply(identifiers,revision) {
  const response = await myWixClient.comments.deleteCommentReply(identifiers,revision);
};
```

---