---
title: "Get attachment by id"
method: GET
path: "/attachments/{id}"
tags: ["Attachment"]
---

# Get attachment by id

`GET /attachments/{id}`

Returns a specific attachment.

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
Permission to view the attachment's container.

## Path parameters

- `id` string, required

## Query parameters

- `version` integer
- `include-labels` boolean
- `include-properties` boolean
- `include-operations` boolean
- `include-versions` boolean
- `include-version` boolean
- `include-collaborators` boolean

## Response `200`

Returned if the requested attachment is returned.

- object
  - `id` string — ID of the attachment.
  - `status` 'current' | 'draft' | 'archived' | 'historical' | 'trashed' | 'deleted' | 'any' — The status of the content.
  - `title` string — Title of the comment.
  - `createdAt` string, date-time — Date and time when the attachment was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
  - `pageId` string — ID of the containing page. Note: This is only returned if the attachment has a container that is a page.
  - `blogPostId` string — ID of the containing blog post. Note: This is only returned if the attachment has a container that is a blog post.
  - `customContentId` string — ID of the containing custom content. Note: This is only returned if the attachment has a container that is custom content.
  - `mediaType` string — Media Type for the attachment.
  - `mediaTypeDescription` string — Media Type description for the attachment.
  - `comment` string — Comment for the attachment.
  - `fileId` string — File ID of the attachment. This is the ID referenced in `atlas_doc_format` bodies and is distinct from the attachment ID.
  - `fileSize` integer — File size of the attachment.
  - `webuiLink` string — WebUI link of the attachment.
  - `downloadLink` string — Download link of the attachment.
  - `version` Version
    - `createdAt` string, date-time — Date and time when the version was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
    - `message` string — Message associated with the current version.
    - `number` integer — The version number.
    - `minorEdit` boolean — Describes if this version is a minor version. Email notifications and activity stream updates are not created for minor versions.
    - `authorId` string — The account ID of the user who created this version.
  - `labels` object
    - `results` Label[]
      - `id` string — ID of the label.
      - `name` string — Name of the label.
      - `prefix` string — Prefix of the label.
    - `meta` OptionalFieldMeta
      - `hasMore` boolean — Indicates if there are more available results that can be fetched.
      - `cursor` string — A token that can be used in the query parameter of the endpoint returned in the `_links` property to retrieve the next set of results.
    - `_links` OptionalFieldLinks
      - `self` string — A relative URL that can be used to fetch results beyond what this include parameter retrieves.
  - `properties` object
    - `results` ContentProperty[]
      - `id` string — ID of the property
      - `key` string — Key of the property
      - `value` unknown
      - `version` Version
        - `createdAt` string, date-time — Date and time when the version was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
        - `message` string — Message associated with the current version.
        - `number` integer — The version number.
        - `minorEdit` boolean — Describes if this version is a minor version. Email notifications and activity stream updates are not created for minor versions.
        - `authorId` string — The account ID of the user who created this version.
    - `meta` OptionalFieldMeta
      - `hasMore` boolean — Indicates if there are more available results that can be fetched.
      - `cursor` string — A token that can be used in the query parameter of the endpoint returned in the `_links` property to retrieve the next set of results.
    - `_links` OptionalFieldLinks
      - `self` string — A relative URL that can be used to fetch results beyond what this include parameter retrieves.
  - `operations` object
    - `results` Operation[]
      - `operation` string — The type of operation.
      - `targetType` string — The type of entity the operation type targets.
    - `meta` OptionalFieldMeta
      - `hasMore` boolean — Indicates if there are more available results that can be fetched.
      - `cursor` string — A token that can be used in the query parameter of the endpoint returned in the `_links` property to retrieve the next set of results.
    - `_links` OptionalFieldLinks
      - `self` string — A relative URL that can be used to fetch results beyond what this include parameter retrieves.
  - `versions` object
    - `results` Version[]
      - `createdAt` string, date-time — Date and time when the version was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
      - `message` string — Message associated with the current version.
      - `number` integer — The version number.
      - `minorEdit` boolean — Describes if this version is a minor version. Email notifications and activity stream updates are not created for minor versions.
      - `authorId` string — The account ID of the user who created this version.
    - `meta` OptionalFieldMeta
      - `hasMore` boolean — Indicates if there are more available results that can be fetched.
      - `cursor` string — A token that can be used in the query parameter of the endpoint returned in the `_links` property to retrieve the next set of results.
    - `_links` OptionalFieldLinks
      - `self` string — A relative URL that can be used to fetch results beyond what this include parameter retrieves.
  - `_links` object
    - `webui` string — Web UI link of the content.
    - `download` string — Download link of the content.
    - `base` string — Base url of the Confluence site.

## Other responses

- `400` — Returned if an invalid request is provided.
- `401` — Returned if the authentication credentials are incorrect or missing from the request.
- `404` — Returned if the calling user does not have permission to view the requested attachment or the attachment was not found.

---

[API](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api-v2.md) · [All operations](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/the-confluence-cloud-rest-api-v2/revisions/c4bd1ed570f2/schema)
