How do I redact attachments on closed tickets with the API?

Question

How can I redact attachments on closed tickets with the API?

Answer

Use the Redact Ticket Comment endpoint to redact attachments on closed tickets. Include the external_attachment_urls property in the request body.

Captura de pantalla 2024-10-30 a las 10.16.25.png

Note: The Redact Comment Attachment endpoint doesn't apply to closed tickets.

To redact attachments from closed tickets

1.png

  1. Use the List Audits for a Ticket endpoint for the closed ticket ID to get:
    • comment ID
    • content URL
  2. Call PUT "https://{yoursubdomain}.zendesk.com/api/v2/comment_redactions/
    {ticket_comment_id} from Postman or curl.

    Replace {yoursubdomain} with your account subdomain and {ticket_comment_id} with the comment ID from step 1.

    Include the content URL from step 1 in the external_attachment_urls array. In Postman, use this format:

    { "external_attachment_urls": ["content_url"], "ticket_id": {ticket_id} }

    where external_attachment_urls is an array of attachment URLs for the comment you redact.

    Example:

33.png

The attachment is redacted after a successful API call:

3.png

Note: Ticket redaction works on content in archived or closed tickets for email, API, and webform channels. Ticket redaction doesn't work on content in archived or closed tickets for messaging and live chat channels. Private attachments are also available in messaging tickets for end users and ticket assignees. These attachments provide a higher level of security and users have limited access to these types of attachments.

For more information, see Redacting ticket content. As a workaround, you can also set an attachment expiration time for your ticket attachments to allow end users access for a specific timeframe.

Powered by Zendesk