Delete Archived Tickets | Community
Skip to main content

Delete Archived Tickets

  • July 8, 2015
  • 7 replies
  • 0 views

I'm trying to delete all tickets which happen to be archived.  I read that you can create a view and delete multiple tickets at once but that is not working for me since they are all archived.  Anybody know of an easier way to delete archived tickets instead of one at a time?  Any help would be appreciated.  Thanks

This topic has been closed for replies.

7 replies

  • July 8, 2015

Hello,

https://developer.zendesk.com/rest_api/docs/core/tickets#bulk-deleting-tickets

But be careful as this deletion cannot be undone. 

Hope this helps.

  • McCabe

  • Author
  • July 9, 2015

Thanks McCabe.

I tried it but after running the command it did not work.  Looks like it started off connecting but then failed so not sure what I'm doing wrong. I'm running windows 7 on 64-bit machine.  I downloaded curl for win7 64 and a cert file. I then opened command window as admin and put the command in to delete tickets. Any suggestion?  Thanks


  • July 9, 2015
curl https://{yourzendesk}.zendesk.com/api/v2/tickets/destroy_many.json?ids=1,2,3 -v -u {email_address}:{password} -X DELETE  

Is this the command you used? 

  • July 9, 2015

Also Settings > API > Token Access Enabled and enable password access. 


  • Author
  • July 10, 2015

Yes, that is the command I used.  In the API settings the password was checked but the token access was not.  I checked it and tried the command again and it worked!!  Thanks for all of your help.  I appreciate it very much.


How do I delete all of them instead or selecting the 1,2,3 ?

Like what do I type after ids= ?

Or perhaps how to delete let's say ticket 1 to 1005

 

Thanks


  • May 30, 2018

Hi François-

The only option is to pass in a comma-separated list of all IDs, up to 100 at a time, to be deleted. This is documented here. Currently there is no functionality that allows for a start/end, e.g. ?id=1-100. For 1005 tickets you would have to make 11 calls to our REST API.

I would suggest visiting us and submitting a feature request for our platform team here: https://develop.zendesk.com/hc/en-us/community/topics/360000000788-Feature-Requests