Write File
Write content to a file in the webspace home. Creates parent directories as needed. Max 10 MB.
Write content to a file in the webspace home. Creates parent directories as needed. Max 10 MB.
Required scope: webspace:manage
| Header | Required | Value |
|---|---|---|
Authorization |
Yes | Bearer YOUR_API_KEY |
Content-Type |
Yes | application/json |
| Parameter | Required | Description |
|---|---|---|
path |
Yes | Absolute path inside ~/. |
content |
Yes | File content (string). |
encoding |
No | utf8 (default) or base64. |
{ "data": { "path": "/home/ws_0862c/public_html/index.html", "size": 256 } }
| Status | Code | Description |
|---|---|---|
| 400 | MISSING_CONTENT |
content is missing or not a string. |
| 413 | CONTENT_TOO_LARGE |
Content exceeds 10 MB. |
curl -X PUT https://hosting.site.quest/api/v1/webspaces/69e80ac1.../sftp/write \
-H "Authorization: Bearer sq_live_..." \
-H "Content-Type: application/json" \
-d '{ "path": "/home/ws_0862c/public_html/hello.txt", "content": "Hello World!" }'
This action is also available via the webspace_write_file MCP tool.