---
title: "Make a preview permanent: mint a new site from its files (name) or replace an existing site’s content (siteId)"
method: POST
path: "/previews/{id}/promote"
tags: ["Previews"]
---

# Make a preview permanent: mint a new site from its files (name) or replace an existing site’s content (siteId)

`POST /previews/{id}/promote`

## Request

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

## Path parameters

- `id` string, required

## Request body

- PromotePreviewDto
  - `name` string: Mode A: name for the NEW site the preview becomes (may come back suffixed). Pass exactly one of name / siteId.
  - `siteId` string, uuid: Mode B: id of the EXISTING site whose content the preview replaces (address and settings unchanged). Pass exactly one of name / siteId.

## Response `200`

- APIPromotePreviewResponse
  - `siteId` string, required
  - `subdomain` string, required
  - `url` string, required: The permanent address the preview became
  - `status` string, required: `inactive` means the live-site cap held it back from serving
  - `previewId` string, required
  - `previewUrl` string, required: The old preview address — now a permanent redirect to url

## Other responses

- `400`: Pass exactly one of name / siteId (name must be shape-valid)
- `401`: Not authenticated
- `403`: Not the preview (or site) owner
- `404`: Preview or target site not found
- `409`: Preview already promoted, or has no published files

---

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