---
title: "Every file a site is serving."
method: GET
path: "/api/v1/sites/{id}/files"
tags: ["files"]
---

# Every file a site is serving.

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

## Request

- Base URL: `https://harvis.dev`
- URL: `https://harvis.dev/api/v1/sites/{id}/files`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `better-auth.session_token`

Paths are relative to the site root. To read a file's contents, fetch it from the site's own URL — it is a public web page.

## Path parameters

- `id` string, required

## Response `200`

Every file a site is serving.

- SiteFileList
  - `files` SiteFile[], required
    - `path` string, required: Relative to the site root, e.g. assets/app.css.
    - `contentType` string, required
    - `size` integer, required

## Other responses

- `401`: `unauthorized`
- `403`: `suspended`
- `404`: `siteNotFound`

---

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