# Update a comment reply

`PATCH https://api.cademi.com.br/api/v3/products/{product_id}/comments/{comment_id}/replies/{reply_id}`

Operation ID: `comments.replies.update` · API v3

Updates the text or the moderation status of a comment reply.

Only the text of replies written by an administrator or an API credential (`author.kind` is `admin` or `credential`) can be changed; attempts to edit the text of any other reply return `403 Forbidden`. Changing `status` requires the `comments.moderate` permission.

To avoid overwriting a newer version, send the reply's current revision in the optional `If-Match` header. If the reply has changed since that revision, the update is rejected.

Required permissions: `comments.update`, `comments.moderate`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `product_id` | path | string | yes |  |
| `comment_id` | path | string | yes |  |
| `reply_id` | path | string | yes |  |
| `If-Match` | header | string | no |  |

## Request body

Content type: `application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `status` | string, one of `approved`, `hidden` | no |  |
| `text` | string | no |  |

## Responses

### 200

Returns the updated reply.

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The credentials lack the required permission, or the request edits the text of a reply that was not written by an administrator or an API credential.

Body: Error.

### 404

The reply was not found in this comment or is not accessible with the current credentials.

Body: Error.

### 412

The reply has changed since the supplied revision was retrieved.

Body: Error.

### 422

The request body or query parameters failed validation.

Body: ValidationFailed.

Full schema: https://cademi.dev/openapi/v3.json
