REST API - Environment variables#
| Endpoint | Method | Description |
|---|---|---|
/projects/{id}/env | GET | List variables |
/projects/{id}/env | POST | Create a variable |
/projects/{id}/env/{varID} | PATCH | Update value/environment |
/projects/{id}/env/{varID} | DELETE | Delete a variable |
/projects/{id}/env/bulk | POST | Upsert many variables |
Create:
{
"key": "STRIPE_KEY",
"value": "sk_test_123",
"environment": "production"
}
JSONenvironment is one of production, preview, development.
Bulk:
{
"environment": "development",
"values": { "DEBUG": "true", "LOG_LEVEL": "debug" }
}
JSONSecurity#
- Accepts the project API key (or a project-user session)
- Scoped keys:
env:read,env:write