---
title: "Store or update a variable"
method: POST
path: "/api/v1/variables"
tags: ["Variables"]
---

# Store or update a variable

`POST /api/v1/variables`

Stores a non-sensitive variable for run config interpolation.

## Request body

- CreateVariableRequest — Request to store or update a variable.
  - `name` string, required — Env-style variable name.
  - `value` string, required — Variable value. Empty values are allowed.
  - `description` string — Optional operator-facing description of the variable.

## Response `200`

Variable stored

- 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
- `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/revisions/bee030053823/schema)
