Skip to main content
POST
/
applications
/
{uuid}
/
envs
Create Env
curl --request POST \
  --url https://app.coolify.io/api/v1/applications/{uuid}/envs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<string>",
  "value": "<string>",
  "is_preview": true,
  "is_build_time": true,
  "is_literal": true,
  "is_multiline": true,
  "is_shown_once": true
}'
{
  "uuid": "nc0k04gk8g0cgsk440g0koko"
}

Authorizations

Authorization
string
header
required

Go to Keys & Tokens / API tokens and create a new token. Use the token as the bearer token.

Path Parameters

uuid
string<uuid>
required

UUID of the application.

Body

application/json

Env created.

key
string

The key of the environment variable.

value
string

The value of the environment variable.

is_preview
boolean

The flag to indicate if the environment variable is used in preview deployments.

is_build_time
boolean

The flag to indicate if the environment variable is used in build time.

is_literal
boolean

The flag to indicate if the environment variable is a literal, nothing espaced.

is_multiline
boolean

The flag to indicate if the environment variable is multiline.

is_shown_once
boolean

The flag to indicate if the environment variable's value is shown on the UI.

Response

Environment variable created.

uuid
string
Example:

"nc0k04gk8g0cgsk440g0koko"

I