---
title: "Download contents of a given file."
method: GET
path: "/v1/sites/{id}/files/download"
tags: ["Files"]
---

# Download contents of a given file.

`GET /v1/sites/{id}/files/download`

For a given file on a site, retrieve and save contents of file.

## Path parameters

- `id` integer, required — ID of the Site you are interacting with

## Query parameters

- `filename` string, required
- `directory` string

## Response `200`

OK

## Other responses

- `400` — Bad Request
- `401` — Authentication failed
- `403` — Not authorized to access endpoint
- `404` — Given site not found for user
- `405` — Invalid input
- `500` — Internal error

---

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