---
title: "Batch Replace Env Vars"
method: PUT
path: "/v2/env-vars/batch"
tags: ["env-vars"]
---

# Batch Replace Env Vars

`PUT /v2/env-vars/batch`

Replace a registry's full env var set with the given variables.

## Request body

- RegistryEnvVarBatchRequest
  - `registry_id` string, uuid, required
  - `variables` RegistryEnvVarBatchItem[], required
    - `name` string, required — Environment variable name. Lowercase letters are uppercased and hyphens become underscores; all other characters are rejected.
    - `value` string, required

## Response `200`

Successful Response

- RegistryEnvVarBatchResponse
  - `created` integer, required
  - `updated` integer, required
  - `deleted` integer, required

## Other responses

- `400` — Invalid or malformed request
- `401` — Missing or invalid credentials
- `403` — Caller may not access this resource
- `404` — Referenced entity does not exist
- `409` — Resource already exists
- `422` — Validation Error

---

[API](https://skmtc.dev/hud/apis/hud-platform.md) · [All operations](https://skmtc.dev/hud/apis/hud-platform/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hud/hud-platform/revisions/58558fc733d9/schema)
