Skip to Content
DocumentationAPI ReferenceEnvironment Variables

Environment Variables

Encrypted environment variables scoped to projects. Supports dynamic references to other resources (databases, buckets, functions) that resolve at deploy time.

Endpoints

MethodPathDescription
GET/api/v1/env-varsList env vars (?projectId=&scope=&scopeId=)
POST/api/v1/env-varsCreate env var
POST/api/v1/env-vars/bulkBulk sync variables
POST/api/v1/env-vars/previewPreview resolved values
GET/api/v1/env-vars/valuesGet all decrypted values
GET/api/v1/env-vars/:idGet env var by ID
GET/api/v1/env-vars/:id/valueGet single decrypted value
PUT/api/v1/env-vars/:idUpdate env var
DELETE/api/v1/env-vars/:idDelete env var

POST /api/v1/env-vars

{ "project_id": "uuid", "key": "DATABASE_URL", "value": "postgres://user:pass@host:5432/db", "description": "Primary database connection string" }

POST /api/v1/env-vars/bulk

Sync multiple variables at once. Creates new ones and updates existing ones by key.

{ "project_id": "uuid", "variables": { "NODE_ENV": "production", "API_KEY": "sk-abc123", "LOG_LEVEL": "info" } }

POST /api/v1/env-vars/preview

Preview how dynamic references resolve without deploying.

{ "project_id": "uuid", "environment_id": "uuid", "env": { "DB_URL": "${db.my-postgres.url}", "S3_ENDPOINT": "${bucket.media.endpoint}" } }

Reference syntax: ${<type>.<name>.<property>}

TypeProperties
dburl, host, port, user, password, name
bucketendpoint, access_key, secret_key, bucket_name
fnurl
Last updated on