---
title: "Download attachment"
method: GET
path: "/v1/inbox/{uid}/attachments/{part_index}"
tags: ["Inbox"]
---

# Download attachment

`GET /v1/inbox/{uid}/attachments/{part_index}`

## Request

- Base URL: `https://api.winnr.app`
- URL: `https://api.winnr.app/v1/inbox/{uid}/attachments/{part_index}`
- Auth: HTTP bearer

Get a presigned download URL for an inbox attachment. Checks S3
cache first; if not cached, fetches from IMAP and caches to S3.
The presigned URL is valid for 5 minutes.

## Path parameters

- `uid` string, required
- `part_index` integer, required

## Query parameters

- `mailbox` string, required

## Response `200`

Presigned download URL and metadata

- object
  - `meta` Meta
    - `request_id` string
    - `timestamp` string, date-time
  - `data` AttachmentDownload
    - `download_url` string, uri: Presigned S3 download URL (valid for 5 minutes)
    - `filename` string
    - `content_type` string
    - `size` integer

## Other responses

- `401`: Authentication required or token invalid

---

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