---
schema: rendered-html/v1
title: "Operations with Specific IssueAttachment | Developer Portal for YouTrack and Hub Documentation"
source_url: https://www.jetbrains.com/help/youtrack/devportal/operations-api-issues-issueID-attachments.html
generated_at: 2026-06-11T15:06:43.430522+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
- Entities
- Resources
- Activity Items
- Issue Activities Page
- Build Bundles
- Enum Bundles
- Owned Bundles
- State Bundles
- User Bundles
- Version Bundles
- Custom Fields
- Field Types
- Backup Files
- Database Backup Settings
- Global Settings
- Organizations
- Projects
- Telemetry data
- Global Time Tracking Settings
- Agiles
- Articles
- Assigned Roles
- Commands
- Command Suggestions
- User Groups
- Issue Link Types
- Issue Tag
- Issues
- Operations with Specific Issue
- Sub-resources
- Issue Activity Items
- Activity Cursor Page
- Issue Attachments
- [Operations with Specific IssueAttachment](operations-api-issues-issueID-attachments.html)
- Issue Comments
- Issue Custom Fields
- Issue Links
- Issue Project
- Issue Sprints
- Tags
- Issue Time Tracking
- Issue VCS Changes and Pull Requests
- Issue Count
- Permissions
- Roles
- Saved Queries
- Search Suggestions
- Tags
- Users
- My User Profile
- Issue Work Items
- REST API Use Cases
- REST API Troubleshooting
- Color Indices List
- Hub REST API

