Skip to main content

Update a feature flag configuration for a specific environment

PATCH 

/feature-flags/:siteCode/:featureKey/:environmentKey

Updates the configuration of a feature flag using a JSON Merge Patch for the specified site code, feature key, and environment key. Note: If you need to modify an element within an array, the entire array — including all its fields — must be provided, as partial updates to array elements are not supported.

Request

Path Parameters

    siteCode stringrequired

    Possible values: >= 10 characters and <= 10 characters

    featureKey stringrequired

    Possible values: non-empty

    environmentKey stringrequired

    Possible values: non-empty

Body

required

    attributionWindow int64

    Attribution window in milliseconds

    bucketingKey

    object

    oneOf

    bucketingKeyType string

    Possible values: [VISITOR_CODE, CUSTOM_DATA]

    customDataId int64
    defaultVariationKey string

    The default variation key to serve in this environment

    Possible values: <= 255 characters

    description string

    Description of the feature flag

    Possible values: <= 5000 characters

    featureEnabled boolean

    Indicates if the feature flag is enabled in this environment

    featureKey stringrequired

    Key used to identify the feature flag

    Possible values: non-empty and <= 255 characters

    integrations

    object

    required

    Integrations associated with the feature flag environment

    deliveryRules

    object[]

    List of integrations enabled for delivery rules

  • Array [

  • 0
    1
    2
    3
    4
    5
    6
    7
    8
    9
  • ]

  • experimentRules

    object[]

    List of integrations enabled for experimentation rules

  • Array [

  • 0
    1
    2
    3
    4
    5
    6
    7
    8
    9
  • ]

  • isArchived boolean

    Flag indicating if the feature flag is archived

    name stringrequired

    Name of the feature flag

    Possible values: non-empty and <= 100 characters

    primaryGoalId int32

    Primary goal associated with the feature flag

    rolloutRules

    object[]

    required

    The rollout rules for this environment

  • Array [

  • oneOf

    Represents an experimentation rule configuration

    id int32

    ID of the rule

    name string

    Name of the rule

    Possible values: <= 100 characters

    orderIndex int32

    Order index of the rule execution

    reallocation boolean

    Perform traffic reallocation

    release

    object

    Defines the release period for the rule

    releaseFrom date-time

    Rule being applied from this date

    releaseTo date-time

    Rule being applied to this date

    timeZone stringrequired

    Timezone regarding the release of this rule

    Example: Europe/Paris

    rollbackConditions

    object[]

    Conditions under which the rule will be rolled back

  • Array [

  • comparisonOperator stringrequired

    The rollback condition comparison operator

    Possible values: [GREATER_THAN, LESS_THAN]

    criteria stringrequired

    The rollback condition criteria

    Possible values: [UPLIFT, DOWNLIFT, CONVERSION_RATE]

    goalId int32required

    The rollback condition goal ID

    id int32

    The rollback condition ID

    matchValue doublerequired

    The rollback condition match value (0.0001 to 100)

    Possible values: >= 0.0001 and <= 100

    recipients email[]

    List of emails of recipients who will be notified when conditions are triggered

    target stringrequired

    The rollback condition target

    Possible values: [RULE, ENVIRONMENT]

    visitors int32required

    The rollback condition visitors

    Possible values: >= 1

  • ]

  • segmentId int32

    ID of the segment targeted by this rule

    state string

    Wished state of the rule

    Possible values: [ACTIVE, PAUSED]

    type stringrequired

    Type of the rule

    Possible values: [PROGRESSIVE_DELIVERY, TARGETED_DELIVERY, EXPERIMENTATION]

    controlVariationKey string

    Key of the control variation for this rule

    exposition int32

    Percentage of the traffic exposed to this rule

    Possible values: <= 100

    multiArmedBandit booleandeprecated

    Enable dynamic allocation for this rule (Multi-Armed Bandit)

    trafficAllocationMethod string

    Defines how traffic is distributed in the SDK

    Possible values: [CONTEXTUAL_BANDIT, MANUAL, MULTI_ARMED_BANDIT]

    trafficAllocations

    object[]

    Traffic allocation settings for the rule

  • Array [

  • exposition double
    variationId int32
    variationKey string
  • ]

  • ]

  • secondaryGoalIds int32[]required

    Secondary goals associated with the feature flag

    tags string[]required

    List of tags associated with the feature flag

    variables

    object[]

    required

    Variables associated with the feature flag

  • Array [

  • key stringrequired

    Key to identify the variable

    Possible values: <= 255 characters

    type stringrequired

    Type of the variable

    Possible values: [BOOLEAN, NUMBER, STRING, JSON, JS, CSS]

    value stringrequired

    Value of the variable

    Possible values: non-empty

  • ]

  • variations

    object[]

    required

    Variations associated with the feature flag

  • Array [

  • key stringrequired

    Key of the variation

    Possible values: <= 255 characters

    name stringrequired

    Name of the variation

    Possible values: <= 255 characters

    variables

    object[]

    Set of variables implemented by the variation

  • Array [

  • key stringrequired

    Key to identify the variable

    Possible values: <= 255 characters

    value stringrequired

    Value of the variable

    Possible values: non-empty

  • ]

  • ]

