---
title: "Write File"
method: POST
path: "/v1/sandboxes/{sandbox_id}/files"
tags: ["V1 - Sandboxes"]
---

# Write File

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

## Request

- Base URL: `https://api.app.noxus.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.app.noxus.ai/v1/sandboxes/{sandbox_id}/files`
- Auth: API key in header `X-API-Key`

Write a file into the sandbox.

## Path parameters

- `sandbox_id` string, required

## Request body

- WriteFileIn
  - `path` string, required: Absolute path inside the sandbox.
  - `content` string, required: File content.
  - `encoding` string: 'utf-8' for text, or 'base64' when content is binary.

## Response `200`

Successful Response

- WriteFileOut
  - `path` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/noxus/apis/noxus-backend.md) - [All operations](https://skmtc.dev/noxus/apis/noxus-backend/llms.txt) - [OpenAPI document](https://skmtc.dev/noxus/apis/noxus-backend/revisions/0e37810b7ad5?raw)
