---
title: "Download an attachment"
method: GET
path: "/v1/inboxes/{id}/messages/{messageId}/attachments/{aid}"
tags: ["Messages"]
---

# Download an attachment

`GET /v1/inboxes/{id}/messages/{messageId}/attachments/{aid}`

## Request

- Base URL: `https://anjal.app`
- URL: `https://anjal.app/v1/inboxes/{id}/messages/{messageId}/attachments/{aid}`
- Auth: API key in header `X-API-Key`

Streams the raw attachment bytes with the original `Content-Type` and `Content-Disposition` headers.

A PNG, JPEG, GIF or WebP is read for hidden instructions before an API key
or agent is given it, because a model can look at an image the way it reads
a body. If the text in it reads like instructions aimed at an AI, or it
cannot be checked, this returns `403 IMAGE_HELD` and a person can still open
it in the dashboard. `503 IMAGE_HELD` means it could not be checked right now
and is worth retrying. A signed-in person in the dashboard is never held, and
neither is an inbox or account that has turned mail protection off.

## Response `200`

Attachment bytes

## Other responses

- `403`: The image is held (`IMAGE_HELD`), or its message is quarantined (`QUARANTINED`)
- `503`: The image could not be checked right now (`IMAGE_HELD`); retry shortly

---

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