Delete File
Delete a file or directory inside the webspace home. The home dir itself cannot be deleted.
Delete a file or directory inside the webspace home. The home dir itself cannot be deleted.
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 ~/. |
recursive |
No | If true, delete directories recursively (rm -rf). |
{ "data": { "path": "/home/ws_0862c/old", "deleted": true, "recursive": true } }
| Status | Code | Description |
|---|---|---|
| 403 | HOME_DIR_PROTECTED |
Cannot delete the webspace home directory. |
curl -X DELETE https://hosting.site.quest/api/v1/webspaces/69e80ac1.../sftp/delete \
-H "Authorization: Bearer sq_live_..." \
-H "Content-Type: application/json" \
-d '{ "path": "/home/ws_0862c/old", "recursive": true }'
This action is also available via the webspace_delete_path MCP tool.