---
title: "Confirm the upserts landed in R2, apply the delta to live, and re-publish"
method: POST
path: "/sites/{id}/revisions/{batchId}/finalize"
tags: ["Sites"]
---

# Confirm the upserts landed in R2, apply the delta to live, and re-publish

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

## Request

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

## Path parameters

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

## Response `200`

Changes are now live

- APIAuthenticatedFinalizeUploadResponse
  - `status` 'live' | 'inactive', required: `live` when published; `inactive` when the account is at its plan’s live-site limit (the upload completed but is not being served yet).
  - `siteId` string, required: UUID of the Site that now serves these files
  - `subdomain` string, required
  - `url` string, required: Public URL the site is served from

## Other responses

- `400`: Batch is not a revision, not pending, expired, or some upserts are missing
- `401`: Not authenticated
- `403`: You do not own this batch
- `404`: Batch or site not found
- `409`: Site is not live

---

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