Question
Is it possible to download all ticket attachments in Zendesk Support?
Answer
Zendesk Support does not have a full download or export functionality for attachments. However, you can use the Zendesk API for both an individual ticket and for all tickets.
For an individual ticket
To retrieve the attachments of one ticket, follow the steps below:
- Find your attachment URLs within:
https://subdomain.zendesk.com/api/v2/tickets/TICKET_ID/comments.json
- Replace the
subdomain
with your actual subdomain andTICKET_ID
with your ticket ID - Each comment has an
attachments array
attribute, which contains a link to any attachment included in that comment
To get the file associated with it, download the file linked at thecontent_url
attribute
For all tickets
To retrieve the attachments of all tickets, follow the steps below:
- Accounts with access to exports should be able to perform a JSON export of tickets, which will contain links to the various attachments as:
https://subdomain.zendesk.com/api/v2/attachments/ATTACHMENT_ID.json
Note: The same attachment links will show up in the JSON export associated with user photos. If that user has been deleted or subsequently changed their photo, those links will fail to return files. - Replace the
subdomain
with your actual subdomain andATTACHMENT_ID
with your the attachment ID - To download the attachments associated with each link, perform a
GET
request to thatattachments
endpoint - Then, download the file linked at the
content_url
attribute
Note: If you use private attachments, these types of attachments are only visible to end users and the assignee of the ticket. Private attachments are available on messaging tickets, for accounts created on or after December 5, 2024.
0 comments
Please sign in to leave a comment.