Update .env from site

Update the .env file contents for a site.


PATCH/api/servers/{server}/sites/{id}/env

Update environment file

This endpoint updates the contents of the .env file for your site. This will only work if the file is present.

Required parameters

  • Name
    content
    Type
    string
    Description

    The new .env file contents. Minimum: 2 characters.

Request

PATCH
/api/servers/{server}/sites/{id}/env
curl -X PATCH "https://ploi.io/api/servers/{server}/sites/{id}/env" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"content": "APP_URL=https://ploi.io...."}'

Response

{
  "message": "Environment file has been updated"
}