> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Write files to sandbox

> Uploads one or more files to the sandbox workspace

Uploads one or more files to the sandbox workspace

### Path parameters

<ParamField path="sandboxId" type="string (uuid)" required>
  Unique sandbox identifier
</ParamField>

### Request body

`WriteFilesRequest`

<ParamField body="files" type="object[]" required />

### Response

`object`

<ResponseField name="success" type="boolean" />

<ResponseField name="files_written" type="integer" />

### Status codes

| Code  | Meaning                    |
| ----- | -------------------------- |
| `200` | Files written successfully |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.sandbox.stateset.app/api/v1/sandbox/{sandboxId}/files' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "files": [
      {
        "path": "string",
        "content": "string"
      }
    ]
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "files_written": 1
  }
  ```
</ResponseExample>
