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/envReplace 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tid | path | string | required | |
id | path | string | required |
Request body
required
Content type: application/json
object
- no other properties
revisioninteger requiredvarsarray<object> required- max items 100
namestring required- pattern
^[A-Za-z_][A-Za-z0-9_]{0,127}$
- pattern
valuestring | null optional- max length 32768
secretboolean required
Example
{
"revision": 0,
"vars": [
{
"name": "string",
"value": "string",
"secret": true
}
]
}Responses
200 Saved variables
Content type: application/json
restartingboolean requiredSaving started the running release again to apply the variables
revisioninteger required0 until the variables are first saved
updated_atstring (date-time) | null requiredvarsarray<object> requirednamestring requiredvaluestring optionalLeft out for a secret: secrets are write-only
secretboolean requiredhas_valueboolean 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
codestring requiredmessagestring requireddetails_redactedboolean requiredcorrelation_idstring requiredretryableboolean required