# Build a static site from source sent as a gzip tar in the request body

`POST /hosting/sites/{id}/builds/upload` · Rivier · hosting

Build a static site from source sent as a gzip tar in the request body.

- Scope: hosting:write
- Sdk: hosting.build.upload
- Cli: hosting build upload
- Events: hosting.build.started

## Parameters

- `id` (path, required), string
- `outDir` (query), string
- `install` (query), string
- `build` (query), string
- `preview` (query), string

## Request body

`application/octet-stream`

```json
{
  "type": "string",
  "format": "binary"
}
```

## Responses

- `201`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/hosting/sites/{id}/builds/upload' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/octet-stream'
```
