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

# Update Flag

`PATCH /v1/settings/{settingId}`

This endpoint updates the metadata of a Feature Flag or Setting 
with a collection of [JSON Patch](https://jsonpatch.com) operations in a specified Config.

Only the `name`, `hint` and `tags` attributes are modifiable by this endpoint.
The `tags` attribute is a simple collection of the [tag IDs](#operation/get-tags) attached to the given setting.

The advantage of using JSON Patch is that you can describe individual update operations on a resource
without touching attributes that you don't want to change.

For example: We have the following resource.
```json
{
  "settingId": 5345,
  "key": "myGrandFeature",
  "name": "Tihs is a naem with soem typos.",
  "hint": "This flag controls my grandioso feature.",
  "settingType": "boolean",
  "tags": [
    {
      "tagId": 0, 
      "name": "sample tag", 
      "color": "whale"
    }
  ]
}
```
If we send an update request body as below (it changes the `name` and adds the already existing tag with the id `2`):
```json
[
  {
    "op": "replace", 
    "path": "/name", 
    "value": "This is the name without typos."
  }, 
  {
    "op": "add", 
    "path": "/tags/-", 
    "value": 2
  }
]
```
Only the `name` and `tags` are updated and all the other attributes remain unchanged.
So we get a response like this:
```json
{
  "settingId": 5345, 
  "key": "myGrandFeature", 
  "name": "This is the name without typos.", 
  "hint": "This flag controls my grandioso feature.", 
  "settingType": "boolean", 
  "tags": [
    {
      "tagId": 0, 
      "name": "sample tag", 
      "color": "whale"
    }, 
    {
      "tagId": 2, 
      "name": "another tag", 
      "color": "koala"
    }
  ]
}
```

## Path parameters

- `settingId` integer, required

## Request body

- JsonPatchOperation[]
  - `op` 'unknown' | 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test', required
  - `path` string, required — The source path.
  - `from` string, nullable — The target path.
  - `value` unknown

## Response `200`

When the update 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)
