Skip to content

Environment variables

Environment variables are key/value settings that your runtime app can read at runtime — things like a feature flag, a log level, or a public base URL. In Comwit Cloud you manage them per app, and they are applied to the builds that run for that app.

Read the current environment for an app.

API
GET /v1/projects/{projectId}/apps/{appId}/environment

You’ll need your project id (projectId) and the app id (appId) — see Deploy an app and Apps overview for where those come from.

Setting a variable uses the variable’s key as the last path segment, with the value in the request body.

API
PUT /v1/projects/{projectId}/apps/{appId}/environment/{key}
Request body
{ "value": "info", "secret": false }

The body has two fields:

  • value — the string value to store for this key.
  • secret — must be false. Sending true is rejected (see below).

PUT both creates a new key and updates an existing one — there is no separate “create” versus “update” call.

API
DELETE /v1/projects/{projectId}/apps/{appId}/environment/{key}

This removes a single key from the app’s environment.

The secret field exists in the request shape, but the live policy does not use a secret store for app environment values. If you send secret: true, the API responds with:

Response (400 problem-detail)
{
"title": "Bad Request",
"status": 400,
"detail": "secret app env values are not enabled; store plain env values only"
}

In other words, every app environment value is stored and served as plain configuration. To set a value successfully, send "secret": false.

Because there is no secret backend for app env, treat everything you put here as plain, readable configuration:

  • Safe to store: log levels, feature flags, public URLs, non-sensitive build settings.
  • Do not store: passwords, API keys, signing secrets, or anything you would not want exposed in plain form.