---
title: "Get a download link for a file"
method: GET
path: "/v1/mailboxes/{mailbox_id}/files/{file_id}/download"
tags: ["Files"]
---

# Get a download link for a file

`GET /v1/mailboxes/{mailbox_id}/files/{file_id}/download`

## Request

- Base URL: `https://api.revdoku.com`
- URL: `https://api.revdoku.com/v1/mailboxes/{mailbox_id}/files/{file_id}/download`
- Auth: HTTP bearer

Returns a temporary link and marks this version read. Send version_id for an older version.

## Path parameters

- `mailbox_id` string, required
- `file_id` string, required

## Query parameters

- `version_id` string
- `account_id` string
- `reason` string, nullable: Optional purpose for this action. AI agents should explain intentional reads and changes when known; omit when unknown. Do not include secrets, file contents, or transcripts.

## Response `200`

Success

- object
  - `success` true, required
  - `data` FileDownload, required
    - `download` Download, required: Temporary download link. Fetch url without an API key. Request a new link after it expires.
      - `url` string, uri, required
      - `filename` string, required
      - `content_type` string, nullable, required
      - `expires_in` 900, required: Seconds until the link expires.
      - `size_bytes` integer, required
    - `version` FileVersion, required
      - `id` string, required
      - `file_id` string, required
      - `name` string
      - `mime_type` string
      - `sha256` string
      - `reason` string, nullable
      - `created_by_system` string
      - `deleted` boolean: True for the version that records a deletion.
      - `ready` boolean
      - `has_text` boolean
      - `version_number` integer, required
      - `byte_size` integer
      - `created_at` string, date-time
      - `created_by` FileActor
        - `id` string
        - `name` string
        - `email` string
      - `updated_by` FileActor
        - `id` string
        - `name` string
        - `email` string
      - `created_by_agent` object
      - `updated_by_agent` object
      - `created_by_api_key` object
      - `updated_by_api_key` object
      - `read` boolean
      - `read_at` string, date-time, nullable
      - `read_by` FileActor
        - `id` string
        - `name` string
        - `email` string
      - `read_by_api_key` FileKey
        - `id` string
        - `label` string
        - `token_type` string
    - `previously_read` boolean: Read state before this request, when tracking succeeded.

## Other responses

- `default`: Request failed. See error.code. Any 429 or 503 response with Retry-After (for example 503 EMAIL_LABELING_PENDING or 503 EMAIL_INDEX_BUILDING): wait that many seconds, then try the read again. 429 EMAIL_SEND_RATE_LIMITED has no Retry-After. Never retry EMAIL_LOOP_DETECTED.

---

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