API Documentation

Change Permissions

Change permissions on a file or directory inside the webspace home.

Required scope: webspace:manage

Headers

Header Required Value
Authorization Yes Bearer YOUR_API_KEY
Content-Type Yes application/json

Request Body

Parameter Required Description
path Yes Absolute path inside ~/.
mode Yes Octal string ("0755") or decimal int (0–4095).

Response

{ "data": { "path": "/home/ws_0862c/public_html/index.php", "mode": "0644" } }

Error Responses

Status Code Description
400 INVALID_MODE mode is not a valid octal string or decimal int.

Example

curl -X POST https://hosting.site.quest/api/v1/webspaces/69e80ac1.../sftp/chmod \
  -H "Authorization: Bearer sq_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "path": "/home/ws_0862c/public_html/index.php", "mode": "0644" }'

MCP

This action is also available via the webspace_chmod MCP tool.