1. YouTrack REST API
2. REST API Reference
3. Resources
4. Issues
5. [Sub-resources](#0)
6. Issue Attachments
7. [Operations with Specific IssueAttachment](#0)

# Operations with Specific IssueAttachment﻿

Last modified: 23 May 2025

This resource lets you work with attachments in the specific issue.

| Resource | ``` /api/issues/{issueID}/attachments/{attachmentID} ``` |
| --- | --- |
| Returned entity | IssueAttachment. For the description of the entity attributes, see [Supported Fields](/help/youtrack/devportal/operations-api-issues-issueID-attachments.html#IssueAttachment-supported-fields) section. |
| Supported methods | - `GET`: [Read a Specific IssueAttachment](/help/youtrack/devportal/operations-api-issues-issueID-attachments.html#get-IssueAttachment-method). - `POST`: [Update a Specific IssueAttachment](/help/youtrack/devportal/operations-api-issues-issueID-attachments.html#update-IssueAttachment-method). - `DELETE`: [Delete a Specific IssueAttachment](/help/youtrack/devportal/operations-api-issues-issueID-attachments.html#delete-IssueAttachment-method). |

## IssueAttachment attributes﻿

Represents a file that is attached to an issue or a comment.

### Related Resources﻿

Below you can find the list of resources that let you work with this entity.

- Issue Attachments

### Attributes﻿

This table describes attributes of the `IssueAttachment` entity.


| --- | --- | --- |
| id | String | The ID of the attachment. `Read-only`. |
| name | String | The name of the file. |
| author | User | The user who attached the file to the issue. `Read-only`. `Can be null`. |
| created | Long | The timestamp in milliseconds indicating the moment when the attachment was created. Stored as a unix timestamp at UTC. `Read-only`. |
| updated | Long | The timestamp in milliseconds indicating the last update of the attachment. Stored as a unix timestamp at UTC. `Read-only`. |
| size | Long | The size of the attached file in bytes. `Read-only`. |
| extension | String | The extension that defines the file type. `Read-only`. `Can be null`. |
| charset | String | Charset of the file. `Read-only`. `Can be null`. |
| mimeType | String | Mime type of the file. `Read-only`. `Can be null`. |
| metaData | String | The dimensions of an image file. For an image file, the value is `rw=&rh=`. For a non-image file, the value is empty. `Read-only`. `Can be null`. |
| draft | Boolean | If true, attachment is not yet published, otherwise false. `Read-only`. |
| removed | Boolean | If true, then attachment is considered to be removed. `Read-only`. |
| base64Content | String | The Data URI that represents the attachment with the following syntax:  ``` data:[<media type>][;base64],<data> ```  For example:  ``` "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==" ```  `Can be null`. |
| url | String | URL of the file. `Read-only`. `Can be null`. |
| visibility | Visibility | Access setting of the attachment. `Can be null`. |
| issue | Issue | The issue that the file is attached to. `Read-only`. `Can be null`. |
| comment | IssueComment | The comment that the file is attached to. Returns `null`, if the file was attached directly to the issue. `Read-only`. |
| thumbnailURL | String | URL of the attachment thumbnail. `Read-only`. `Can be null`. |

## Read a Specific IssueAttachment﻿

Read a specific attachment of the issue.

### Required permissions﻿

- Requires read access to the issue where the attachment belongs.
- If the attachment is added to a comment, access to this comment is also required.
- If the attachment visibility is limited to specific groups or users, only users from this set and attachment author will be able to access the attachment. Override Visibility Restrictions permissions allows to override these limitations.

### Request syntax﻿

GET /api/issues/{issueID}/attachments/{attachmentID}?{fields}

| {attachmentID} | Database ID of the attachment. |
| --- | --- |

### Request parameters﻿

| Parameter | Type | Description |
| --- | --- | --- |
| fields | String | A list of IssueAttachment attributes that should be returned in the response. If no field is specified, only the `entityID` is returned. |

### Sample﻿

#### Sample request﻿

https://example.youtrack.cloud/api/issues/2-6/attachments/7-2?fields=id,name,author(id,name),created,updated,size,mimeType,extension,metaData,url

#### Sample response body﻿

{
  "created": 1554209839634,
  "updated": 1554209839578,
  "author": {
    "name": "John Smith",
    "id": "1-1",
    "$type": "User"
  },
  "metaData": "rw=568&rh=902",
  "name": "2019-03-28_14-30-46.png",
  "size": 208788,
  "extension": "png",
  "url": "/youtrack/api/files/1-1/sign=fake",
  "mimeType": "image/png",
  "id": "7-2",
  "$type": "IssueAttachment"
}

## Update a Specific IssueAttachment﻿

Update a specific attachment.

### Required permissions﻿

The author of the attachment can always update it. Otherwise, requires Update Attachment permission.

### Request syntax﻿

POST /api/issues/{issueID}/attachments/{attachmentID}?{fields}

| {attachmentID} | Database ID of the attachment. |
| --- | --- |

### Request parameters﻿

| Parameter | Type | Description |
| --- | --- | --- |
| fields | String | A list of IssueAttachment attributes that should be returned in the response. If no field is specified, only the `entityID` is returned. |

### Sample﻿

For an existing attachment, you can update only its name, visibility settings, and base64Content, if applicable. For this sample, we just re-name the attached image file.

#### Sample request﻿

https://example.youtrack.cloud/api/issues/2-6/attachments/7-2?fields=id,name,author(id,name),created,updated,size,mimeType,extension,metaData,url

#### Sample request body﻿

{ "name":"orphan-modules.png" }

#### Sample response body﻿

{
  "created": 1554209839634,
  "updated": 1569436739288,
  "author": {
    "name": "John Smith",
    "id": "1-1",
    "$type": "User"
  },
  "metaData": "rw=568&rh=902",
  "name": "orphan-modules.png",
  "size": 208788,
  "extension": "png",
  "url": "/youtrack/api/files/1-1/sign=fake",
  "mimeType": "image/png",
  "id": "7-2",
  "$type": "IssueAttachment"
}

## Delete a Specific IssueAttachment﻿

Delete a specific attachment.

### Required permissions﻿

The author of the attachment can always delete it. Otherwise, requires Delete Attachment permission.

### Request syntax﻿

DELETE /api/issues/{issueID}/attachments/{attachmentID}

| {attachmentID} | Database ID of the attachment. |
| --- | --- |

### Request parameters﻿

| Parameter | Type | Description |
| --- | --- | --- |
| fields | String | A list of IssueAttachment attributes that should be returned in the response. If no field is specified, only the `entityID` is returned. |

### Sample﻿

#### Sample request﻿

https://example.youtrack.cloud/api/issues/2-6/attachments/7-2

- [Operations with Specific IssueAttachment](/help/youtrack/devportal/operations-api-issues-issueID-attachments.html)
- [IssueAttachment attributes](/help/youtrack/devportal/operations-api-issues-issueID-attachments.html#IssueAttachment-supported-fields)
- [Read a Specific IssueAttachment](/help/youtrack/devportal/operations-api-issues-issueID-attachments.html#get-IssueAttachment-method)
- [Update a Specific IssueAttachment](/help/youtrack/devportal/operations-api-issues-issueID-attachments.html#update-IssueAttachment-method)
- [Delete a Specific IssueAttachment](/help/youtrack/devportal/operations-api-issues-issueID-attachments.html#delete-IssueAttachment-method)

Issue AttachmentsIssue Comments

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

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