---
title: "Redact Ticket Comment In Agent Workspace"
method: PUT
path: "/api/v2/comment_redactions/{ticket_comment_id}"
tags: ["Ticket Comments"]
---

# Redact Ticket Comment In Agent Workspace

`PUT /api/v2/comment_redactions/{ticket_comment_id}`

Redaction allows you to permanently remove words, strings, or attachments from a ticket comment.

In the `html_body` of the comment, wrap the content you want redacted in `<redact>` tags. Example:

```json
{
  "html_body": "<div class=\"zd-comment\" dir=\"auto\">My ID number is <redact>847564</redact>!</div>",
  "ticket_id":100
}
```

The characters in the redact tag will be replaced by the ▇ symbol.

To redact HTML elements such inline images, anchor tags, and links, add the `redact` tag attribute to the element as well as the `<redact>` tag to inner text, if any. Example: 

`<a href="http://example.com" redact><redact>some link</redact></a>`

The `redact` attribute only redacts the tag. Any inner text will be left behind if not enclosed in a `<redact>` tag.

Redaction is permanent and can not be undone. Data is permanently deleted from Zendesk servers with no way to recover it.

This endpoint provides all the same functionality that the [Redact String in Comment](/api-reference/ticketing/tickets/ticket_comments/#redact-string-in-comment) endpoint provides, plus:

- Redaction of comments in closed tickets

- Redaction of comments in archived tickets

- Redaction of formatted text (bold, italics, hyperlinks)

**Limitations**: When content is redacted from an email comment, the content is also redacted from the original email through a background job. It may take a while for the changes to be completed.

**Note**: We recommend using this endpoint instead of the [Redact String in Comment](/api-reference/ticketing/tickets/ticket_comments/#redact-string-in-comment) endpoint, which will eventually be deprecated.

#### Allowed For

- Agents

[Agent Workspace](https://support.zendesk.com/hc/en-us/articles/360024218473) must be enabled on the account. For professional accounts, deleting tickets must be enabled for agents. On Enterprise accounts, you can assign agents to a custom role with permissions to redact ticket content.

#### Request Body Properties

| Name                     | Type    | Required | Description                                                                                                                                      |
| -------------------------| ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| ticket_id                | integer | true     | The ID of the ticket                                                                                                                             |
| html_body                | string  | false    | The `html_body` of the comment containing `<redact>` tags or `redact` attributes                                           |
| external_attachment_urls | array   | false    | Array of attachment URLs belonging to the comment to be redacted. See [`content_url` property of Attachment](/api-reference/ticketing/tickets/ticket-attachments/) |

## Response `200`

Success response

- TicketCommentResponse
  - `comment` TicketCommentObject
    - `attachments` AttachmentObject[] — Attachments, if any. See [Attachment](/api-reference/ticketing/tickets/ticket-attachments/)
      - `content_type` string — The content type of the image. Example value: "image/png"
      - `content_url` string — A full URL where the attachment image file can be downloaded. The file may be hosted externally so take care not to inadvertently send Zendesk authentication credentials. See [Working with url properties](/documentation/ticketing/managing-tickets/working-with-url-properties)
      - `deleted` boolean — If true, the attachment has been deleted
      - `file_name` string — The name of the image file
      - `height` integer — The height of the image file in pixels. If height is unknown, returns null
      - `id` integer — Automatically assigned when created
      - `inline` boolean — If true, the attachment is excluded from the attachment list and the attachment's URL can be referenced within the comment of a ticket. Default is false
      - `malware_access_override` boolean — If true, you can download an attachment flagged as malware. If false, you can't download such an attachment.
      - `malware_scan_result` string — The result of the malware scan. There is a delay between the time the attachment is uploaded and when the malware scan is completed. Usually the scan is done within a few seconds, but high load conditions can delay the scan results. Possible values: "malware_found", "malware_not_found", "failed_to_scan", "not_scanned"
      - `mapped_content_url` string — The URL the attachment image file has been mapped to
      - `size` integer — The size of the image file in bytes
      - `url` string — A URL to access the attachment details
      - `width` integer — The width of the image file in pixels. If width is unknown, returns null
      - `thumbnails` AttachmentBaseObject[] — An array of attachment objects. Note that photo thumbnails do not have thumbnails
        - `content_type` string — The content type of the image. Example value: "image/png"
        - `content_url` string — A full URL where the attachment image file can be downloaded. The file may be hosted externally so take care not to inadvertently send Zendesk authentication credentials. See [Working with url properties](/documentation/ticketing/managing-tickets/working-with-url-properties)
        - `deleted` boolean — If true, the attachment has been deleted
        - `file_name` string — The name of the image file
        - `height` integer — The height of the image file in pixels. If height is unknown, returns null
        - `id` integer — Automatically assigned when created
        - `inline` boolean — If true, the attachment is excluded from the attachment list and the attachment's URL can be referenced within the comment of a ticket. Default is false
        - `malware_access_override` boolean — If true, you can download an attachment flagged as malware. If false, you can't download such an attachment.
        - `malware_scan_result` string — The result of the malware scan. There is a delay between the time the attachment is uploaded and when the malware scan is completed. Usually the scan is done within a few seconds, but high load conditions can delay the scan results. Possible values: "malware_found", "malware_not_found", "failed_to_scan", "not_scanned"
        - `mapped_content_url` string — The URL the attachment image file has been mapped to
        - `size` integer — The size of the image file in bytes
        - `url` string — A URL to access the attachment details
        - `width` integer — The width of the image file in pixels. If width is unknown, returns null
    - `audit_id` integer — The id of the ticket audit record. See [Show Audit](/api-reference/ticketing/tickets/ticket_audits/#show-audit)
    - `author_id` integer — The id of the comment author. See [Author id](#author-id)
    - `body` string — The comment string. See [Bodies](#bodies)
    - `created_at` string, date-time — The time the comment was created
    - `html_body` string — The comment formatted as HTML. See [Bodies](#bodies)
    - `id` integer — Automatically assigned when the comment is created
    - `metadata` object — System information (web client, IP address, etc.) and comment flags, if any. See [Comment flags](#comment-flags)
    - `plain_body` string — The comment presented as plain text. See [Bodies](#bodies)
    - `public` boolean — true if a public comment; false if an internal note. The initial value set on ticket creation persists for any additional comment unless you change it
    - `type` string — `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)
    - `uploads` string[] — List of tokens received from [uploading files](/api-reference/ticketing/tickets/ticket-attachments/#upload-files) for comment attachments. The files are attached by creating or updating tickets with the tokens. See [Attaching files](/api-reference/ticketing/tickets/tickets/#attaching-files) in Tickets
    - `via` TicketAuditViaObject — Describes how the object was created. See the [Via object reference](/documentation/ticketing/reference-guides/via-object-reference)
      - `channel` string — This tells you how the ticket or event was created. Examples: "web", "mobile", "rule", "system"
      - `source` object — For some channels a source object gives more information about how or why the ticket or event was created

## Changes

> 29 revisions in range; 1 not diffed.

- **2025-06-13** `4085d8c72c5c` — 4 breaking
  - the `comment/attachments/items/allOf[#/components/schemas/AttachmentBaseObject]/height` response's property type/format changed from `string`/`` to `integer`/`` for status `200`
  - the `comment/attachments/items/allOf[#/components/schemas/AttachmentBaseObject]/width` response's property type/format changed from `string`/`` to `integer`/`` for status `200`
  - the `comment/attachments/items/allOf[#/components/schemas/AttachmentThumbnails]/thumbnails/items/height` response's property type/format changed from `string`/`` to `integer`/`` for status `200`
  - the `comment/attachments/items/allOf[#/components/schemas/AttachmentThumbnails]/thumbnails/items/width` response's property type/format changed from `string`/`` to `integer`/`` for status `200`
- …earlier changes not shown

[Full history](https://skmtc.dev/botbrains-io/apis/support-api/changes/api/v2/comment_redactions/:ticket_comment_id/put.md)

---

[API](https://skmtc.dev/botbrains-io/apis/support-api.md) · [All operations](https://skmtc.dev/botbrains-io/apis/support-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/botbrains-io/support-api/revisions/d53eac07ba68/schema)
