---
title: "Apply a staged revision to the live preview and reset its 24-hour clock"
method: POST
path: "/previews/{id}/revisions/{batchId}/finalize"
tags: ["Previews"]
---

# Apply a staged revision to the live preview and reset its 24-hour clock

`POST /previews/{id}/revisions/{batchId}/finalize`

## Request

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

## Path parameters

- `id` string, required
- `batchId` string, required

## Response `200`

Revision applied — same URL, fresh expiry

- APIFinalizePreviewResponse
  - `previewId` string, required
  - `slug` string, required
  - `url` string, required: Public URL the preview now serves at
  - `expiresAt` string, date-time, required: When the preview stops serving (24 h from now; every revision resets it)

## Other responses

- `400`: Batch invalid, expired, or files missing
- `401`: Not authenticated
- `403`: Not the preview owner
- `404`: Preview or batch 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)
