Question
How can I redact attachments on closed tickets with the API?
Answer
You can redact attachments on closed tickets using the Redact Ticket Comment endpoint and including the external_attachment_urls
property in the request body.
Note: The Redact Comment Attachment endpoint doesn't apply to closed tickets.
To redact attachments from closed tickets
- Use the List Audits for a Ticket endpoint on the closed ticket id to get the following attachment information (see screenshot below):
- comment id
- content URL
- Call
PUT "https://{yoursubdomain}.zendesk.com/api/v2/comment_redactions/
from Postman or curl.
{ticket_comment_id}
Replace{yoursubdomain}
with your account subdomain and{ticket_comment_id}
with the comment id obtained from Step 1 above.
Include the content URL from Step 1 in thehtml_body
. In Postman, the format is:
{ "external_attachment_urls": ["content_url"], "ticket_id": {ticket_id} }
where
external_attachment_urls
is an array of attachment URLs belonging to the comment to be redacted.
Example:
The attachment will be redacted after a successful API call:
Note: Ticket redaction works on content in archived or closed tickets for email, API, and webform channels. Ticket redaction does not work on content in archived or closed tickets for messaging and live chat channels.
For more information, see the article: Redacting ticket content.
0 comments