---
title: "Replace a variable value"
method: PUT
path: "/api/v1/variables/{name}"
tags: ["Variables"]
---

# Replace a variable value

`PUT /api/v1/variables/{name}`

Replaces a variable value and preserves the existing description when omitted.

## Request body

- UpdateVariableRequest — Request to update a variable.
  - `value` string, required — Replacement value. Empty values are allowed.
  - `description` string — Optional operator-facing description. Omitted descriptions preserve the existing value.

## Response `200`

Variable updated

- Variable — Non-sensitive variable available for run config interpolation.
  - `name` string, required — Env-style variable name.
  - `value` string, required — Variable value.
  - `description` string — Optional operator-facing description of the variable.
  - `created_at` string, date-time, required — When the variable was first stored.
  - `updated_at` string, date-time, required — When the variable was last updated.

## Other responses

- `400` — Invalid variable name or request body
- `404` — Variable not found
- `500` — Variable store write failed

---

[API](https://skmtc.net/fabro-sh/apis/fabro-run-api.md) · [All operations](https://skmtc.net/fabro-sh/apis/fabro-run-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fabro-sh/fabro-run-api/versions/bee030053823/schema)
