Developer Portal for YouTrack and Hub Help

Attachment

Represents an attachment entity. Use it in an import script.

Extends SubItem.

Properties

Name

Type

Description

author

User

The user who attached the file to the issue.

charset

string

The charset type of the file. null by default. Applicable to text attachments only.

created

string

The date and time when the attachment was created. The expected string format is one of those returned by the getTimestampFormats function.

fileName

string

The name of the attachment file.

id

string

The ID of the attachment.

mimeType

string

The MIME type of the file.

type

'attachment'

Identifies this object as an attachment. YouTrack infers 'attachment' for values in DocumentFields.attachments, so you can omit this property.

updated

string

The date and time the attachment was last updated.

The same as created by default.

The expected string format is one of those returned by the getTimestampFormats function.

updatedBy

User

The user who last updated the file. The same as author by default.

visibleToGroups

Array.< UserGroup >

The user groups that can view the attachment. null by default.

visibleToUsers

Array.< User >

The users who can view the attachment.

If none of the visibleToUsers and the visibleToGroups parameters are specified, the attachment becomes visible to issue or article readers.

null by default.

10 September 2026