POST/v1/variables/{id}

Update a project variable

Updates a project variable's value or metadata without changing its name. Include value, metadata, or both to specify the fields to update; an omitted body leaves no fields to change.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 2 body fields
idstringrequired
The project variable identifier, exactly 21 alphanumeric characters.

Optional project variable fields to update. The variable name cannot be changed.

metadataobjectoptional
Key-value metadata for the variable, with string property names.
valuestringoptional
The new variable value. Must contain at least one character.

1 status code
200Returns the updated project variable, including its identifier, name, value-related metadata, and project details.
createdstringrequired
idstringrequired
metadataobjectoptional
namestringrequired
ownerobjectoptional
ownerIdstringoptional
platformIdstringrequired
projectIdstringrequired
updatedstringrequired

Error handling

If you provide value, it must contain at least one character; metadata can contain key-value data with string property names. The id path parameter must contain exactly 21 alphanumeric characters and identify the variable to update.