---
title: "Read the raw UTF-8 contents of a preview file"
method: GET
path: "/previews/{id}/files/content"
tags: ["Previews"]
---

# Read the raw UTF-8 contents of a preview file

`GET /previews/{id}/files/content`

## Request

- Base URL: `https://api.nippy.host`
- URL: `https://api.nippy.host/previews/{id}/files/content`
- Auth: `bearer` (a scheme the document does not define)

## Path parameters

- `id` string, required

## Query parameters

- `path` string, required

## Response `200`

- APISiteFileContentResponse
  - `path` string, required: Relative path within the site
  - `content` string, required: Raw UTF-8 file contents

## Other responses

- `400`: Missing or invalid path
- `401`: Not authenticated
- `403`: Not the preview owner
- `404`: Preview or file not found
- `409`: Preview has no published files yet, or was promoted
- `413`: File is too large to read

---

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