# Update an instance-level variable **PUT /admin/ci/variables/{key}** Update an instance-level variable ## Servers - https://www.gitlab.com/api/v4: https://www.gitlab.com/api/v4 () ## Authentication methods - Api key auth ## Parameters ### Path parameters - **key** (string) The key of a variable ### Body: application/json (object) - **value** (string) The value of a variable - **protected** (boolean) Whether the variable is protected - **masked** (boolean) Whether the variable is masked - **raw** (boolean) Whether the variable will be expanded - **variable_type** (string) The type of a variable. Available types are: env_var (default) and file ## Responses ### 200 Update an instance-level variable #### Body: application/json (object) - **variable_type** (string) - **key** (string) - **value** (string) - **protected** (boolean) - **masked** (boolean) - **raw** (boolean) - **environment_scope** (string) ### 404 Instance Variable Not Found [Powered by Bump.sh](https://bump.sh)