// Project Variables

Update a project variable

Update a project variable's name, description, or type.

PUT/api/project/variable

Description

Updates the variable definition (not its values). Pass only the fields to change.

Parameters

NameInTypeRequiredDescription
variableId body string yes ID of the variable.
name body string no New name.
description body string no New description.
variableType body string no See below.

Variable types

variableType accepts Text, Secret, Script, Number, Boolean, Date, Map, and Json. Omit the field to leave the type unchanged.

When the organization hides secret values, a Secret variable can only be changed to another type by a service account holding the Secret reader role - otherwise the request fails with 400, since the stored values would become readable.

Errors

StatusMeaning
400 Invalid variableId (e.g. it's an imported workspace variable, not a project-local one) or validation failure.
401 Missing or invalid Basic auth credentials, or the service account lacks the required role.