---
title: "Toggle a site between live and inactive"
method: PATCH
path: "/sites/{id}/status"
tags: ["Sites"]
---

# Toggle a site between live and inactive

`PATCH /sites/{id}/status`

## Request

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

Owner-only toggle for the user-driven `live` / `inactive` states. Updates the KV record so the Worker reflects the new state on the next request. Other statuses (awaiting_verification, suspended) are not user-toggleable.

## Path parameters

- `id` string, required

## Request body

- UpdateSiteStatusDto
  - `status` 'live' | 'inactive', required: Target status. Only `live` and `inactive` are owner-toggleable.

## Response `200`

- APISiteStatusResponse
  - `id` string, required: Site UUID
  - `status` 'pending' | 'awaiting_verification' | 'live' | 'inactive' | 'suspended', required

## Other responses

- `400`: Invalid status value
- `401`: Not authenticated
- `403`: You do not own this site
- `404`: Site not found
- `409`: Site is in a state the owner cannot toggle

---

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