---
title: "Download an attachment"
method: GET
path: "/v1/messages/{id}/attachments/{attachment_id}"
tags: ["mail"]
---

# Download an attachment

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

## Request

- Base URL: `https://botmail.pro`
- URL: `https://botmail.pro/v1/messages/{id}/attachments/{attachment_id}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `bm_session`

Scope: read. Pending claim keys allowed. Served with the attachment's
Content-Type and an `attachment` Content-Disposition. 413
attachment_too_large over 25 MB.

## Path parameters

- `id` string, required
- `attachment_id` string, required

## Query parameters

- `disposition` 'inline'

## Response `200`

Attachment bytes with the stored Content-Type.

## Other responses

- `401`: Missing or invalid credentials (`unauthorized`, `invalid_token`).
- `403`: The credential can't do this (`forbidden`, `csrf`, `account_inactive`, …). Missing scopes are listed in `details.required_scope`; pending keys get a hint to wait for the claim.
- `404`: Not found or not accessible with this credential.
- `413`: Too large (`message_too_large` over 10 MB, `attachment_too_large` over 25 MB).

---

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