Ploi API
Ploi API

Update site

Updates a site in your server if the parameter is present in the request.

Parameters that you can pass in here below, do not always update on runtime. For example, changing a root domain takes a little bit of work so this happens in the background. This is why we've added the "On-demand" table header to clarify if an update is instant, or not.

PATCH api/servers/{server}/sites/{site}


Parameter Type Status Description On-demand
root_domain string optional Maximum: 100, cannot be used already in your server, must be unique No

Example request:

curl -X PATCH "{server}/sites/{site}" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
   --data '{"root_domain":""}'

Example response:

Content-Type: application/json

    "data": {
        "id": 1,
        "server_id": 1,
        "domain": "",
        "deploy_script": false,
        "web_directory": "/public",
        "project_type": null,
        "project_root": "/",
        "last_deploy_at": null,
        "system_user": "ploi",
        "php_version": 7.2,
        "health_url": null,
        "notification_urls": {
            "slack": null,
            "discord": null,
            "webhook": null
        "has_repository": true,
        "created_at": "2019-07-29 10:27:32"
    "message": "Site domain is being updated from to"