Write File
Filesystem
Write File
Write or create a file in the session workspace. Parents are created automatically.
PUT
Write File
Overview
Creates or overwrites a file in the session’s workspace with base64-encoded content. Parent directories are created automatically. Paths must be relative to the workspace root (no leading/, no .., no NUL byte, up to 4096 bytes).
Path Parameters
Browser session ID (UUID).
Body
Workspace-relative path, e.g.
a/b/c.txt.Base64-encoded file content.
Unix mode (octal). Applied after write.
Example Request
Response
Success Response (201)
The written workspace-relative path.
Decoded byte length of the written content.
Error Responses
| Status | Description |
|---|---|
400 | Invalid body — bad path, non-base64 content, or unknown fields. |
401 | Unauthorized — invalid or missing API key. |
404 | Session not found. |
413 | Decoded content exceeds the maximum write size. |