# Upload project files

> Add or replace files from a gzipped tar. Paths the archive carries are written; everything else stays put.

Source: https://docs.generalinput.com/api/projects/upload-files



<Endpoint method="POST" path="/v1/projects/:id/files/bundle" />

<Access scope="projects:manage" />

Push is additive. To remove a file, use [delete a file](/api/projects/delete-file). The body is the raw archive, up to 50 MB.

## Request [#request]

```
Content-Type: application/gzip
<tar.gz bytes>
```

## Response [#response]

The full file list, as [list files](/api/projects/list-files) returns it.

## Example [#example]

```sh
tar -czf files.tar.gz -C ./project-files .
curl -s -X POST "https://cloud.generalinput.com/v1/projects/proj_01HX/files/bundle" \
  -H "Authorization: Bearer $GI_API_KEY" \
  -H "Content-Type: application/gzip" --data-binary @files.tar.gz
```

## Errors [#errors]

| Status | When                                       |
| ------ | ------------------------------------------ |
| `400`  | Empty body, or the archive holds no files. |
| `403`  | The member cannot edit the project.        |
