Variables
Update a variable
Change a variable's name, description, value or value type, or turn it into a secret (for good). Only the fields sent change. A secret's value is never read back: to change its type, send its value too.
Authorization
AuthorizationstringheaderrequiredBearer <key>, where <key> is a workspace API key or a user API key. See Authentication.
workspace_id*integerThe workspace. List the ones your key can reach with GET /v1/workspaces.
workflows_variable_id*stringThe variable.
uuidregion*RegionsRegion of the resource: besg (Europe) or usnv (United States), as GET /v1/regions lists them
"besg""usnv"application/json- body
variable_name?|nulldescription?|nullvalue?|For a secret, send the value with its value_type
nullvalue_type?|nullis_secret?|true turns the variable into a secret, for good
nullvalidate_only?Validate OnlyRun every check of the write and answer 204 without writing: a refused write answers the error the write would
falseOK
application/json- response
variable_id*Variable Idvariable_name*Variable Namevariable_resource_id*Variable Resource Iddescription*string|nullis_secret*Is SecretA secret's value is encrypted and never answered
value*|The value as text (JSON text for object, array and json); null for a secret
value_type*|How workflow steps read the value; for a secret, answered by GET /variables/ (stored encrypted with its value, not read by the list)
reference*ReferenceWhat a workflow step writes to read the variable
parent_folder_id*string|nullcreated_time*Created Timedate-timelast_modified_time*Last Modified Timedate-timeregion*Regions"besg""usnv"curl -X PATCH 'https://api.stacksync.com/v1/workspaces/0/variables/497f6eca-6276-4993-bfeb-53cbbbba6f08?region=besg' \ -H 'Content-Type: application/json' \ -d '{ "variable_name": "<variable_name>"}'{ "variable_id": "<variable_id>", "variable_name": "<variable_name>", "variable_resource_id": "<variable_resource_id>", "description": "<description>", "is_secret": false, "value": "<value>", "value_type": "string", "reference": "<reference>", "parent_folder_id": "<parent_folder_id>", "created_time": "2027-01-15T09:00:00Z", "last_modified_time": "2027-01-15T09:00:00Z", "region": "besg"}