v2
latestOpenAPI 3.0.42026-08-04123200540.7 KBReplace value
This endpoint replaces the value and the Targeting Rules of a Feature Flag or Setting in a specified Environment identified by the <a target="_blank" rel="noopener noreferrer" href="https://app.configcat.com/sdkkey">SDK key</a> passed in the X-CONFIGCAT-SDKKEY header.
Only the defaultValue, targetingRules, and percentageEvaluationAttribute fields are modifiable by this endpoint.
Important: As this endpoint is doing a complete replace, it's important to set every other field that you don't want to change to its original state. Not listing one means it will reset.
For example: We have the following resource of a Feature Flag.
{
"defaultValue": {
"boolValue": false
},
"targetingRules": [
{
"conditions": [
{
"userCondition": {
"comparisonAttribute": "Email",
"comparator": "sensitiveTextEquals",
"comparisonValue": {
"stringValue": "test@example.com"
}
}
}
],
"percentageOptions": [],
"value": {
"boolValue": true
}
}
]
}
If we send a replace request body as below:
{
"defaultValue": {
"boolValue": true
}
}
Then besides that the default served value is set to true, all the Targeting Rules are deleted. So we get a response like this:
{
"defaultValue": {
"boolValue": true
},
"targetingRules": []
}
Path parameters
The identifier of the Environment.
The id of the Setting.
Query parameters
The reason note for the Audit Log if the Product's "Config changes require a reason" preference is turned on.
Whether to bypass the approval process and directly apply the change. This is only applicable for users with bypass approval permission.
Optional. The version identifier of the last change made to the Feature Flag or Setting in the Environment. It can be used to make sure concurrent updates are not overwriting each other. If provided and the version identifier does not match the current version, the update will be rejected with a 409 Conflict response. The latest version id can be acquired from the LastVersionId property of the response models.