---
title: "Rename a variable Environment"
method: PATCH
path: "/projects/{id}/variable-environments/{environmentId}"
tags: ["Variable Environments"]
---

# Rename a variable Environment

`PATCH /projects/{id}/variable-environments/{environmentId}`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/projects/{id}/variable-environments/{environmentId}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Renames a custom Environment without changing its stable ID. Global cannot be renamed.

## Path parameters

- `id` string, uuid, required
- `environmentId` string, uuid, required

## Request body

- RenameVariableEnvironmentRequest
  - `name` string, required: Leading and trailing ASCII whitespace is trimmed before validating 1–64 ASCII letters, digits, underscores, or hyphens. Global is reserved.

## Response `200`

Variable Environment renamed

- VariableEnvironment: Stable identity for a Project-owned variable Environment.
  - `id` string, uuid, required
  - `project_id` string, uuid, required
  - `name` string, required
  - `is_global` boolean, required: Whether this is the reserved Global Environment.
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: Invalid name, or the reserved Global name. Schema-invalid names return the generic invalid-request error; a reserved name returns `invalid_variable_environment`.
- `401`: Unauthorized
- `403`: Project not owned by the caller
- `404`: Variable Environment not found in this Project
- `409`: A case-insensitive name conflict, an attempt to rename Global, or a Project being deleted. Tell them apart with `code`, which is `variable_environment_conflict`, `variable_environment_immutable`, or `project_deleting`.
- `500`: Failed to rename the variable Environment

## Changes

- **2026-10-14** `d8d8f53d847b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/projects/:id/variable-environments/:environmentId/patch.md)

---

[API](https://skmtc.dev/kong/apis/volcano-api.md) - [All operations](https://skmtc.dev/kong/apis/volcano-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9?raw)
