---
search:
  tags:
    - sites
    - POST
seo:
  description: >-
    Publishes the files of the request body, a tar (application/x-tar) or zip…
    Reference for the POST /v1/sites/{site}/upload endpoint in the pols.so API.
sidebar:
  label: Publish uploaded files as the site's new live version
  badge: POST
title: Publish uploaded files as the site's new live version
type: openapi-operation
---
Publishes the files of the request body, a tar
(`application/x-tar`) or zip (`application/zip`) archive, as a new
version of the site and makes it live, without a sandbox. With
`create=true`, a site the org does not have yet is made, named
`{site}`, or with a generated name when `{site}` is `-`; the org's
own site of that name is published to as without it. A new site is
private unless `access` says otherwise; an existing site keeps its
own, and an `access` that differs from it is 409 `conflict`.

Only regular files are published: symbolic and hard links, devices,
files and directories whose names start with a dot (except
`.well-known/`) and paths with a `..` are left out and counted in
`skipped`. A zip whose files all sit in one folder publishes that
folder's content. A version holds at most 10,000 files and 100 MiB,
and the org's sites together at most 2 GiB, by default (403
`quota_exceeded`); a zip may hold at most twice as many entries as
files. An archive larger than the version's bytes plus 4 KiB for
each file it may hold (140 MiB by default) is 413. A file holding
the value of one of the org's vault entries is refused (400
`bad_request`). A taken-down site cannot be published to (403
`forbidden`). An org publishes at most 30 versions an hour, uploads
and publishes from sandboxes together (429 `rate_limited`).

`POST /v1/sites/{site}/upload`
