---
title: "Unpack a tar archive of up to 1 MiB into a folder, from the raw request body."
method: PUT
path: "/v1/sandboxes/{id}/files/archive"
tags: ["files"]
---

# Unpack a tar archive of up to 1 MiB into a folder, from the raw request body.

`PUT /v1/sandboxes/{id}/files/archive`

## Request

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

The folder and its parents are made; the archive merges into what is there, replacing files of the same name. gzip is recognised by its first bytes. Larger archives: POST .../files/archive/uploads (the SDKs switch for you). Needs write_file.

## Path parameters

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

## Query parameters

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

## Headers

- `Idempotency-Key` string

## Response `200`

Success

- object
  - `path` string, required
  - `received` integer, required: Bytes of archive unpacked.

## 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/e76cd8f6dcb4?raw)
