---
title: Update Feature Preset.
slug: amberflo-api/update-feature-preset
docTags: 
createdAt: 2024-11-07T15:10:16.979Z
---

{
  "id": "RvFWLmF1cGOe4l4hNq6yE",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "https://app.amberflo.io/feature/preset",
    "servers": [
      {
        "url": "https://app.amberflo.io/feature/preset"
      }
    ],
    "name": "Update Feature Preset.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "metadata.feature_flag.FeaturePreset.in",
          "schema": [
            {
              "name": "id",
              "kind": "required",
              "type": "string",
              "description": "Id of the preset.",
              "example": ""
            },
            {
              "name": "label",
              "kind": "optional",
              "type": "string",
              "description": "Label of the preset.",
              "example": ""
            },
            {
              "name": "description",
              "kind": "optional",
              "type": "string",
              "description": "Description of the preset.",
              "example": ""
            },
            {
              "name": "overrides",
              "kind": "optional",
              "type": "map",
              "description": "Value of the flag override.",
              "example": "",
              "customType": "map<string, metadata.feature_flag.flag_values.FlagValue.in>",
              "schema": []
            }
          ],
          "modelRef": "#/components/schemas/metadata.feature_flag.FeaturePreset.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "metadata.feature_flag.FeaturePreset.out",
            "schema": [
              {
                "name": "id",
                "kind": "required",
                "type": "string",
                "description": "Id of the preset.",
                "example": ""
              },
              {
                "name": "label",
                "kind": "optional",
                "type": "string",
                "description": "Label of the preset.",
                "example": ""
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "string",
                "description": "Description of the preset.",
                "example": ""
              },
              {
                "name": "overrides",
                "kind": "optional",
                "type": "map",
                "description": "Value of the flag override.",
                "example": "",
                "customType": "map<string, metadata.feature_flag.flag_values.FlagValue.out>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/metadata.feature_flag.FeaturePreset.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "zKmli41DouQDdHeeR5gT-",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url https://app.amberflo.io/feature/preset \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"id\": \"\"\n     }'"
        },
        {
          "id": "CybQU06zZkh_OytrY_WDz",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"id\": \"\"\n});\n\nvar requestOptions = {\n   method: 'PUT',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/feature/preset\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "plXyh1jDPK2RHDR8hsIF7",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/feature/preset\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"id\": \"\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "phYL32WqcCNHS9LMRLt3l",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/feature/preset\"\n\npayload = json.dumps({\n   \"id\": \"\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "zKmli41DouQDdHeeR5gT-"
    },
    "results": {
      "languages": [
        {
          "id": "TuvW1MB5RZ-29pV38LHJv",
          "language": "200",
          "code": "// Successful request\n{\n  \"id\": \"\",\n  \"label\": \"\",\n  \"description\": \"\",\n  \"overrides\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "TuvW1MB5RZ-29pV38LHJv"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}