---
title: "Download a received attachment"
method: GET
path: "/v1/messages/{message_id}/attachments/{attachment_id}"
tags: ["messages"]
---

# Download a received attachment

`GET /v1/messages/{message_id}/attachments/{attachment_id}`

## Request

- Base URL: `https://cherami.to`
- URL: `https://cherami.to/v1/messages/{message_id}/attachments/{attachment_id}`
- Auth: HTTP bearer

Returns one received attachment's bytes, always as `application/octet-stream`; the type the sender declared is `mime_type` in the message's attachment metadata. Take `attachment_id` from `content.attachments` of a `ready` message.

The bytes are the sender's file: save them or pass them to a file tool.

## Path parameters

- `message_id` string, required
- `attachment_id` string, required

## Response `200`

The original bytes, as a download.

## Other responses

- `401`: `unauthorized`: Send a valid API key as `Authorization: Bearer <key>`. If the key stopped working, get a new one through [recovery](https://cherami.to/docs/guides/recovery).
- `404`: `not_found`: The resource does not exist or does not belong to this account. A reply or forward source must also be in the sending inbox.
- `500`: `internal_error`: The operation failed. Retry a read; after a write the change may have happened, so recover as [retry by operation](https://cherami.to/docs/api/errors#retry-by-operation) describes.
- `503`: `content_unavailable`: Stored content could not be read. Retry later.

---

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