Closed ticket attachment redaction when filename has spaces | Community
Skip to main content

Closed ticket attachment redaction when filename has spaces

  • January 30, 2024
  • 8 replies
  • 0 views

Hi all, 

In order to properly redact attachments after a few weeks of having a ticket closed, we use the api/v2/comment_redactions/:comment_id endpoint.

This works fine for all attachments, untill the attachment has a space in the filename.

The only way to redact attachments on closed tickets seems to be this endpoint, using the `external_attachment_urls` parameter (See https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/#redact-ticket-comment-in-agent-workspace)

Does anyone have this working with filenames with spaces, or is it a bug on the Zendesk API?

Example request:
PUT https://****.zendesk.com/api/v2/comment_redactions/8485325541917
JSON payload:
{"ticket_id": 237553, "external_attachment_urls":["https://*****.zendesk.com/attachments/token/Qqa********d7sVk/?name=Template+invoice.pdf"]}


Things i already tried:

  1. Replace the + sign with a %20
  2. Replace the + sign with an actual space

 

Thanks in advance!

 

8 replies

Tipene
  • February 5, 2024

Hi @jeroen12,

I just tested this on my end using the content_url from the comment ,and it's working as expected. Are you testing this in Postman or in your own code? Also, are you seeing any errors returned when you make the request?


  • Author
  • February 5, 2024

Hi Tipene, 

thanks for testing. I tested it both in Postman and in own code (using Guzzle) to be sure it shouldn't be an issue on my end. 

There is no content returned, (content-length 0), but only a HTTP; 400 Bad Request


Tipene
  • February 7, 2024
Thanks for the update.
 
I've been looking through our logs on this and I'm seeing that the most recent requests have been actioned successfully. Can you let me know if you're still running in to this issue?

  • Author
  • February 8, 2024

Still running into the issue indeed, but it seems not to be consistent over different tickets.
At 12:06 CEST i did another attempt on this ticket 237553 and keep receiving a 400 Bad request 

After that i tried to create a new ticket, with a file with spaces and there it worked fine with the same way of doing the request (but changing the values of ticket-comment-content_url).

Most likely something seems to be corrupt at that ticket (although I received similar errors, on around 10 other tickets when processing the last 2 years of tickets)


Tipene
  • February 14, 2024
Hey Jeroen,
 
Thanks for the extra context. I'm doing a bit more digging on my end and will get back to you as soon as I have more information.
 
 

  • March 26, 2024

Hello @tipene, do you have any updates related to this request? I'm facing the same issue as Jeroen.

Thanks


ヘイマー

Hello Tipene Hughes, do you have any updates related to this request?

I'm having the same issue too.

It's unclear whether the issue occurred because of the space, but we do know that the problem is related to the file name.

Could you please review the issue when you have a moment? Thank you.


Tipene
  • August 25, 2025
Hi Haymar,
 
It’s been a while since this original issue was raised so I’ll need to take a look in to your specific issue. Would you mind sharing an example of your request payload, as well as the approximate last time you ran the request and returned the error. Once received, I’ll take a look at the logs on my end so we can see what’s happening.
 
Tipene