---
title: "Update a Variable"
method: PUT
path: "/streaming/v2/variables/{id}"
tags: ["variable"]
---

# Update a Variable

`PUT /streaming/v2/variables/{id}`

Updates an existing variable using the specified ID. All fields will be replaced with the new values provided in the request body.

## Path parameters

- `id` string, uuid, required

## Request body

- NewVariable
  - `name` string, required — The unique name of the variable.
  - `description` string — Optional description of the variable.
  - `type` 'number' | 'bool' | 'string', required — The data type of the variable.

## Response `200`

Variable updated

- Variable
  - `id` string, uuid, required
  - `name` string, required
  - `description` string
  - `type` 'number' | 'bool' | 'string', required
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `default` — Unexpected error

---

[API](https://skmtc.dev/blockdaemon/apis/staking-api.md) · [All operations](https://skmtc.dev/blockdaemon/apis/staking-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/blockdaemon/staking-api/revisions/f94e296a08a3/schema)
