Skip to main content
POST
/
feature-flags
Create a new feature flag configuration
curl --request POST \
  --url https://api.kameleoon.com/feature-flags \
  --header 'Content-Type: application/json' \
  --data '
{
  "featureKey": "<string>",
  "name": "<string>",
  "siteCode": "<string>",
  "attributionWindow": 123,
  "bucketingKey": {
    "bucketingKeyType": "VISITOR_CODE",
    "customDataId": 123
  },
  "description": "<string>",
  "environmentConfigurations": [
    {
      "defaultVariationKey": "<string>",
      "environmentKey": "<string>",
      "featureEnabled": true,
      "integrations": {
        "deliveryRules": "<array>",
        "experimentRules": "<array>"
      },
      "rolloutRules": [
        {
          "type": "PROGRESSIVE_DELIVERY",
          "exposition": 50,
          "id": 123,
          "name": "<string>",
          "orderIndex": 123,
          "reallocation": true,
          "rollbackConditions": [
            {
              "comparisonOperator": "GREATER_THAN",
              "criteria": "UPLIFT",
              "goalId": 123,
              "matchValue": 50.00005,
              "target": "RULE",
              "visitors": 2,
              "id": 123,
              "recipients": [
                "jsmith@example.com"
              ]
            }
          ],
          "segmentId": 123,
          "state": "ACTIVE",
          "controlVariationKey": "<string>",
          "multiArmedBandit": true,
          "trafficAllocationMethod": "CONTEXTUAL_BANDIT, MANUAL, MULTI_ARMED_BANDIT",
          "trafficAllocations": [
            {
              "exposition": 123,
              "variationId": 123,
              "variationKey": "<string>"
            }
          ]
        }
      ]
    }
  ],
  "primaryGoalId": 123,
  "secondaryGoalIds": [
    123
  ],
  "tags": [
    "<string>"
  ],
  "variables": [
    {
      "key": "<string>",
      "type": "BOOLEAN",
      "value": "<string>"
    }
  ],
  "variations": [
    {
      "key": "<string>",
      "name": "<string>",
      "variables": [
        {
          "key": "<string>",
          "value": "<string>"
        }
      ]
    }
  ]
}
'
{
  "featureKey": "<string>",
  "id": 123,
  "name": "<string>",
  "siteCode": "<string>",
  "archived": true,
  "attributionWindow": 123,
  "bucketingKey": {
    "bucketingKeyType": "VISITOR_CODE",
    "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": [
        {
          "type": "TARGETED_DELIVERY",
          "experimentId": 123,
          "id": 123,
          "name": "<string>",
          "release": {
            "releaseFrom": "2025-06-01T00:00:00Z",
            "releaseTo": "2025-06-01T23:59:00Z",
            "timeZone": "Europe/Paris"
          },
          "rollbackConditions": [
            {
              "comparisonOperator": "GREATER_THAN",
              "criteria": "UPLIFT",
              "goalId": 123,
              "id": 123,
              "matchValue": 50,
              "recipients": [
                "<string>"
              ],
              "target": "RULE",
              "visitors": 1000
            }
          ],
          "segmentId": 123,
          "status": "ACTIVE",
          "trafficAllocations": [
            {
              "exposition": 123,
              "variationId": 123,
              "variationKey": "<string>"
            }
          ],
          "controlVariationKey": "<string>",
          "exposition": 50,
          "multiArmedBandit": true,
          "trafficAllocationMethod": "CONTEXTUAL_BANDIT"
        }
      ]
    }
  ],
  "health": "PERMANENT",
  "primaryGoalId": 123,
  "secondaryGoalIds": [
    123
  ],
  "tags": [
    "<string>"
  ],
  "teamId": 123,
  "variables": [
    {
      "key": "<string>",
      "type": "BOOLEAN",
      "value": "<string>"
    }
  ],
  "variations": [
    {
      "key": "<string>",
      "name": "<string>",
      "variables": [
        {
          "key": "<string>",
          "type": "BOOLEAN",
          "value": "<string>"
        }
      ]
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json

Request to create a feature flag

featureKey
string
required

Key of the feature flag

Maximum string length: 255
Pattern: ^[a-z0-9_-]{1,255}$
name
string
required

Name of the feature flag

Maximum string length: 100
siteCode
string
required

Unique Id of the website/app for your project in the Kameleoon app

Required string length: 10
attributionWindow
integer<int64>

Attribution window in milliseconds

bucketingKey
object

Hash attribute used for targeting

description
string

Description of the feature

Maximum string length: 5000
environmentConfigurations
object[]

Environment configurations for the feature flag

primaryGoalId
integer<int32>

Primary goal associated with the feature flag

secondaryGoalIds
integer<int32>[]

Secondary goals associated with the feature flag

tags
string[]

List of tags associated with the feature flag

variables
object[]

Variables associated with the feature flag

variations
object[]

Variations for the feature flag

Response

Created

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,
SMELLY
primaryGoalId
integer<int32>

Primary goal of the feature flag

secondaryGoalIds
integer<int32>[]

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

teamId
integer<int64>
read-only

Team id

variables
object[]

Variables associated with the feature flag

variations
object[]

Variations associated with the feature flag