---
title: "Get a short-lived presigned URL for the mailbox's `.mv2` memory file"
method: GET
path: "/v1/mailboxes/{mailbox_id}/memory/download"
tags: ["memory"]
---

# Get a short-lived presigned URL for the mailbox's \`.mv2\` memory file

`GET /v1/mailboxes/{mailbox_id}/memory/download`

## Request

- Base URL: `https://mbag.ai/api`
- URL: `https://mbag.ai/api/v1/mailboxes/{mailbox_id}/memory/download`
- Auth: HTTP bearer

## Path parameters

- `mailbox_id` integer, required

## Response `200`

Presigned GET URL, valid for `expires_in_seconds`.

- PresignedDownloadResponse
  - `expires_in_seconds` integer, required
  - `url` string, required

## Other responses

- `401`: Missing or invalid credential, raised by the `ApiKeyAuth` extractor (`backend/src/api_keys.rs`) before the handler runs: no `Authorization` header, a non-`Bearer` scheme, a key that doesn't hash-match any row, or a key whose status isn't `active`. A header that isn't valid UTF-8, has no scheme token, or has `Bearer` with no key value returns 400 with this same JSON shape instead of 401.
- `404`: Mailbox not found (or not owned), or no memory file has been uploaded yet. Plain-text body.
- `500`: Database error checking mailbox ownership. Plain-text body.
- `502`: Object storage error checking existence or presigning the URL. Plain-text body.

---

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