---
title: "Begin unpacking a large tar archive into a folder, sent in chunks."
method: POST
path: "/v1/sandboxes/{id}/files/archive/uploads"
tags: ["files"]
---

# Begin unpacking a large tar archive into a folder, sent in chunks.

`POST /v1/sandboxes/{id}/files/archive/uploads`

## Request

- Base URL: `https://api.withruntime.com`
- URL: `https://api.withruntime.com/v1/sandboxes/{id}/files/archive/uploads`
- Auth: HTTP bearer

Then PUT the archive in order, 1 MiB at most a request, at ?offset= its place, and commit. The sandbox unpacks as the bytes arrive, so nothing is staged on its disk. A chunk resent after a lost answer is not written twice. An upload not committed within 6 hours is ended. At most 4 at once in a sandbox. Needs write_file.

## Path parameters

- `id` string, required: Resource identifier (UUID).

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `path` string, required: The folder, absolute, e.g. /workspace/app. An upload makes it and its parents, and merges into what is there.
  - `gzip` boolean: The archive is gzip-compressed.
  - `user` 'sandbox' | 'root': Run tar as the sandbox user, or as root through passwordless sudo.

## Response `200`

Success

- object
  - `uploadId` string, required
  - `path` string, required
  - `gzip` boolean, required
  - `chunkBytes` integer, required

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/withruntime/apis/runtime-cloud-api.md) · [All operations](https://skmtc.dev/withruntime/apis/runtime-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/withruntime/apis/runtime-cloud-api/revisions/6f4012286988?raw)
