---
title: "Replace every file of a site from a zip archive sent as the raw request body."
method: POST
path: "/api/v1/sites/{id}/deploy/zip"
tags: ["sites"]
---

# Replace every file of a site from a zip archive sent as the raw request body.

`POST /api/v1/sites/{id}/deploy/zip`

## Request

- Base URL: `https://harvis.dev`
- URL: `https://harvis.dev/api/v1/sites/{id}/deploy/zip`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `better-auth.session_token`

The same operation as sites.deploy, for callers that would rather not assemble a multipart body: `curl --data-binary @site.zip -H 'Content-Type: application/zip'`. A single shared top-level folder inside the archive is stripped.

## Path parameters

- `id` string, required

## Query parameters

- `name` string

## Response `200`

Replace every file of a site from a zip archive sent as the raw request body.

- DeployResult
  - `site` Site, required
    - `id` string, required
    - `name` string, required
    - `subdomain` string, required
    - `url` string, required: Where the site is served, e.g. https://sunny-otter-42.harvis.page.
    - `entrypoint` string, required: The file served at the site's root.
    - `fileCount` integer, required
    - `totalSize` integer, required: Bytes stored, summed over every file.
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
  - `replaced` integer, required: How many files the site now serves.

## Other responses

- `400`: `invalidRequest`, `noFiles`
- `401`: `unauthorized`
- `403`: `suspended`
- `404`: `siteNotFound`
- `413`: `tooLarge`, `tooManyFiles`

---

[API](https://skmtc.dev/harvis/apis/harvis-dev-api.md) · [All operations](https://skmtc.dev/harvis/apis/harvis-dev-api/llms.txt) · [OpenAPI document](https://skmtc.dev/harvis/apis/harvis-dev-api/revisions/b06f9e2deebb?raw)
