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

# Create a variable Environment

`POST /projects/{id}/variable-environments`

## Request

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

Creates a custom variable Environment. Global is reserved and already exists. A Project may have at most 100 custom Environments.

## Path parameters

- `id` string, uuid, required

## Request body

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

## Response `201`

Variable Environment created

- 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`: Project no longer exists
- `409`: A case-insensitive name conflict or the 100-custom-Environment limit has been reached, or the Project is being deleted. Tell them apart with `code`, which is `variable_environment_conflict`, `variable_environment_limit_reached`, or `project_deleting`.
- `500`: Failed to create 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/post.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)
