API referenceSections

Replace the application's environment variables

Generated from the OpenAPI contract. Sessions send the CSRF header on writes; API keys use a Bearer token. Authentication

PUT /api/v1/tenants/{tid}/sites/{id}/node/env

Replace the application's environment variables

Fails with ENV_CHANGED when revision is not the current one. A variable sent without a value keeps the value stored under that name. Values are sealed and appear in no job or audit entry (ADR 0017).

Authentication: session cookie __Host-panel_session (contract default; see Authentication).

Parameters

NameInTypeRequiredDescription
tidpathstringrequired
idpathstringrequired

Request body

required

Content type: application/json

object
  • no other properties
  • revision integer required
  • vars array<object> required
    • max items 100
    • name string required
      • pattern ^[A-Za-z_][A-Za-z0-9_]{0,127}$
    • value string | null optional
      • max length 32768
    • secret boolean required
Example
{
  "revision": 0,
  "vars": [
    {
      "name": "string",
      "value": "string",
      "secret": true
    }
  ]
}

Responses

200 Saved variables

Content type: application/json

  • restarting boolean required

    Saving started the running release again to apply the variables

  • revision integer required

    0 until the variables are first saved

  • updated_at string (date-time) | null required
  • vars array<object> required
    • name string required
    • value string optional

      Left out for a secret: secrets are write-only

    • secret boolean required
    • has_value boolean required
Example
{
  "restarting": true,
  "revision": 0,
  "updated_at": "2026-01-01T00:00:00Z",
  "vars": [
    {
      "name": "string",
      "value": "string",
      "secret": true,
      "has_value": true
    }
  ]
}

default Error

Content type: application/json

  • code string required
  • message string required
  • details_redacted boolean required
  • correlation_id string required
  • retryable boolean required