Redact Ticket Comment In Agent Workspace

PUT {{baseUrl}}/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:

{
  "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 inline images and anchor tags, add the individual attribute redact to the element. Example: <a href="http://example.com" redact>some link</a>.

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 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 endpoint, which will eventually be deprecated.

Allowed For

  • Agents

Agent Workspace 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

NameTypeRequiredDescription
ticket_idintegertrueThe ID of the ticket
html_bodystringfalseThe html_body of the comment containing <redact> tags or redact attributes
externalattachmenturlsarrayfalseArray of attachment URLs belonging to the comment to be redacted. See content_url property of Attachment

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{&quot;comment&quot;:{&quot;attachments&quot;:[],&quot;author_id&quot;:123,&quot;id&quot;:100,&quot;plain_body&quot;:&quot;My ID number is ▇▇▇▇!&quot;,&quot;public&quot;:true,&quot;type&quot;:&quot;Comment&quot;}}