---
title: "Update the downloads policy for a site"
method: PATCH
path: "/sites/{id}/downloads-policy"
tags: ["Sites"]
---

# Update the downloads policy for a site

`PATCH /sites/{id}/downloads-policy`

## Request

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

Persists the owner preference and re-publishes the KV record so the worker picks up the new `canDownload` value on the next request.

## Path parameters

- `id` string, required

## Request body

- UpdateDownloadsPolicyDto
  - `policy` 'auto' | 'on' | 'off', required: `auto` defers to a content heuristic. `on` forces downloads on; `off` forces them off.

## Response `200`

- APIDownloadsPolicyResponse
  - `id` string, required: Site UUID
  - `downloadsPolicy` 'auto' | 'on' | 'off', required

## Other responses

- `400`: Invalid policy value
- `401`: Not authenticated
- `403`: You do not own this site
- `404`: Site not found

---

[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)
