Skip to main content
PATCH
/
feature-flags
/
{siteCode}
/
{featureKey}
/
{environmentKey}
Update a feature flag configuration for a specific environment
curl --request PATCH \
  --url https://api.kameleoon.com/feature-flags/{siteCode}/{featureKey}/{environmentKey} \
  --header 'Content-Type: application/json' \
  --data '
{
  "featureKey": "<string>",
  "integrations": {
    "deliveryRules": "<array>",
    "experimentRules": "<array>"
  },
  "name": "<string>",
  "rolloutRules": [
    {
      "exposition": 50,
      "id": 123,
      "name": "<string>",
      "orderIndex": 123,
      "reallocation": true,
      "release": {
        "timeZone": "Europe/Paris",
        "releaseFrom": "2023-11-07T05:31:56Z",
        "releaseTo": "2023-11-07T05:31:56Z"
      },
      "rollbackConditions": [
        {
          "goalId": 123,
          "matchValue": 50.00005,
          "visitors": 2,
          "id": 123,
          "recipients": [
            "jsmith@example.com"
          ]
        }
      ],
      "segmentId": 123,
      "controlVariationKey": "<string>",
      "multiArmedBandit": true,
      "trafficAllocations": [
        {
          "exposition": 123,
          "variationId": 123,
          "variationKey": "<string>"
        }
      ]
    }
  ],
  "secondaryGoalIds": [
    123
  ],
  "tags": [
    "<string>"
  ],
  "variables": [
    {
      "key": "<string>",
      "value": "<string>",
      "allowedValues": [
        "<string>"
      ]
    }
  ],
  "variations": [
    {
      "key": "<string>",
      "name": "<string>",
      "variables": [
        {
          "key": "<string>",
          "value": "<string>"
        }
      ]
    }
  ],
  "attributionWindow": 123,
  "bucketingKey": {
    "customDataId": 123
  },
  "defaultVariationKey": "<string>",
  "description": "<string>",
  "featureEnabled": true,
  "isArchived": true,
  "primaryGoalId": 123
}
'
{
  "featureKey": "<string>",
  "id": 123,
  "name": "<string>",
  "siteCode": "<string>",
  "archived": true,
  "attributionWindow": 123,
  "bucketingKey": {
    "customDataId": 123
  },
  "createdById": 123,
  "dateContentModified": "2023-11-07T05:31:56Z",
  "dateCreated": "2023-11-07T05:31:56Z",
  "dateModified": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "environmentConfigurations": [
    {
      "dateModified": "2023-11-07T05:31:56Z",
      "defaultVariationKey": "<string>",
      "environmentKey": "<string>",
      "featureEnabled": true,
      "integrations": {
        "deliveryRules": "<array>",
        "experimentRules": "<array>"
      },
      "rolloutRules": [
        {
          "experimentId": 123,
          "id": 123,
          "name": "<string>",
          "release": {
            "releaseFrom": "2023-11-07T05:31:56Z",
            "releaseTo": "2023-11-07T05:31:56Z",
            "timeZone": "Europe/Paris"
          },
          "rollbackConditions": [
            {
              "goalId": 123,
              "id": 123,
              "matchValue": 50,
              "recipients": [
                "<string>"
              ],
              "visitors": 1000
            }
          ],
          "segmentId": 123,
          "trafficAllocations": [
            {
              "exposition": 123,
              "variationId": 123,
              "variationKey": "<string>"
            }
          ],
          "controlVariationKey": "<string>",
          "exposition": 50,
          "multiArmedBandit": true
        }
      ]
    }
  ],
  "primaryGoalId": 123,
  "secondaryGoalIds": [
    123
  ],
  "tags": [
    "<string>"
  ],
  "teamId": 123,
  "variables": [
    {
      "key": "<string>",
      "value": "<string>",
      "allowedValues": [
        "<string>"
      ]
    }
  ],
  "variations": [
    {
      "key": "<string>",
      "name": "<string>",
      "variables": [
        {
          "key": "<string>",
          "value": "<string>"
        }
      ]
    }
  ]
}

Path Parameters

siteCode
string
required
Required string length: 10
featureKey
string
required
Minimum string length: 1
environmentKey
string
required
Minimum string length: 1

Body

application/json

Represents the input object for patching a feature flag for a specific environment

featureKey
string
required

Key used to identify the feature flag

Required string length: 1 - 255
integrations
object
required

Integrations associated with the feature flag environment

name
string
required

Name of the feature flag

Required string length: 1 - 100
rolloutRules
object[]
required

The rollout rules for this environment

Represents an experimentation rule configuration

secondaryGoalIds
integer<int32>[]
required

Secondary goals associated with the feature flag

Secondary goals associated with the feature flag

tags
string[]
required

List of tags associated with the feature flag

List of tags associated with the feature flag

variables
object[]
required

Variables associated with the feature flag

variations
object[]
required

Variations associated with the feature flag

attributionWindow
integer<int64>

Attribution window in milliseconds

bucketingKey
object

Bucketing key used for the feature flag

defaultVariationKey
string

The default variation key to serve in this environment

Maximum string length: 255
description
string

Description of the feature flag

Maximum string length: 5000
featureEnabled
boolean

Indicates if the feature flag is enabled in this environment

isArchived
boolean

Flag indicating if the feature flag is archived

primaryGoalId
integer<int32>

Primary goal associated with the feature flag

Response

OK

Configuration for the feature flag

featureKey
string
required

Key used to identify the feature flag

Required string length: 1 - 255
id
integer<int32>
required
read-only

System-generated unique string of integers to identify a feature flag

name
string
required

Name of the feature flag

Required string length: 1 - 100
siteCode
string
required

Unique Id for the project in the Kameleoon app. This is an optional field to be included as query parameters

Required string length: 1 - 10
archived
boolean
attributionWindow
integer<int64>

Attribution window

bucketingKey
object

Bucketing key used for the feature flag

createdById
integer<int32>
read-only

Created by id

dateContentModified
string<date-time>
read-only

Date and time when the feature flag configuration content was last modified

dateCreated
string<date-time>
read-only

Date and time when the feature flag configuration was created

dateModified
string<date-time>
read-only

Date and time when the feature flag configuration was last modified

description
string

Description of the feature

Maximum string length: 5000
environmentConfigurations
object[]

Environment-specific configurations for the feature flag

health
enum<string>
read-only

Health of the feature flag (for temporary ones)

Available options:
PERMANENT,
HEALTHY,
STALE,
OUTDATED
primaryGoalId
integer<int32>

Primary goal of the feature flag

secondaryGoalIds
integer<int32>[]

Secondary goals associated with the feature flag

Secondary goals associated with the feature flag

tags
string[]

List of tags associated with the feature flag. This is an optional field to be included as query parameters

List of tags associated with the feature flag. This is an optional field to be included as query parameters

teamId
integer<int64>
read-only

Team id

variables
object[]

Variables associated with the feature flag

variations
object[]

Variations associated with the feature flag