Platform

Set or remove a custom deployment's environment variables

Edits the deployment's own variables. Send set (an object to upsert; keys are upper-cased) and/or unset (a list of names to remove), or replace to declare the whole set at once. At least one of them is required.

Platform-managed keys are ignored in set and cannot be unset — the response lists any you passed under ignored_keys rather than failing the call. A value equal to the mask token means "leave this one alone", so a read-modify-write round trip does not destroy secrets the read masked.

Each value is one line of valid UTF-8 text, at most 32 KiB, with no control characters. $ and # are refused with 400: the app's environment file is read verbatim, where $ triggers variable substitution and # starts a comment. Names starting with COMPOSE_ or DOCKER_ are refused too, because they steer the container engine itself.

Saving does not restart anything: new values reach the container on the next deploy. Call POST /platform/deployments/custom/{id}/redeploy to apply them now — that keeps the same domain and port.

post/platform/deployments/custom/{id}/vars

Request

  • Base URL: https://api.imprezahost.com/v1
  • URL: https://api.imprezahost.com/v1/platform/deployments/custom/{id}/vars
  • Auth: API key in header X-API-Key and API key in header X-API-Secret

Path parameters

idstring required

Request body

setobject

Variables to add or update. Keys are upper-cased.

unsetstring[]

Variable names to remove.

replaceobject

Declare the complete set of your variables, removing any not listed.

Example request

{
  "set": {
    "SMTP_HOST": "mail.example.com"
  },
  "unset": [
    "OLD_FLAG"
  ]
}

Response

Saved. Redeploy to apply.

successboolean

Example response

{
  "success": true,
  "data": {
    "note": "Saved. New values reach the container on the next deploy — redeploy to apply now."
  },
  "meta": {
    "request_id": "req_a1b2c3d4e5f6g7h8",
    "timestamp": "2026-03-30T14:05:00Z"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.