---
schema: rendered-html/v1
title: "Download an Issue Attachment | Developer Portal for YouTrack and Hub Documentation"
source_url: https://www.jetbrains.com/help/youtrack/devportal/api-usecase-download-issue-attachment.html
generated_at: 2026-06-11T15:01:22.841576+00:00
---

Feedback

Thanks for your feedback!

Was this page helpful?

YesNo

Developer Portal for YouTrack and Hub

- Developer Portal
- Apps
- MCP Tools
- YouTrack Workflows
- YouTrack Import Scripts
- YouTrack Form API
- YouTrack REST API
- Get Started with REST API
- REST API Reference
- REST API Use Cases
- Create an Issue
- Create an Issue and Set Custom Fields
- Get Issues List with All Values
- Get Value for an Issue Custom Field
- [Add Value to a Set](jetbrains__com__help__youtrack__devportal__api-usecase-add-value-to-bundle.md)
- Update Issue Custom Fields
- [Update a Text Field Value](jetbrains__com__help__youtrack__devportal__api-usecase-update-text-field-value.md)
- Clear Values of Custom Fields
- [Apply Commands to Issues](jetbrains__com__help__youtrack__devportal__api-usecase-commands.md)
- Tag or Untag Issues
- [Work with Issue Tags](jetbrains__com__help__youtrack__devportal__api-usecase-work-with-tags.md)
- [Attach Files to an Issue](jetbrains__com__help__youtrack__devportal__api-usecase-attach-files.md)
- [Delete an Issue Attachment](jetbrains__com__help__youtrack__devportal__api-usecase-delete-issue-attachment.md)
- [Download an Issue Attachment](api-usecase-download-issue-attachment.html)
- Link Issues
- [Get Issue History](jetbrains__com__help__youtrack__devportal__api-usecase-issue-history.md)
- [Get a Database Backup](jetbrains__com__help__youtrack__devportal__api-usecase-backup.md)
- Add User to Project Team
- REST API Troubleshooting
- Color Indices List
- Hub REST API

1. YouTrack REST API
2. REST API Use Cases
3. [Download an Issue Attachment](#0)

# Download an Issue Attachment﻿

Last modified: 07 May 2026

## Use Case﻿

Use the REST API to download an attachment of a specific issue.

## Summary﻿

To solve this task, you basically need to obtain a full download URl of a specific issue attachment. To do so:

1. Get a list of available attachments with their attributes.
2. Get the attachment by its returned URL.

> ### note
>
> Please note that any reading operation with an attachment requires you to have a user account that is granted permission to read the target issue and its attachments.

## Step-by-Step﻿

### Get the List of Issue Attachments﻿

To get the list of issue attachments, send a GET request to the following endpoint:

```
/api/issues/{issue_ID}/attachments
```

To form a download URL for an attachment, make sure you specify the `url` attribute in the `fields` request parameters. To make the identification of the target attachment easier, add also the `name` attribute at least.

For example:

```
curl -X GET
'https://example.youtrack.cloud/api/issues/2-6/attachments?fields=name,size,mimeType,extension,charset,url' /
-H 'Accept: application/json' /
-H 'Authorization: Bearer {TOKEN}'
```

```
[
  {
    "charset": null,
    "extension": "png",
    "url": "/youtrack/api/files/7-2?sign=MTYxMzE2OTAwMDAwMHwxLTF8Ny0yfHdrRzJCYzA2cnZEclFLUzBLWEp6NXZGNE5kczA5eGVIVUUw%0D%0AbF9BVHZ3V3MNCg%0D%0A&updated=1569436739288",
    "mimeType": "image/png",
    "name": "orphan-modules.png",
    "size": 208788,
    "$type": "IssueAttachment"
  },
  {
    "charset": null,
    "extension": "png",
    "url": "/youtrack/api/files/7-3?sign=MTYxMzE2OTAwMDAwMHwxLTF8Ny0zfFMxNW12bkFfNmhWZTFrWjhGa3lNZmF4Umt2MmFXWU1UWUFu%0D%0AUDJhalhITHMNCg%0D%0A&updated=1554209920719",
    "mimeType": "image/png",
    "name": "older-versions.png",
    "size": 23812,
    "$type": "IssueAttachment"
  }
]
```

### Get Attachment﻿

Now all we need to do is to follow the link that we've received in the `url` attribute of the attachment and save the result as a file.

Make a request in the following format:

```
curl -X GET --output picture.png 'https://{HOST:PORT}{URL from previous request}' -H 'Cache-Control: no-cache'
```

For example:

```
curl -X GET --output orphan-modules.png \
'https://example.youtrack.cloud/api/files/7-2?sign=MTYxMzE2OTAwMDAwMHwxLTF8Ny0yfHdrRzJCYzA2cnZEclFLUzBLWEp6NXZGNE5kczA5eGVIVUUw%0D%0AbF9BVHZ3V3MNCg%0D%0A&updated=1569436739288' \
-H 'Cache-Control: no-cache'
```

Note that the `Authorization` header here is not required because the client is identified using the `sign=` request parameter.

- [Download an Issue Attachment](/help/youtrack/devportal/api-usecase-download-issue-attachment.html)
- [Use Case](/help/youtrack/devportal/api-usecase-download-issue-attachment.html#use-case)
- [Summary](/help/youtrack/devportal/api-usecase-download-issue-attachment.html#summary)
- [Step-by-Step](/help/youtrack/devportal/api-usecase-download-issue-attachment.html#step-by-step-procedure)

[Delete an Issue Attachment](jetbrains__com__help__youtrack__devportal__api-usecase-delete-issue-attachment.md)Link Issues

- Privacy & Security
- Terms Of Use
- Trademarks
- Legal

Copyright © 2000–2026 JetBrains s.r.o.

![](https://bat.bing.com/action/0?ti=5220035&tm=gtm002&Ver=2&mid=ee30deba-be72-4af1-8471-db97fd501d26&bo=4&sid=452929b065a111f19a7fe7356f74a419&vid=aa3122f0648711f1a10d6d095e10fd87&vids=0&msclkid=N&pi=918639831&lg=en-US&sw=1920&sh=1080&sc=24&tl=Download%20an%20Issue%20Attachment%20%7C%20Developer%20Portal%20for%20YouTrack%20and%20Hub%20Documentation&p=https%3A%2F%2Fwww.jetbrains.com%2Fhelp%2Fyoutrack%2Fdevportal%2Fapi-usecase-download-issue-attachment.html&r=&lt=687&pt=1781190078199,68,68,,,1,1,1,1,1,,2,27,28,72,255,255,255,686,687,687&pn=0,0&evt=pageLoad&sv=2&asc=G&cdb=AQAS&rn=663669)
