---
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

---

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