---
title: "Serve site file"
method: GET
path: "/api/sites/{ns}/{id}/files/{filePath}"
tags: ["Sites"]
---

# Serve site file

`GET /api/sites/{ns}/{id}/files/{filePath}`

## Request

- Base URL: `https://brewpage.app`
- URL: `https://brewpage.app/api/sites/{ns}/{id}/files/{filePath}`
- Auth: one of:
  - none
  - API key in header `X-Owner-Token`
  - API key in header `X-Password`

Serves an individual file from the site with correct content type

## Path parameters

- `ns` string, required
- `id` string, required
- `filePath` string, required

## Query parameters

- `p` string

## Headers

- `X-Password` string
- `User-Agent` string
- `X-Owner-Token` string
- `Range` string

## Response `200`

File content

- object

## Other responses

- `403`: Wrong password
- `404`: Site or file not found
- `410`: Public publication deleted or expired

## Changes

- **2026-11-21** `19a6c5561e70`: 3 info
  - added the optional property `level` to the response with the `403` status
  - added the optional property `level` to the response with the `404` status
  - added the optional property `level` to the response with the `410` status
- **2026-11-11** `957711dab4b5`: 6 info
  - added the optional property `challengeUrl` to the response with the `403` status
  - added the optional property `challengeUrl` to the response with the `404` status
  - added the optional property `challengeUrl` to the response with the `410` status
  - added the optional property `siteKey` to the response with the `403` status
  - …2 more
- **2026-11-10** `e34e8877bb89`: 6 info
  - added the optional property `reason` to the response with the `403` status
  - added the optional property `reason` to the response with the `404` status
  - added the optional property `reason` to the response with the `410` status
  - added the optional property `used` to the response with the `403` status
  - …2 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/brewpage/apis/brewpage-api/changes/api/sites/:ns/:id/files/:filePath/get.md)

---

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