Create or update environment variables
set_envsSet one or many environment variables on a Coolify app or service. Existing keys update, missing keys are created, and the response lists each key's status without showing values. Dry-run previews changes; restart or deploy applies them.
Instructions
Upsert one or many environment variables on an application or service in a single call: existing keys are updated, missing keys created, identical ones left alone. Returns per key created / updated / unchanged plus which fields changed — values are never echoed. Flags you omit keep their current value on update. For applications, the main and preview copies of a key are separate (use is_preview). Use dry_run to preview. Changes only take effect after restart_application / restart_service, or deploy for build-time variables.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| envs | Yes | Variables to upsert. | |
| dry_run | No | Report what would change without calling the mutating API. Allowed even in read-only mode. | |
| resource | Yes | The resource: its uuid, its exact name, or a unique part of its name or domain (e.g. "api" or "app.example.com"). | |
| resource_type | No | Restrict lookup to applications or services. Omit to search both. |