---
title: "Write files into a sandbox."
method: POST
path: "/v1/sandboxes/{id}/files"
tags: ["Sandboxes"]
---

# Write files into a sandbox.

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

## Request

- Base URL: `https://api.scalix.world`
- URL: `https://api.scalix.world/v1/sandboxes/{id}/files`
- Auth: HTTP bearer

## Path parameters

- `id` string, required

## Request body

- SandboxWriteFilesRequest: Request body for writing files into a sandbox. Writable roots inside the guest are `/app`, `/scalix`, `/build`, and `/tmp`.
  - `files` object[], required: Files to write: `[{path, content}]`.

## Response `204`

Files written

## Other responses

- `404`: Not found
- `502`: Path outside the allowed guest roots

---

[API](https://skmtc.dev/scalix/apis/scalix-cloud-api.md) · [All operations](https://skmtc.dev/scalix/apis/scalix-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scalix/apis/scalix-cloud-api/revisions/2c04ca0a90bb?raw)
