---
title: "Download Version File"
method: GET
path: "/api/v1/download-version"
tags: ["Chat"]
---

# Download Version File

`GET /api/v1/download-version`

## Request

- Base URL: `https://backend.caspr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://backend.caspr.ai/api/v1/download-version`
- Auth: OAuth 2
  - Password
  - Token URL: `token`

Download a specific file type from a specific version of a report.
Returns a presigned URL for direct download.

Args:
    report_id: The ID of the report
    version: The version number to download
    file_type: The type of file to download (pdf, html, md, pptx, info_pdf)
    user_id: Authenticated user ID (from token)

Returns:
    Presigned URL for downloading the file (valid for 1 hour)

## Query parameters

- `report_id` string, required
- `version` integer, required
- `file_type` string, required

## Response `200`

Successful Response

- VersionDownloadResponse
  - `success` boolean, required
  - `presigned_url` string, nullable
  - `report_id` string, nullable
  - `version` integer, nullable
  - `file_type` string, nullable
  - `expires_in` integer, nullable

## Other responses

- `401`: Unauthorized
- `404`: Not Found
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

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