Developer Portal for YouTrack and Hub Help

Delete an Issue Attachment

Use Case

Use the REST API to delete a specific attachment from an issue.

Summary

To delete an attachment from an issue:

  1. Get the target issue ID.

  2. Get the ID of the attachment that you want to delete.

  3. Send a DELETE request to /api/issues/{issueID}/attachments/{attachmentID}.

Step-by-Step

  1. First, get the issue attachments so you can identify the target attachment:

    curl -X GET \ 'https://example.youtrack.cloud/api/issues/99-500/attachments?fields=id,name' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer perm:cm9vdA==.MjZGZWI=.WB02vjX0cM2ltLTJXUE3VOWHpJYYNx'
  2. Suppose the response contains an attachment with ID 134-31.

  3. To delete this attachment, send the following request:

    curl -X DELETE \ 'https://example.youtrack.cloud/api/issues/99-500/attachments/134-31' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer perm:cm9vdA==.MjZGZWI=.WB02vjX0cM2ltLTJXUE3VOWHpJYYNx' \ -H 'Cache-Control: no-cache'

If the request succeeds, the attachment is removed from the issue.

21 April 2026