How to add internal attachment to issue?


How I can do the following through api?

I have found solution for comments, but I can`t find it for attachments.
While adding comment I can add "isInternal": true to body and it works.

How to do the same with attachments?

my python code

url = f"{YOUTRACK_BASE_URL}/api/issues/{issue_id}/attachments"
headers = {"Authorization": f"Bearer {YOUTRACK_API_KEY}","Accept": "application/json"}
files = [("file", (file_name, file))]
response = await, files=files, headers=headers)

Official comment

Hello Sergii,

Thank you for the question.

To make an attachment internal, you need to limit its visibility in the body of your request. For example:

"visibility": {
    "$type": "LimitedVisibility",
    "permittedGroups": [
            "ringId": "6f81ed24-f68c-41aa-a355-9d4db78d49c3"

In the “ringId” attribute, provide the ID of the target group that needs to have access to the attachment.

For reference:


Yes, it works. Thanks!


Please sign in to leave a comment.