---
title: "Update variable for a workspace"
method: PUT
path: "/workspaces/{workspace}/pipelines-config/variables/{variable_uuid}"
tags: ["Pipelines"]
---

# Update variable for a workspace

`PUT /workspaces/{workspace}/pipelines-config/variables/{variable_uuid}`

Update a workspace level variable.

## Path parameters

- `workspace` string, required
- `variable_uuid` string, required

## Request body

- PipelineVariable — A Pipelines variable.
  - `type` string, required
  - `uuid` string — The UUID identifying the variable.
  - `key` string — The unique name of the variable.
  - `value` string — The value of the variable. If the variable is secured, this will be empty.
  - `secured` boolean — If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.

## Response `200`

The variable was updated.

- PipelineVariable — A Pipelines variable.
  - `type` string, required
  - `uuid` string — The UUID identifying the variable.
  - `key` string — The unique name of the variable.
  - `value` string — The value of the variable. If the variable is secured, this will be empty.
  - `secured` boolean — If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.

## Other responses

- `404` — The workspace or the variable was not found.

---

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