Files
A site's files: list, read, write, upload and download. For the same in the control panel, see Manage files with the File Manager.
Operations
| Operation | Request |
|---|---|
| List a folder of a site | GET / |
| Read a text file of a site | GET / |
| Write a text file of a site | PUT / |
| Make a folder in a site | POST / |
| Make an empty file in a site | POST / |
| Move or rename a file or folder | POST / |
| Copy a file or folder | POST / |
| Delete files and folders of a site | POST / |
| Change a file's or folder's permissions | POST / |
| Extract a .zip archive in a site | POST / |
| Make a .zip archive in a site | POST / |
| Upload a file to a site | PUT / |
| Download a file or folder of a site | GET / |
The FileList object
A folder of a site, with everything it holds.
| Field | Type and description |
|---|---|
path | string The folder's path in the site. |
entries | array of objects What the folder holds: folders (and links to folders) first, then the rest, each by name. |
name | string Its name: the last part of its path. |
path | string Its path in the site, from the site's folder (always starts with |
type | string
Known values: |
sizeBytes | integer Its size, in bytes. For a folder, the size of the folder's own entry, not of what it holds. |
modifiedAt | string An ISO 8601 time, in UTC When it was last changed. |
mode | string Its permissions, as three octal digits: |
version | string Changes whenever the file changes. Send it as |
linkTargetType | string or null For a link: what it leads to: Known values: |
truncated | boolean Whether the folder holds more than 5,000 entries, of which only 5,000 are listed (not chosen by name). List the folders inside it instead. |
Example
{
"path": "/wp-content",
"entries": [
{
"name": "plugins",
"path": "/wp-content/plugins",
"type": "dir",
"sizeBytes": 4096,
"modifiedAt": "2026-11-12T08:03:19.000Z",
"mode": "755",
"version": "1794470599000000000:4096",
"linkTargetType": null
},
{
"name": "themes",
"path": "/wp-content/themes",
"type": "dir",
"sizeBytes": 4096,
"modifiedAt": "2026-10-30T14:41:02.000Z",
"mode": "755",
"version": "1793371262000000000:4096",
"linkTargetType": null
},
{
"name": "uploads",
"path": "/wp-content/uploads",
"type": "dir",
"sizeBytes": 4096,
"modifiedAt": "2026-11-18T16:20:45.000Z",
"mode": "755",
"version": "1795018845000000000:4096",
"linkTargetType": null
},
{
"name": "index.php",
"path": "/wp-content/index.php",
"type": "file",
"sizeBytes": 28,
"modifiedAt": "2026-09-14T10:00:00.000Z",
"mode": "644",
"version": "1789380000000000000:28",
"linkTargetType": null
}
],
"truncated": false
} The FileContent object
A text file of a site, with its version for a safe save.
| Field | Type and description |
|---|---|
path | string The file's path in the site. |
content | string The file's text (UTF-8). |
version | string The file's version: send it as |
sizeBytes | integer Its size, in bytes. |
modifiedAt | string An ISO 8601 time, in UTC When it was last changed. |
Example
{
"path": "/robots.txt",
"content": "User-agent: *\nDisallow: /wp-admin/\nAllow: /wp-admin/admin-ajax.php\n",
"version": "1795017600000000000:67",
"sizeBytes": 67,
"modifiedAt": "2026-11-18T08:00:00.000Z"
} The FileEntry object
A file, folder or link in a site's folder.
| Field | Type and description |
|---|---|
name | string Its name: the last part of its path. |
path | string Its path in the site, from the site's folder (always starts with |
type | string
Known values: |
sizeBytes | integer Its size, in bytes. For a folder, the size of the folder's own entry, not of what it holds. |
modifiedAt | string An ISO 8601 time, in UTC When it was last changed. |
mode | string Its permissions, as three octal digits: |
version | string Changes whenever the file changes. Send it as |
linkTargetType | string or null For a link: what it leads to: Known values: |
Example
{
"name": "team-photo.jpg",
"path": "/wp-content/uploads/2026/11/team-photo.jpg",
"type": "file",
"sizeBytes": 284113,
"modifiedAt": "2026-11-18T16:20:45.512Z",
"mode": "644",
"version": "1795025645512000000:284113",
"linkTargetType": null
} The FilesDeleted object
What a delete removed.
| Field | Type and description |
|---|---|
deleted | integer How many of the paths were deleted (a folder with all it held counts as one). |
Example
{
"deleted": 3
} The FilesExtracted object
What extracting an archive put in place.
| Field | Type and description |
|---|---|
extractedFiles | integer How many files the archive put in place (folders aren't counted). |
extractedBytes | integer Their total size, in bytes. |
Example
{
"extractedFiles": 1873,
"extractedBytes": 48211943
}