---
title: "Update a vault variable"
method: PUT
path: "/vault-variables/{variableId}"
tags: ["VaultVariables"]
---

# Update a vault variable

`PUT /vault-variables/{variableId}`

## Request

- Base URL: `https://public.escape.tech/v3`
- URL: `https://public.escape.tech/v3/vault-variables/{variableId}`
- Auth: API key in header `X-ESCAPE-API-KEY`

Replace the value of a plaintext or secret variable, or the entry name of an external variable. The name and the type stay as they are. The new value is write-only.

## Path parameters

- `variableId` string, uuid, required: The ID of the vault variable

## Request body

- object
  - `value` string: The new plaintext or secret value. Write-only. Forbidden for an EXTERNAL variable.
  - `externalEntry` string: The new entry name inside the provider vault. Only for an EXTERNAL variable.

## Response `200`

OK

- object
  - `id` string, uuid, required: The id of the vault variable
  - `type` 'EXTERNAL' | 'PLAINTEXT' | 'SECRET', required: The type of the vault variable
  - `name` string, required: The name of the vault variable, referenced from scan configs as ${NAME}

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Not found
- `502`: The vault provider refused or could not answer

---

[API](https://skmtc.dev/escape/apis/escape-public-api.md) - [All operations](https://skmtc.dev/escape/apis/escape-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/escape/apis/escape-public-api/revisions/2eab35df40c7?raw)
