v1

latestOpenAPI 3.0.02026-07-14198572488.4 KB
Files

Save contents of a file to the site installation.

For a given site, save new content to existing file in the site installation.

put/v1/sites/{id}/files

Path parameters

idinteger required

ID of the Site you are interacting with

Example:8880000888

Request body

filestring required

Name of the file

pathstring required

Path to the file

contentstring required

Content of the file

Example request

{
  "file": "plugin.php",
  "path": "wp-content/plugins",
  "content": "<?php echo 'Hello, world!'; ?>"
}

Response

OK

successboolean

whether the request succeeded

errorsstring[]
messagesstring[] nullable

Example response

{
  "success": true,
  "errors": [],
  "messages": [],
  "result": {
    "success": true,
    "path": "wp-content/plugins"
  }
}