---
title: "Get an attachment download URL"
method: GET
path: "/email/received/{id}/attachments/{attachmentId}"
tags: ["Inbound emails"]
---

# Get an attachment download URL

`GET /email/received/{id}/attachments/{attachmentId}`

## Request

- Base URL: `https://www.unitpost.com/api/v1`
- URL: `https://www.unitpost.com/api/v1/email/received/{id}/attachments/{attachmentId}`
- Auth: HTTP bearer

Get a short-lived, signed URL for downloading one inbound attachment's bytes. Fetch the URL and download promptly — it expires quickly (the expiry is included in the response). Find attachment ids on the message via [Retrieve a received email](#get-email-received-id). Requires the `emails:read` capability.

## Response `200`

A signed download URL.

- ReceivedAttachmentUrl
  - `object` 'received_attachment_url', required
  - `url` string, required: A signed, expiring URL to download the attachment bytes.
  - `expires_at` string, required: ISO 8601 expiry of the signed URL (~5 minutes out).

## Other responses

- `401`: Missing or invalid API key.
- `403`: Insufficient scope.
- `404`: Attachment not found.
- `503`: Attachment storage is not configured / unavailable.

---

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