Recent searches
No recent searches
Delete attachments in closed tickets via API
Posted Dec 13, 2023
Hello,
According with this article in Zendesk support:
Now that Zendesk has enabled storage quota in all instances, we are trying to delete attachments in closed tickets with new endpoints.
We are using the endpoint:
PUT /api/v2/comment_redactions/{ticket_comment_id}
Sending this body json:
{
"ticket_id":1146
}
We are getting always record not found in all our requests.
Also, we are trying making the PUT request with the same payload made by Zendesk when we redact a comment in Zendesk website via Chrome:


Anyone know how to solve this and use API redact to delete attachments in closed tickets?
Thanks in advanced
Regards
0
6
6 comments
Tipene Hughes
It's looks like you might be missing the
external_attachment_urls
array in your request body. You'll want to add these values to ensure that our system can identify the attachments to be redacted. You can read more about the values here.If you continue to run in to issues, let me know and we can look in to it in more detail.
Thanks!
Tipene
0
Amine Laaguidi
Hi Tipene Hughes
Thanks for your quick answer.
I've tried with external_attachment_urls too and same message.
This is my PUT request in Postman
And this is ticket comment:
Also, I've tried without "body_html", only with external_attachment_urls and it doesn't work. Trying without body_html and external_attachment_urls, only with ticket_id, same problem.
Thanks in advanced
0
Amine Laaguidi
Hi all,
I've just solved this issue. Postman was sending request with Content header as text/plain not application/json.
Thanks for your help Tipene Hughes
0
Tipene Hughes
Glad to hear you've got it working!
Have a great day :)
Tipene
0
Roberto Coutinho
Hi,
I'm using this endpoint for the same purpose as Dani, but whenever I delete the attachments, the comment text loses the line breaks. I noticed that this behavior only happens on tickets that were created via API.
0
Tipene Hughes
That's strange, would you mind sending through some screenshots of the behavior you're seeing on your end?
0