---
title: "Download a received attachment"
method: GET
path: "/v1/emails/received/{id}/attachments/{attachmentId}"
tags: ["Emails"]
---

# Download a received attachment

`GET /v1/emails/received/{id}/attachments/{attachmentId}`

## Request

- Base URL: `https://api.honkio.ca`
- URL: `https://api.honkio.ca/v1/emails/received/{id}/attachments/{attachmentId}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Requires `emails:r`.

## Path parameters

- `id` string, required
- `attachmentId` string, required

## Response `200`

The attachment bytes, with Content-Disposition set to the original filename.

## Other responses

- `401`: Missing, invalid, revoked or expired API key.
- `402`: The account has no balance, or a LIVE key was used before the first top-up.
- `403`: The API key lacks the permission this operation requires, or the account is suspended or closed.
- `404`: RECEIVED_EMAIL_NOT_FOUND: no received email with that id on this account. A test key finds only messages received on the test managed address.
- `410`: ATTACHMENT_EXPIRED: the raw message or attachment is no longer stored (40-day retention).
- `429`: Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).
- `500`: Unexpected server error.

---

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