PATCH
/v1/environment-variables/{envVarId}Update an environment variable's value⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️
Replaces the value of an existing environment variable. Only the value is mutable — the project, environment, key, and branch are fixed at create-time.
Parameters
envVarIdstringpathrequiredRequest body
application/json
object
valuestringrequired{
"value": "string"
}Responses
object
dataobjectrequiredShow child attributes
branchIdnull | stringrequiredclassstringrequiredcreatedAtstring · date-timerequiredidstringrequiredisManagedBySystembooleanrequiredkeystringrequiredprojectIdstringrequiredtypestringrequiredupdatedAtstring · date-timerequiredurlstring · urirequiredvalueKidstringrequired{
"data": {
"branchId": "string",
"class": "preview",
"createdAt": "2026-06-09T00:00:00Z",
"id": "string",
"isManagedBySystem": true,
"key": "string",
"projectId": "string",
"type": "environment-variable",
"updatedAt": "2026-06-09T00:00:00Z",
"url": "https://example.com",
"valueKid": "string"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}