---
title: "Create Flag"
method: POST
path: "/v1/configs/{configId}/settings"
tags: ["Feature Flags & Settings"]
---

# Create Flag

`POST /v1/configs/{configId}/settings`

This endpoint creates a new Feature Flag or Setting in a specified Config
identified by the `configId` parameter.

**Important:** The `key` attribute must be unique within the given Config.

## Path parameters

- `configId` string, uuid, required

## Request body

- CreateSettingInitialValues
  - `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.
  - `key` string, required — The key of the Feature Flag or Setting.
  - `settingType` 'boolean' | 'string' | 'int' | 'double', required — The type of the Feature Flag or Setting.
  - `predefinedVariations` CreatePredefinedVariationModel[], nullable — The Feature Flag or Setting's Variations.
    - `value` CreatePredefinedVariationValueModel, required — Represents the value of a Predefined Variation.
      - `boolValue` boolean, nullable — The served value in case of a boolean Feature Flag.
      - `stringValue` string, nullable — The served value in case of a text Setting.
      - `intValue` integer, nullable — The served value in case of a whole number Setting.
      - `doubleValue` number, double, nullable — The served value in case of a decimal number Setting.
    - `name` string, nullable — The name of the Predefined Variation, shown on the Dashboard UI. If not set, the Value will be shown.
    - `hint` string, nullable — The name of the Predefined Variation, shown on the Dashboard UI. If not set, the Value will be shown.
  - `initialValues` InitialValue[], nullable — Optional, initial value of the Feature Flag or Setting in the given Environments. Only one of the SettingIdToInitFrom or the InitialValues properties can be set.
    - `environmentId` string, uuid — The ID of the Environment where the initial value must be set.
    - `value` union, required
      - boolean
      - string
      - number, double
  - `settingIdToInitFrom` integer, nullable — Optional, the SettingId to initialize the values and tags of the Feature Flag or Setting from. Only can be set if you have at least ReadOnly access in all the Environments. Only one of the SettingIdToInitFrom or the InitialValues properties can be set.

## Response `201`

When the creation 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/revisions/88fd971944d7/schema)
