---
title: "downloadS3File"
method: POST
path: "/v1/files:downloadS3"
tags: ["File"]
---

# downloadS3File

`POST /v1/files:downloadS3`

Generate a pre-signed download URL for a file using its S3 reference.

Use this endpoint when you have the S3 bucket and key but not the file entity ID.

## Query parameters

- `s3_key` string, required
- `s3_bucket` string, required
- `attachment` boolean

## Response `200`

Pre-signed download URL

- object
  - `download_url` string, uri — Pre-signed S3 URL valid for downloading the file

## Other responses

- `400` — Invalid request parameters or payload
- `401` — Authentication required or invalid credentials
- `403` — Insufficient permissions to access the resource
- `404` — The requested resource was not found
- `500` — An unexpected error occurred on the server

## Changes

> 6 revisions in range; 2 could not be searched.

- **2026-07-13** `1bc035bea396` — 1 info
  - added the non-success response with the status `403`

[Change history](https://skmtc.dev/epilot/apis/file-api/changes/v1/files:downloadS3/post.md)

---

[API](https://skmtc.dev/epilot/apis/file-api.md) · [All operations](https://skmtc.dev/epilot/apis/file-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/epilot/file-api/revisions/4d61b97f1e97/schema)
