---
title: "Post values"
method: POST
path: "/v1/configs/{configId}/environments/{environmentId}/values"
tags: ["Feature Flag & Setting values"]
---

# Post values

`POST /v1/configs/{configId}/environments/{environmentId}/values`

This endpoint replaces the values of a specified Config's Feature Flags or Settings identified by the `configId` parameter
in a specified Environment identified by the `environmentId` parameter.

Only the `value`, `rolloutRules` and `percentageRules` attributes are modifiable by this endpoint.

**Important:** As this endpoint is doing a complete replace, it's important to set every other attribute that you don't 
want to change in its original state. Not listing one means it will reset.

For example: We have the following resource.
```json
{
  "settingValues": [
    {
      "rolloutPercentageItems": [
        {
          "percentage": 30,
          "value": true
        },
        {
          "percentage": 70,
          "value": false
        }
      ],
      "rolloutRules": [],
      "value": false,
      "settingId": 1
    }
  ]
}
```
If we send a replace request body as below:
```json
{ 
  "settingValues": [
    {
      "value": true,
      "settingId": 1
    }
  ]
}
```
Then besides that the default value is set to `true`, all the Percentage Rules are deleted. 
So we get a response like this:
```json
{
  "settingValues": [
    {
      "rolloutPercentageItems": [],
      "rolloutRules": [],
      "value": true,
      "setting": 
      {
        "settingId": 1
      }
    }
  ]
}
```

The `rolloutRules` property describes two types of rules:

- **Targeting rules**: When you want to add or update a targeting rule, the `comparator`, `comparisonAttribute`, and `comparisonValue` members are required.
- **Segment rules**: When you want to add add or update a segment rule, the `segmentId` which identifies the desired segment and the `segmentComparator` members are required.

## Path parameters

- `configId` string, uuid, required
- `environmentId` string, uuid, required

## Query parameters

- `reason` string

## Request body

- UpdateSettingValuesWithIdModel
  - `settingValues` UpdateSettingValueWithSettingIdModel[] — The values to update.
    - `rolloutRules` UpdateRolloutRuleModel[] — The targeting rule collection.
      - `comparisonAttribute` string, nullable — The user attribute to compare.
      - `comparator` 'isOneOf' | 'isNotOneOf' | 'contains' | 'doesNotContain' | 'semVerIsOneOf' | 'semVerIsNotOneOf' | 'semVerLess' | 'semVerLessOrEquals' | 'semVerGreater' | 'semVerGreaterOrEquals' | 'numberEquals' | 'numberDoesNotEqual' | 'numberLess' | 'numberLessOrEquals' | 'numberGreater' | 'numberGreaterOrEquals' | 'sensitiveIsOneOf' | 'sensitiveIsNotOneOf' — The comparison operator the evaluation process must use when it compares the given user attribute's value with the comparison value.
      - `comparisonValue` string, nullable — The value to compare against.
      - `value` union, required
        - boolean
        - string
        - number, double
      - `segmentComparator` 'isIn' | 'isNotIn' — The segment comparison operator used during the evaluation process.
      - `segmentId` string, uuid, nullable — The segment to compare against.
    - `rolloutPercentageItems` UpdateRolloutPercentageItemModel[] — The percentage rule collection.
      - `percentage` integer, required — The percentage value for the rule.
      - `value` union, required
        - boolean
        - string
        - number, double
    - `value` union, required
      - boolean
      - string
      - number, double
    - `settingId` integer — The id of the Setting.

## Response `200`

When everything is ok, the updated setting values returned.

