Set API Environment Variable
unfour.api.set_environment_variableCreate or update an API environment variable by environment ID and key, with optional secret masking and metadata preservation.
Instructions
Creates or updates one API environment variable by environmentId and key through the command bus. Empty values are allowed. Omitted isSecret/description preserve existing metadata, and returned secrets are masked.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"environmentId": "<environmentId>",
"key": "<key>",
"value": "<value>"
},
"name": "unfour.api.set_environment_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| value | Yes | ||
| enabled | No | ||
| isSecret | No | ||
| description | No | ||
| workspaceId | No | ||
| environmentId | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | ||
| created | Yes | ||
| variable | Yes |