---
title: "Get a message attachment"
method: GET
path: "/v1/mailboxes/{id}/messages/{messageId}/attachments/{attachmentId}"
tags: ["Mailboxes"]
---

# Get a message attachment

`GET /v1/mailboxes/{id}/messages/{messageId}/attachments/{attachmentId}`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/mailboxes/{id}/messages/{messageId}/attachments/{attachmentId}`
- Auth: API key in header `x-api-key`

Returns a short-lived download URL for one of the message's attachments.

## Path parameters

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

## Response `200`

MailboxDownloadUrl

- MailboxDownloadUrl
  - `url` string, required
  - `expiresAt` string, required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `404`: ResourceNotFoundError
- `422`: ValidationError
- `500`: InternalError
- `504`: GatewayTimeoutError

---

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