---
title: "POST /v3/environment-variable-groups/{id}/environment-variables"
method: POST
path: "/v3/environment-variable-groups/{id}/environment-variables"
tags: ["envVarGroups"]
---

# POST /v3/environment-variable-groups/{id}/environment-variables

`POST /v3/environment-variable-groups/{id}/environment-variables`

Create an environment variable in a group

## Path parameters

- `id` string, uuid, required

## Request body

- object — Inputs for an environment variable
  - `value` string, required — Value of the environment variable.
  - `description` string, nullable — Optional description of the environment variable. Send null to clear an existing description; omit it to leave the description unchanged.
  - `key` string, required — Name or key of the environment variable, accessible via Deno.env or process.env

## Response `201`

An environment variable

- TEnvironmentVariable — An environment variable
  - `key` string, required — Name or key of the environment variable, accessible via Deno.env or process.env
  - `description` string, nullable, required — Optional description of the environment variable
  - `updatedAt` string, date-time, nullable, required
  - `createdAt` string, date-time, required

## Other responses

- `409` — Name conflict with another environment variable in this group

---

[API](https://skmtc.net/val-town/apis/val-town-api.md) · [All operations](https://skmtc.net/val-town/apis/val-town-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/val-town/val-town-api/versions/4d8b6d2e6db3/schema)
