---
title: "Replace Flag"
method: PUT
path: "/v1/settings/{settingId}"
tags: ["Feature Flags & Settings"]
---

# Replace Flag

`PUT /v1/settings/{settingId}`

This endpoint replaces the whole value of a Feature Flag or Setting
identified by the `settingId` parameter.

**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.

## Path parameters

- `settingId` integer, required

## Request body

- ReplaceSettingModel
  - `name` string, required — The name of the Feature Flag or Setting.
  - `hint` string, nullable — A short description for the setting, shown on the Dashboard UI.
  - `tags` integer[], nullable — The IDs of the tags which are attached to the setting.
  - `order` integer, nullable — The order of the Setting represented on the ConfigCat Dashboard. Determined from an ascending sequence of integers.
  - `isJson` boolean, nullable — Indicates whether this setting should validate string values as JSON values.

## Response `200`

When the replace was successful.

- SettingModel — 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.
  - `order` integer, required — The order of the Feature Flag or Setting represented on the ConfigCat Dashboard.
  - `settingType` 'boolean' | 'string' | 'int' | 'double', required — The type of the Feature Flag or Setting.
  - `isJson` boolean, required
  - `configId` string, uuid, required — Identifier of the Feature Flag's Config.
  - `configName` string, required — Name of the Feature Flag's Config.
  - `createdAt` string, date-time, nullable, required — The creation time of the Feature Flag or Setting.
  - `tags` TagModel[], required — The tags attached to the Feature Flag or Setting.
    - `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.
    - `tagId` integer, required — Identifier of the Tag.
    - `name` string, required — Name of the Tag.
    - `color` string, nullable, required — The configured color of the Tag.
  - `predefinedVariations` PredefinedVariationModel[], required — The Feature Flag or Setting's Variations.
    - `value` PredefinedVariationValueModel, required — Represents the value of a Predefined Variation.
      - `boolValue` boolean, nullable, required — The served value in case of a boolean Feature Flag.
      - `stringValue` string, nullable, required — The served value in case of a text Setting.
      - `intValue` integer, nullable, required — The served value in case of a whole number Setting.
      - `doubleValue` number, double, nullable, required — The served value in case of a decimal number Setting.
    - `name` string, nullable, required — The name of the Predefined Variation, shown on the Dashboard UI. If not set, the Value will be shown.
    - `hint` string, nullable, required — The name of the Predefined Variation, shown on the Dashboard UI. If not set, the Value will be shown.
    - `predefinedVariationId` string, uuid, required — The Predefined Variation's identifier.

## 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/versions/6b4d53bc1455/schema)