Responses

OK

Schema

    archived boolean
    attributionWindow int64

    Attribution window

    bucketingKey

    object

    Bucketing key used for the feature flag

    oneOf

    bucketingKeyType string

    Possible values: [VISITOR_CODE, CUSTOM_DATA]

    customDataId int64
    dateContentModified date-time

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

    dateCreated date-time

    Date and time when the feature flag configuration was created

    dateModified date-time

    Date and time when the feature flag configuration was last modified

    description string

    Description of the feature

    Possible values: <= 5000 characters

    environmentConfigurations

    object[]

    Environment-specific configurations for the feature flag

  • Array [

  • dateModified date-time

    The date when this environment configuration was last modified

    defaultVariationKey string

    Default variation key to serve in this environment

    environmentKey string

    Environment key of this configuration

    featureEnabled boolean

    Indicates if the feature flag is enabled in this environment

    integrations

    object

    Integrations associated with the feature flag environment

    deliveryRules

    object[]

    List of integrations enabled for delivery rules

  • Array [

  • 0
    1
    2
    3
    4
    5
    6
    7
    8
    9
  • ]

  • experimentRules

    object[]

    List of integrations enabled for experimentation rules

  • Array [

  • 0
    1
    2
    3
    4
    5
    6
    7
    8
    9
  • ]

  • rolloutRules

    object[]

    Rollout rules for this environment

  • Array [

  • oneOf

    Rule which can specify a segment of visitors to be exposed to an experimentation

    experimentId int32

    ID of the experiment linked to this rule

    id int32

    Unique identifier of the rule

    name string

    Name of the rule

    release

    object

    Release date information about this rule

    releaseFrom date-time

    Rule being applied from this date

    Example: 2025-06-01T00:00:00
    releaseTo date-time

    Rule being applied to this date

    Example: 2025-06-01T23:59:00
    timeZone string

    Timezone regarding the release of this rule

    Example: Europe/Paris

    rollbackConditions

    object[]

    Conditions for defining rollback

  • Array [

  • comparisonOperator string

    The rollback condition comparison operator

    Possible values: [GREATER_THAN, LESS_THAN]

    criteria string

    The rollback condition criteria

    Possible values: [UPLIFT, DOWNLIFT, CONVERSION_RATE]

    goalId int32

    The rollback condition goal ID

    id int32

    The rollback condition ID

    matchValue double

    The rollback condition match value

    Possible values: >= 0.0001 and <= 100

    Example: 50
    recipients string[]

    List of emails of recipients who will be notified when conditions are triggered

    target string

    The rollback condition target

    Possible values: [RULE, ENVIRONMENT]

    visitors int32

    The rollback condition visitors

    Possible values: >= 1

    Example: 1000
  • ]

  • segmentId int32

    ID of the segment linked to this rule

    status string

    Status of the rule

    Possible values: [ACTIVE, PAUSED, PLANNED]

    trafficAllocations

    object[]

    Traffic allocation settings for the rule

  • Array [

  • exposition double
    variationId int32
    variationKey string
  • ]

  • type stringrequired

    Type of the rule

    Possible values: [TARGETED_DELIVERY, PROGRESSIVE_DELIVERY, EXPERIMENTATION]

    controlVariationKey string
    exposition int32

    Percentage of the traffic exposed to this rule

    Possible values: <= 100

    multiArmedBandit booleandeprecated

    (Deprecated, use trafficAllocationMethod instead) Enable dynamic allocation for this rule (Multi-Armed Bandit)

    trafficAllocationMethod string

    Defines how traffic is distributed in the SDK

    Possible values: [CONTEXTUAL_BANDIT, MANUAL, MULTI_ARMED_BANDIT]

  • ]

  • ]

  • featureKey stringrequired

    Key used to identify the feature flag

    Possible values: non-empty and <= 255 characters

    health string

    Health of the feature flag (for temporary ones)

    Possible values: [PERMANENT, HEALTHY, STALE, SMELLY]

    id int32required

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

    name stringrequired

    Name of the feature flag

    Possible values: non-empty and <= 100 characters

    primaryGoalId int32

    Primary goal of the feature flag

    secondaryGoalIds int32[]

    Secondary goals associated with the feature flag

    siteCode stringrequired

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

    Possible values: non-empty and <= 10 characters

    tags string[]

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

    variables

    object[]

    Variables associated with the feature flag

  • Array [

  • key stringrequired

    Key to identify the variable

    Possible values: <= 255

    type stringrequired

    Type of the variable

    Possible values: [BOOLEAN, NUMBER, STRING, JSON, JS, CSS]

    value stringrequired

    Value of the variable

  • ]

  • variations

    object[]

    Variations associated with the feature flag

  • Array [

  • key stringrequired

    Key of the variation

    Possible values: <= 255

    name stringrequired

    Name of the variation

    Possible values: <= 255

    variables

    object[]

    Set of variables implemented by the variation

  • Array [

  • key stringrequired

    Key to identify the variable

    Possible values: <= 255

    type stringrequired

    Type of the variable

    Possible values: [BOOLEAN, NUMBER, STRING, JSON, JS, CSS]

    value stringrequired

    Value of the variable

  • ]

  • ]

Loading...