v1

latestOpenAPI 3.0.32026-07-22177397578.0 KB
Experiment

Partially update experiment

Update several fields of an experiment. For a multivariate test (MVT) experiment, use this endpoint to set custom traffic allocation after creation: submit mvtAllocationSettings with the generated section, variation, and combination IDs returned by a GET request. See Create a multivariate experiment.

patch/experiments/{experimentId}

Path parameters

experimentIdinteger required

Query parameters

action'ACTIVATE' | 'PAUSE' | 'RESUME' | 'STOP' | 'SCHEDULE' | 'DEACTIVATE' | 'REVERT_TO_DRAFT'

Action to change the status of experiment

Request body

autoOptimizedboolean

Deprecated. Use trafficAllocationMethod field instead

baseURLstring

URL of the website to load in the editor and preview mode

commonCssCodestring

CSS code specific to all variations

commonJavaScriptCodestring

JavaScript code specific to all variations

descriptionstring

Description of the experiment

deviationsobject

Traffic allocation per variation. Key can be 'origin' (for original page) or variation Id. Value is the percentage of traffic which will be allocated to this variation. It has to be double numbers ranging from 0(0%) to 1(100%).

globalScriptstring

JavaScript code that will be executed only for the selected experiment at the end of the Global custom script.

goalsinteger[]

Goal Id(s) associated with this experiment

identificationKeystring
isMultipleTestingCorrectionboolean

Indicates whether multiple testing correction is enabled

mainGoalIdinteger

Main goal Id of the experiment

namestring

Name of the experiment

respoolTimeobject

The respoolTime map contains key-value pairs where each key is a variation ID and the corresponding value is a timestamp that represents the most recent change to the variation allocation, such as through the Kameleoon app or the Automation API.

tagsstring[]

Tags belonging to this experiment

targetingConfiguration'ALL_VISITORS' | 'AUTOPROMO_AUTODEFINED' | 'GRAPHICAL_PAGES' | 'HEAT_SLICE' | 'PAGE' | 'SAVED_TEMPLATE' | 'SITE' | 'URL'

Deprecated. Use the https://api.kameleoon.com/targeting-rules endpoint to update the targeting of your experiment

targetingSegmentIdinteger

Deprecated. Use the https://api.kameleoon.com/targeting-rules endpoint to update the targeting of your experiment

trafficAllocationMethod'CONTEXTUAL_BANDIT' | 'MANUAL' | 'MULTI_ARMED_BANDIT'

Method for allocating traffic across variations. Set to MANUAL to control the allocation yourself using deviations (classic and developer experiments) or mvtAllocationSettings (multivariate test experiments).

Example request

{
  "deviations": {
    "12345": 0.5,
    "origin": 0.5
  },
  "respoolTime": {
    "12345": 1704067200,
    "origin": 833760000
  }
}

Response

OK