Environment Variables API

Environment Variables API

Manage environment variables for your project.

GET/organizations/:orgId/projects/:projectId/environments

List all environment variables for the project.

Response
{
  "environments": [
    {
      "id": "e1234567-abcd-...",
      "name": "DATABASE_URL",
      "value": "mysql://...",
      "createdAt": "2026-03-20T...",
      "updatedAt": "2026-03-20T..."
    }
  ]
}
POST/organizations/:orgId/projects/:projectId/environments

Create a new environment variable.

Request
{
  "name": "API_SECRET",
  "value": "sk_live_abc123"
}
Response
{
  "environment": {
    "id": "e2345678-efgh-...",
    "name": "API_SECRET",
    "value": "sk_live_abc123",
    "createdAt": "2026-03-20T...",
    "updatedAt": "2026-03-20T..."
  }
}
PUT/organizations/:orgId/projects/:projectId/environments/:envId

Update an environment variable. Both name and value are optional.

Request
{
  "value": "sk_live_updated_value"
}
Response
{
  "environment": {
    "id": "e2345678-efgh-...",
    "name": "API_SECRET",
    "value": "sk_live_updated_value",
    "createdAt": "2026-03-20T...",
    "updatedAt": "2026-03-24T..."
  }
}
DELETE/organizations/:orgId/projects/:projectId/environments/:envId

Delete an environment variable.