Endpoint
Request
Headers
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Destination file path |
content | string | Yes | File content to write |
Example Request
Response
Success (200 OK)
Response Fields
| Field | Type | Description |
|---|---|---|
path | string | File path |
size | integer | File size in bytes |
message | string | Confirmation message |
Status Codes
| Code | Description |
|---|---|
| 200 | File written successfully |
| 400 | Invalid request (missing path or content) |
| 401 | Unauthorized |
| 403 | Path not allowed |
| 500 | Write failed |
Errors
Path Not Allowed (403)
/workspace, /tmp, or other explicitly allowed paths.
Use Cases
Write Configuration
Write Python Script
Write CSV Data
Write and Execute
Write from Python
Related
- SDK: sandbox.files.write() - Python SDK method
- CLI File Operations - File operations from CLI
Next Steps
- Read File - Read file contents
- List Files - List directory contents
- Remove File - Delete files

