Environment Variables
Encrypted environment variables scoped to projects. Supports dynamic references to other resources (databases, buckets, functions) that resolve at deploy time.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/v1/env-vars | List env vars (?projectId=&scope=&scopeId=) |
POST | /api/v1/env-vars | Create env var |
POST | /api/v1/env-vars/bulk | Bulk sync variables |
POST | /api/v1/env-vars/preview | Preview resolved values |
GET | /api/v1/env-vars/values | Get all decrypted values |
GET | /api/v1/env-vars/:id | Get env var by ID |
GET | /api/v1/env-vars/:id/value | Get single decrypted value |
PUT | /api/v1/env-vars/:id | Update env var |
DELETE | /api/v1/env-vars/:id | Delete 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>}
| Type | Properties |
|---|---|
db | url, host, port, user, password, name |
bucket | endpoint, access_key, secret_key, bucket_name |
fn | url |
Last updated on