# Update a ticket reply

`PATCH https://api.cademi.com.br/api/v3/support/tickets/{ticket_id}/replies/{reply_id}`

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

Corrects the text of a support team reply. The original creation time of the reply is preserved, and the user is not notified again.

Only replies written by the support team (`author.kind` of `admin` or `credential`) can be edited. Attempting to edit any other message returns `403 Forbidden` with error details that identify the message author as the reason.

Send the `ETag` returned by the retrieve operation in the `If-Match` header to avoid overwriting a newer version.

Required permissions: `tickets.update`.

## Parameters

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

## Request body

Content type: `application/json`, required.

| Field | Type | Required | Description |
|---|---|---|---|
| `text` | string | yes |  |

## 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 message was not written by the support team. In the latter case, the error details identify the message author as the reason.

Body: Error.

### 404

The ticket or reply was not found, the reply does not belong to the ticket, or it is not accessible with the current credentials.

Body: Error.

### 412

The resource 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
