---
title: "GET /api/attachments/{attachment}"
method: GET
path: "/api/attachments/{attachment}"
tags: ["AttachmentService"]
---

# GET /api/attachments/{attachment}

`GET /api/attachments/{attachment}`

## Request

- The document declares no server URL.
- Auth: none declared

GetAttachment gets an attachment by name. An unlinked attachment is visible only to its uploader and admins;
 a linked attachment follows the read access of its memo.

## Path parameters

- `attachment` string, required

## Response `200`

OK

- Attachment: Attachment is a file uploaded by a user, optionally linked to a memo.
  - `name` string: Identifier. The resource name of the attachment. Format: attachments/{attachment}
  - `creator` string: Output only. The user who uploaded the attachment, which may differ from the creator of the linked memo. Format: users/{user}
  - `filename` string, required: Required. The filename of the attachment.
  - `type` string, required: Required. The MIME type of the attachment. If empty on create, the service detects it from the filename and content.
  - `content` string, bytes: Input only. The content of the attachment.
  - `externalLink` string: Optional. The external link of the attachment. Set only for externally stored attachments; ignored on create.
  - `motionMedia` MotionMedia: MotionMedia links the parts of a motion photo.
    - `family` 'MOTION_MEDIA_FAMILY_UNSPECIFIED' | 'APPLE_LIVE_PHOTO' | 'ANDROID_MOTION_PHOTO', enum: The motion photo format.
    - `role` 'MOTION_MEDIA_ROLE_UNSPECIFIED' | 'STILL' | 'VIDEO' | 'CONTAINER', enum: The part this attachment plays in the motion photo.
    - `groupId` string: Groups the attachments that belong to one motion photo. Required for client-supplied Apple Live Photo metadata; for an Android motion photo it is the attachment's own ID.
    - `presentationTimestampUs` string: Presentation timestamp of the still frame within the video, in microseconds.
    - `hasEmbeddedVideo` boolean: Whether the file embeds the motion video, as in an Android motion photo container.
  - `mediaMetadata` MediaMetadata: MediaMetadata contains normalized metadata explicitly supplied by a client. The service validates and stores this data but does not extract it from the media file.
    - `width` integer: Display-oriented width in pixels. Must be provided with height.
    - `height` integer: Display-oriented height in pixels. Must be provided with width.
    - `photo` PhotoMetadata: PhotoMetadata is metadata recorded by the source of a photo.
      - `captureTime` MediaCaptureTime: MediaCaptureTime is the local time at which media was captured.
        - `localDateTime` string: Local date and time without a time zone, formatted as YYYY-MM-DDTHH:mm:ss[.fraction].
        - `utcOffset` string: UTC offset formatted as Z or +/-HH:MM.
      - `location` MediaLocation: MediaLocation is the geographic location at which media was captured.
        - `latitude` number, double: WGS84 latitude in decimal degrees. Must be provided with longitude.
        - `longitude` number, double: WGS84 longitude in decimal degrees. Must be provided with latitude.
        - `altitudeMeters` number, double: Signed altitude in meters relative to sea level.
      - `sourceExifOrientation` integer: EXIF orientation value from 1 through 8 as recorded by the source file. This value is informational and must not be reapplied to the stored attachment; width and height already describe its display-oriented dimensions.
      - `cameraMake` string: The camera manufacturer.
      - `cameraModel` string: The camera model.
      - `lensModel` string: The lens model.
      - `fNumber` number, double: The aperture f-number.
      - `exposureTimeSeconds` number, double: The exposure time in seconds.
      - `iso` integer: The ISO sensitivity.
      - `focalLengthMm` number, double: The focal length in millimeters.
    - `video` VideoMetadata: VideoMetadata is metadata recorded by the source of a video.
      - `durationSeconds` number, double: The duration of the video in seconds.
  - `memo` string: Optional. The memo the attachment is linked to. On create, the caller must be able to manage the memo. Format: memos/{memo}
  - `size` string: Output only. The size of the stored content in bytes.
  - `createTime` string, date-time: Output only. The creation time.

## Other responses

- `default`: Default error response

## Changes

- **2026-10-08** `1846a777b0ef`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/usememos/apis/untitled-api/changes/api/attachments/:attachment/get.md)

---

[API](https://skmtc.dev/usememos/apis/untitled-api.md) - [All operations](https://skmtc.dev/usememos/apis/untitled-api/llms.txt) - [OpenAPI document](https://skmtc.dev/usememos/apis/untitled-api/revisions/f587355e35b4?raw)
