api
Environment Variables API
Manage environment variables for your deployments.
Environment Variables#
Environment variables are injected into your container at runtime. They are never baked into the Docker image, so your secrets stay safe.
/deployments/{id}/envList all environment variables for a deployment. Values are returned in full.
🔒 Auth: Bearer token required
iduuidrequiredDeployment ID[
{ "key": "DATABASE_URL", "value": "postgresql://..." },
{ "key": "NODE_ENV", "value": "production" }
]Example: list env vars
curl https://api.runix.dev/deployments/a1b2c3d4-.../env \
-H "Authorization: Bearer $TOKEN"/deployments/{id}/envSet or update environment variables. If a key already exists, its value is replaced. New keys are added. Existing keys not included in the request are left unchanged.
🔒 Auth: Bearer token required
iduuidrequiredDeployment IDvarsobjectrequiredKey-value pairs of environment variablesExample: set env vars
curl -X POST https://api.runix.dev/deployments/a1b2c3d4-.../env \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"vars": {
"DATABASE_URL": "postgresql://user:pass@host:5432/db",
"REDIS_URL": "redis://host:6379"
}
}'Changing environment variables does NOT automatically restart your service. You need to redeploy for changes to take effect.
/deployments/{id}/env/{key}Remove a single environment variable by key.
🔒 Auth: Bearer token required
iduuidrequiredDeployment IDkeystringrequiredThe environment variable key to removeExample: delete an env var
curl -X DELETE https://api.runix.dev/deployments/a1b2c3d4-.../env/OLD_SECRET \
-H "Authorization: Bearer $TOKEN"