Skip to main content
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

string
required
Browser session ID (UUID).

Body

string
required
Workspace-relative path, e.g. a/b/c.txt.
string
required
Base64-encoded file content.
integer
default:"0644"
Unix mode (octal). Applied after write.

Example Request

Response

Success Response (201)

string
The written workspace-relative path.
integer
Decoded byte length of the written content.
Example Response:

Error Responses