---
title: "Get a download URL"
method: GET
path: "/api/v1/files/{fileId}/download"
tags: ["Files"]
---

# Get a download URL

`GET /api/v1/files/{fileId}/download`

## Request

- Base URL: `https://app.khotan.com`
- URL: `https://app.khotan.com/api/v1/files/{fileId}/download`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Returns a short-lived presigned URL (attachment disposition) for a ready file; fetch the bytes directly from that URL before it expires. The URL grants access to the file contents — treat it as a secret and request a fresh one per download. Responds 409 until the file is ready.

## Path parameters

- `fileId` string, required

## Response `200`

The presigned download URL and its expiry.

- object
  - `url` string, required: Short-lived presigned GET URL with attachment disposition.
  - `expiresAt` string, required

## Other responses

- `401`: Authentication is missing or invalid.
- `404`: The resource was not found.
- `409`: Response.
- `429`: Too many requests; retry after the indicated delay.

---

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