curl --request POST \
--url https://api.kameleoon.com/experiments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"baseURL": "<string>",
"name": "<string>",
"siteId": 123,
"autoOptimized": true,
"collectingDataEnabled": true,
"commonCssCode": "<string>",
"commonJavaScriptCode": "<string>",
"description": "<string>",
"deviations": {
"12345": 0.5,
"origin": 0.5
},
"executeCodeForReference": true,
"globalScript": "<string>",
"goals": [
123
],
"isLegacyEditor": true,
"isMultipleTestingCorrection": true,
"mainGoalId": 123,
"mvtAllocationSettings": {
"combinationsAllocations": [
{
"allocationPart": 123,
"checked": true,
"locked": true,
"sectionId": 123,
"variationId": "<string>"
}
],
"exposedPart": 123,
"sectionsAllocations": [
{
"allocationPart": 123,
"checked": true,
"locked": true,
"sectionId": 123,
"variationId": "<string>"
}
]
},
"mvtVariations": [
{
"sectionId": 123,
"sectionName": "<string>",
"variations": [
{
"id": 123,
"name": "<string>"
}
]
}
],
"respoolTime": {
"12345": 833760000,
"origin": 1704067200
},
"tags": [
"<string>"
],
"targetingConfiguration": "ALL_VISITORS",
"targetingSegmentId": 123,
"trackingTools": [
{
"adobeOmnitureObject": "<string>",
"comScoreCustomerId": "<string>",
"comScoreDomain": "<string>",
"contentSquareUrl": "<string>",
"customIntegrations": [
"<string>"
],
"customVariable": 123,
"eulerianUserCentricParameter": "<string>",
"name": "GOOGLE_ANALYTICS4",
"reportingScript": "<string>",
"universalAnalyticsDimension": 123
}
],
"trafficAllocationMethod": "CONTEXTUAL_BANDIT",
"type": "AI"
}
'{
"baseURL": "<string>",
"name": "<string>",
"siteCode": "<string>",
"siteId": 123,
"autoOptimized": true,
"collectingDataEnabled": true,
"commonCssCode": "<string>",
"commonJavaScriptCode": "<string>",
"createdBy": 123,
"dateCollectingDataStopped": "2023-11-07T05:31:56Z",
"dateCreated": "2023-11-07T05:31:56Z",
"dateEnded": "2023-11-07T05:31:56Z",
"dateModified": "2023-11-07T05:31:56Z",
"dateStarted": "2023-11-07T05:31:56Z",
"dateStatusModified": "2023-11-07T05:31:56Z",
"description": "<string>",
"deviations": {
"12345": 0.5,
"origin": 0.5
},
"executeCodeForReference": true,
"globalScript": "<string>",
"goals": [
123
],
"id": 123,
"isArchived": true,
"isLegacyEditor": true,
"isMultipleTestingCorrection": true,
"mainGoalId": 123,
"mvtAllocationSettings": {
"combinationsAllocations": [
{
"allocationPart": 123,
"checked": true,
"locked": true,
"sectionId": 123,
"variationId": "<string>"
}
],
"exposedPart": 123,
"sectionsAllocations": [
{
"allocationPart": 123,
"checked": true,
"locked": true,
"sectionId": 123,
"variationId": "<string>"
}
]
},
"mvtVariations": [
{
"sectionId": 123,
"sectionName": "<string>",
"variations": [
{
"id": 123,
"name": "<string>"
}
]
}
],
"respoolTime": {
"12345": 833760000,
"origin": 1704067200
},
"status": "<string>",
"tags": [
"<string>"
],
"targetingConfiguration": "ALL_VISITORS",
"targetingRule": {
"siteId": 123,
"id": 123,
"segmentConfiguration": "ALL_VISITORS",
"segmentId": 123,
"targetingConfigurationParam": "<string>",
"triggerConfiguration": "ALL_VISITORS",
"triggerId": 123
},
"targetingRuleId": 123,
"targetingSegmentId": 123,
"trackingTools": [
{
"adobeOmnitureObject": "<string>",
"comScoreCustomerId": "<string>",
"comScoreDomain": "<string>",
"contentSquareUrl": "<string>",
"customIntegrations": [
"<string>"
],
"customVariable": 123,
"eulerianUserCentricParameter": "<string>",
"name": "GOOGLE_ANALYTICS4",
"reportingScript": "<string>",
"universalAnalyticsDimension": 123
}
],
"trafficAllocationMethod": "CONTEXTUAL_BANDIT",
"type": "AI",
"variations": [
123
]
}Creates a new experiment with the specified parameters.
curl --request POST \
--url https://api.kameleoon.com/experiments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"baseURL": "<string>",
"name": "<string>",
"siteId": 123,
"autoOptimized": true,
"collectingDataEnabled": true,
"commonCssCode": "<string>",
"commonJavaScriptCode": "<string>",
"description": "<string>",
"deviations": {
"12345": 0.5,
"origin": 0.5
},
"executeCodeForReference": true,
"globalScript": "<string>",
"goals": [
123
],
"isLegacyEditor": true,
"isMultipleTestingCorrection": true,
"mainGoalId": 123,
"mvtAllocationSettings": {
"combinationsAllocations": [
{
"allocationPart": 123,
"checked": true,
"locked": true,
"sectionId": 123,
"variationId": "<string>"
}
],
"exposedPart": 123,
"sectionsAllocations": [
{
"allocationPart": 123,
"checked": true,
"locked": true,
"sectionId": 123,
"variationId": "<string>"
}
]
},
"mvtVariations": [
{
"sectionId": 123,
"sectionName": "<string>",
"variations": [
{
"id": 123,
"name": "<string>"
}
]
}
],
"respoolTime": {
"12345": 833760000,
"origin": 1704067200
},
"tags": [
"<string>"
],
"targetingConfiguration": "ALL_VISITORS",
"targetingSegmentId": 123,
"trackingTools": [
{
"adobeOmnitureObject": "<string>",
"comScoreCustomerId": "<string>",
"comScoreDomain": "<string>",
"contentSquareUrl": "<string>",
"customIntegrations": [
"<string>"
],
"customVariable": 123,
"eulerianUserCentricParameter": "<string>",
"name": "GOOGLE_ANALYTICS4",
"reportingScript": "<string>",
"universalAnalyticsDimension": 123
}
],
"trafficAllocationMethod": "CONTEXTUAL_BANDIT",
"type": "AI"
}
'{
"baseURL": "<string>",
"name": "<string>",
"siteCode": "<string>",
"siteId": 123,
"autoOptimized": true,
"collectingDataEnabled": true,
"commonCssCode": "<string>",
"commonJavaScriptCode": "<string>",
"createdBy": 123,
"dateCollectingDataStopped": "2023-11-07T05:31:56Z",
"dateCreated": "2023-11-07T05:31:56Z",
"dateEnded": "2023-11-07T05:31:56Z",
"dateModified": "2023-11-07T05:31:56Z",
"dateStarted": "2023-11-07T05:31:56Z",
"dateStatusModified": "2023-11-07T05:31:56Z",
"description": "<string>",
"deviations": {
"12345": 0.5,
"origin": 0.5
},
"executeCodeForReference": true,
"globalScript": "<string>",
"goals": [
123
],
"id": 123,
"isArchived": true,
"isLegacyEditor": true,
"isMultipleTestingCorrection": true,
"mainGoalId": 123,
"mvtAllocationSettings": {
"combinationsAllocations": [
{
"allocationPart": 123,
"checked": true,
"locked": true,
"sectionId": 123,
"variationId": "<string>"
}
],
"exposedPart": 123,
"sectionsAllocations": [
{
"allocationPart": 123,
"checked": true,
"locked": true,
"sectionId": 123,
"variationId": "<string>"
}
]
},
"mvtVariations": [
{
"sectionId": 123,
"sectionName": "<string>",
"variations": [
{
"id": 123,
"name": "<string>"
}
]
}
],
"respoolTime": {
"12345": 833760000,
"origin": 1704067200
},
"status": "<string>",
"tags": [
"<string>"
],
"targetingConfiguration": "ALL_VISITORS",
"targetingRule": {
"siteId": 123,
"id": 123,
"segmentConfiguration": "ALL_VISITORS",
"segmentId": 123,
"targetingConfigurationParam": "<string>",
"triggerConfiguration": "ALL_VISITORS",
"triggerId": 123
},
"targetingRuleId": 123,
"targetingSegmentId": 123,
"trackingTools": [
{
"adobeOmnitureObject": "<string>",
"comScoreCustomerId": "<string>",
"comScoreDomain": "<string>",
"contentSquareUrl": "<string>",
"customIntegrations": [
"<string>"
],
"customVariable": 123,
"eulerianUserCentricParameter": "<string>",
"name": "GOOGLE_ANALYTICS4",
"reportingScript": "<string>",
"universalAnalyticsDimension": 123
}
],
"trafficAllocationMethod": "CONTEXTUAL_BANDIT",
"type": "AI",
"variations": [
123
]
}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.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
URL of the website to load in editor and preview mode
Name of the experiment
Site Id of the project the experiment belongs to
Deprecated. Use trafficAllocationMethod field instead
Indicates if data collection is enabled
CSS code specific to all variations
JavaScript code specific to all variations
Traffic allocation per variation. Key can be 'origin'(for original page) or variation id.Value is the percentage of traffic which will be directed to this variation.It has to be double numbers ranging from 0(0%) to 1(100%).
Show child attributes
{ "12345": 0.5, "origin": 0.5 }JavaScript code that will be applied only to the selected experiment and executed in the end of the Global custom script
List of Ids of the goals being used by this experiment.For GET requests, this is an optional field that needs to be specified in request params
List of Ids of the goals being used by this experiment.For GET requests, this is an optional field that needs to be specified in request params
Indicates whether multiple testing correction is enabled
Show child attributes
Show child attributes
The respoolTime map contains key-value pairs, where each key is a variation ID and the corresponding value is a timestamp representing the most recent change to the variation’s allocation (for example, using the Kameleoon app or the Automation API).
Show child attributes
{ "12345": 833760000, "origin": 1704067200 }List of tags being used by this experiment.For GET requests, this is an optional field that needs to be specified in request params.
List of tags being used by this experiment.For GET requests, this is an optional field that needs to be specified in request params.
Deprecated. Use the https://api.kameleoon.com/targeting-rules endpoint to update the targeting of your experiment
ALL_VISITORS, AUTOPROMO_AUTODEFINED, GRAPHICAL_PAGES, HEAT_SLICE, PAGE, SAVED_TEMPLATE, SITE, URL Targeting Rule defines the conditions for displaying content to specific user groups based on segments and triggers
Show child attributes
Deprecated. Use the https://api.kameleoon.com/targeting-rules endpoint to update the targeting of your experiment
Show child attributes
CONTEXTUAL_BANDIT, MANUAL, MULTI_ARMED_BANDIT AI, CLASSIC, DEVELOPER, FEATURE_FLAG, MVT, PROMPT, SDK_HYBRID Created
URL of the website to load in editor and preview mode
Name of the experiment
Site code of the experiment
Site Id of the project the experiment belongs to
Deprecated. Use trafficAllocationMethod field instead
Indicates if data collection is enabled
CSS code specific to all variations
JavaScript code specific to all variations
Account Id of the creator of the experiment
Date the data collection stops
Date the experiment ceased
Date the experiment was modified
Date the experiment was launched
Date the experiment was last modified
Traffic allocation per variation. Key can be 'origin'(for original page) or variation id.Value is the percentage of traffic which will be directed to this variation.It has to be double numbers ranging from 0(0%) to 1(100%).
Show child attributes
{ "12345": 0.5, "origin": 0.5 }JavaScript code that will be applied only to the selected experiment and executed in the end of the Global custom script
List of Ids of the goals being used by this experiment.For GET requests, this is an optional field that needs to be specified in request params
List of Ids of the goals being used by this experiment.For GET requests, this is an optional field that needs to be specified in request params
Unique Id of the experiment
Indicates if experiment is archived
Indicates whether multiple testing correction is enabled
Show child attributes
Show child attributes
The respoolTime map contains key-value pairs, where each key is a variation ID and the corresponding value is a timestamp representing the most recent change to the variation’s allocation (for example, using the Kameleoon app or the Automation API).
Show child attributes
{ "12345": 833760000, "origin": 1704067200 }Status of the experiment
List of tags being used by this experiment.For GET requests, this is an optional field that needs to be specified in request params.
List of tags being used by this experiment.For GET requests, this is an optional field that needs to be specified in request params.
Deprecated. Use the https://api.kameleoon.com/targeting-rules endpoint to update the targeting of your experiment
ALL_VISITORS, AUTOPROMO_AUTODEFINED, GRAPHICAL_PAGES, HEAT_SLICE, PAGE, SAVED_TEMPLATE, SITE, URL Targeting Rule defines the conditions for displaying content to specific user groups based on segments and triggers
Show child attributes
Deprecated. Use TargetingRule instead.
Deprecated. Use the https://api.kameleoon.com/targeting-rules endpoint to update the targeting of your experiment
Show child attributes
CONTEXTUAL_BANDIT, MANUAL, MULTI_ARMED_BANDIT AI, CLASSIC, DEVELOPER, FEATURE_FLAG, MVT, PROMPT, SDK_HYBRID List of variation ids for this experiment
List of variation ids for this experiment
Was this page helpful?