- ConfigSettingValuesModel
  - `config` ConfigModel, required — Details of the Config.
    - `product` ProductModel, required — Details of the Product.
      - `organization` OrganizationModel, required — Details of the Organization.
        - `organizationId` string, uuid, required — Identifier of the Organization.
        - `name` string, required — Name of the Organization.
      - `productId` string, uuid, required — Identifier of the Product.
      - `name` string, required — Name of the Product.
      - `description` string, nullable, required — Description of the Product.
      - `order` integer, required — The order of the Product represented on the ConfigCat Dashboard. Determined from an ascending sequence of integers.
      - `reasonRequired` boolean, required — Determines whether a mandatory reason must be given every time when the Feature Flags or Settings within a Product are saved.
      - `approveRequired` boolean, required — Determines whether changes must be approved before they are applied within a Product.
    - `configId` string, uuid, required — Identifier of the Config.
    - `name` string, required — Name of the Config.
    - `description` string, nullable, required — Description of the Config.
    - `order` integer, required — The order of the Config represented on the ConfigCat Dashboard.
    - `migratedConfigId` string, uuid, nullable, required
    - `evaluationVersion` 'v1' | 'v2', required — Determines the evaluation version of a Config. Using `v2` enables the new features of Config V2 (https://configcat.com/docs/advanced/config-v2).
  - `environment` EnvironmentModel, required — Details of the Environment.
    - `product` ProductModel, required — Details of the Product.
      - `organization` OrganizationModel, required — Details of the Organization.
        - `organizationId` string, uuid, required — Identifier of the Organization.
        - `name` string, required — Name of the Organization.
      - `productId` string, uuid, required — Identifier of the Product.
      - `name` string, required — Name of the Product.
      - `description` string, nullable, required — Description of the Product.
      - `order` integer, required — The order of the Product represented on the ConfigCat Dashboard. Determined from an ascending sequence of integers.
      - `reasonRequired` boolean, required — Determines whether a mandatory reason must be given every time when the Feature Flags or Settings within a Product are saved.
      - `approveRequired` boolean, required — Determines whether changes must be approved before they are applied within a Product.
    - `environmentId` string, uuid, required — Identifier of the Environment.
    - `name` string, required — Name of the Environment.
    - `color` string, nullable, required — The configured color of the Environment.
    - `description` string, nullable, required — Description of the Environment.
    - `order` integer, required — The order of the Environment represented on the ConfigCat Dashboard.
    - `reasonRequired` boolean, required — Determines whether a mandatory reason must be given every time when the Feature Flags or Settings in the given Environment are saved.
    - `approveRequired` boolean, required — Determines whether changes must be approved before they are applied in the given Environment.
  - `readOnly` boolean, required
  - `settingValues` ConfigSettingValueModel[], required
    - `setting` SettingDataModel, required — Metadata of a Feature Flag or Setting.
      - `settingId` integer, required — Identifier of the Feature Flag or Setting.
      - `key` string, required — Key of the Feature Flag or Setting.
      - `name` string, required — Name of the Feature Flag or Setting.
      - `hint` string, nullable, required — Description of the Feature Flag or Setting.
      - `settingType` 'boolean' | 'string' | 'int' | 'double', required — The type of the Feature Flag or Setting.
      - `isJson` boolean, required — Indicates whether this setting should validate string values as JSON values.
      - `order` integer, required — The order of the Feature Flag or Setting represented on the ConfigCat Dashboard.
      - `createdAt` string, date-time, nullable, required — The creation time of the Feature Flag or Setting.
      - `creatorEmail` string, nullable, required — The user's email address who created the Feature Flag or Setting.
      - `creatorFullName` string, nullable, required — The user's name who created the Feature Flag or Setting.
      - `isWatching` boolean, required
    - `updatedAt` string, date-time, nullable, required — The last updated date and time when the Feature Flag or Setting.
    - `lastUpdaterUserEmail` string, nullable, required — The email of the user who last updated the Feature Flag or Setting.
    - `lastUpdaterUserFullName` string, nullable, required — The name of the user who last updated the Feature Flag or Setting.
    - `integrationLinks` IntegrationLinkModel[], required — The integration links attached to the Feature Flag or Setting.
      - `key` string, nullable, required
      - `description` string, nullable, required
      - `integrationLinkType` 'trello' | 'jira' | 'monday', required
      - `url` string, nullable, required
    - `settingTags` SettingTagModel[], required — The tags attached to the Feature Flag or Setting.
      - `settingTagId` integer, required
      - `tagId` integer, required
      - `name` string, required
      - `color` string, nullable, required
    - `rolloutRules` RolloutRuleModel[], required — The targeting rule collection.
      - `comparisonAttribute` string, nullable, required — The user attribute to compare.
      - `comparator` 'isOneOf' | 'isNotOneOf' | 'contains' | 'doesNotContain' | 'semVerIsOneOf' | 'semVerIsNotOneOf' | 'semVerLess' | 'semVerLessOrEquals' | 'semVerGreater' | 'semVerGreaterOrEquals' | 'numberEquals' | 'numberDoesNotEqual' | 'numberLess' | 'numberLessOrEquals' | 'numberGreater' | 'numberGreaterOrEquals' | 'sensitiveIsOneOf' | 'sensitiveIsNotOneOf', required — The comparison operator the evaluation process must use when it compares the given user attribute's value with the comparison value.
      - `comparisonValue` string, nullable, required — The value to compare against.
      - `value` union, required
        - boolean
        - string
        - number, double
      - `segmentComparator` 'isIn' | 'isNotIn', required — The segment comparison operator used during the evaluation process.
      - `segmentId` string, uuid, nullable, required — The segment to compare against.
    - `rolloutPercentageItems` RolloutPercentageItemModel[], required — The percentage rule collection.
      - `percentage` integer, required — The percentage value for the rule.
      - `value` union, required
        - boolean
        - string
        - number, double
    - `value` union, required
      - boolean
      - string
      - number, double
  - `featureFlagLimitations` FeatureFlagLimitations, required — Subscription limitations regarding Feature flag or Setting values and targeting.
    - `maxPercentageOptionCount` integer, required — Maximum number of percentage options a Feature Flag or Setting can have within a targeting rule.
    - `maxTargetingRuleCount` integer, required — Maximum number of targeting rules a Feature Flag or Setting can have.
    - `maxComparisonValueLength` integer, required — Maximum length of a text comparison value.
    - `maxComparisonValueListLength` integer, required — Maximum item count of a list comparison value.
    - `maxComparisonValueListItemLength` integer, required — Maximum length of a list comparison value's item.
    - `maxStringFlagValueLength` integer, required — Maximum length of a text Setting's value.
    - `maxConditionPerTargetingRuleCount` integer, required — Maximum number of `AND` conditions a Feature Flag or Setting can have within a targeting rule.

## Other responses

- `400` — Bad request.
- `404` — Not found.
- `429` — Too many requests. In case of the request rate exceeds the rate limits.

---

[API](https://skmtc.net/configcat/apis/configcat-public-management-api.md) · [All operations](https://skmtc.net/configcat/apis/configcat-public-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/configcat/configcat-public-management-api/revisions/6b4d53bc1455/schema)
