Creating multiple tickets with the same attachment | Community
Skip to main content

Creating multiple tickets with the same attachment

  • December 3, 2021
  • 1 reply
  • 0 views

Leandro15
Hi All,

I am using the Zendesk API and trying to understand if anyone has a way of creating tickets in bulk with the same attachments for each ticket?

I am already using the create many tickets endpoint for the bulk tickets import and the upload file endpoint for the attachments upload.

The thing is, when I create the tickets, only the first one will include the attachments, the others won't. Do I need to upload the same file for each ticket? Does the token is only valid for one ticket?

Thanks,

Leandro

1 reply

Tipene
  • December 8, 2021

Hi Leandro,

Thanks for reaching out!

Yes, you're right - the token generated by the Attachments API is single use only. One work around here could be looping over the tickets you create with the create many tickets endpoint and creating the attachment token and uploading each file with the update ticket endpoint.

I hope this helps. Let me know if you have any questions! 

Tipene