---
title: "Confirm files have landed in R2, promote to live, and return the new site"
method: POST
path: "/sites/uploads/finalize"
tags: ["Uploads"]
---

# Confirm files have landed in R2, promote to live, and return the new site

`POST /sites/uploads/finalize`

## Request

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

## Request body

- FinalizeUploadDto
  - `uploadBatchId` string, uuid, required: UploadBatch id returned from /uploads/init

## Response `200`

Site is 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 already finalized, expired, or some expected files are missing
- `401`: Not authenticated
- `403`: The batch does not belong to the authenticated user
- `404`: Upload batch id 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)
