v1

latestOpenAPI 3.0.02026-07-14198572488.4 KB
Files

Upload a file to the site installation.

For a given site, upload a new file to the site installation.

post/v1/sites/{id}/files

Path parameters

idinteger required

ID of the Site you are interacting with

Example:8880000888

Request body

contentstring required

Content of the file

pathstring required

Path to the file

filenamestring required

Name of the file

binaryboolean

Whether content is base64-encoded binary. When omitted, inferred from the filename.

Example request

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

Response

OK

successboolean

whether the request succeeded

errorsstring[]
messagesstring[] nullable

Example response

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