---
title: "Download an attachment of a sent email"
method: GET
path: "/emails/{id}/attachments/{index}"
tags: ["Emails"]
---

# Download an attachment of a sent email

`GET /emails/{id}/attachments/{index}`

## Request

- Base URL: `https://api.poststack.dev`
- URL: `https://api.poststack.dev/emails/{id}/attachments/{index}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://poststack.dev/oauth/authorize`
    - Token URL: `https://poststack.dev/oauth/token`
- TypeScript: <https://skmtc.dev/poststack/apis/poststack-api/docs/emails/:id/attachments/:index/get.ts> (a function with typed inputs; its response is checked against the schema)

`index` is the attachment’s zero-based position in the `attachments` array of `GET /emails/{id}` — the order the send request listed them in.

## Path parameters

- `id` string, required
- `index` integer, required

## Response `200`

Raw bytes with the attachment’s `Content-Type` and `Content-Disposition`.

## Other responses

- `400`: Validation failed — `error` names each offending field (`field: message`).
- `401`: Missing, malformed or unknown credentials (`WWW-Authenticate: Bearer …` is set).
- `403`: The credential lacks the `email:read` scope (body `{ error: "insufficient_scope", required, missing }`), or the team is suspended.
- `404`: No such email, or it has no attachment at that index.

## Changes

- **2026-10-06** `542ca913158c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/poststack/apis/poststack-api/changes/emails/:id/attachments/:index/get.md)

---

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