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:

  1. Find your attachment URLs within: https://subdomain.zendesk.com/api/v2/tickets/TICKET_ID/comments.json
  2. Replace the subdomain with your actual subdomain and TICKET_ID with your ticket ID
  3. 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 the content_url attribute

For all tickets

To retrieve the attachments of all tickets, follow the steps below:

  1. 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.
  2. Replace the subdomain with your actual subdomain and ATTACHMENT_ID with your the attachment ID
  3. To download the attachments associated with each link, perform a GET request to that attachments endpoint
  4. 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.
Powered by Zendesk