Create new variation
POST/variations
Create new variation with given parameters
Request
- application/json
Body
required
Variation color displayed in the editor
New css style for variation
Custom JSON for this variation
Delay in seconds between two exposures
Frequency of exposure during the same visit
Frequency of the exposure for the same visitor
Delay in seconds between exposure for the same visitor
Unique identifier of the given variation
Set to true
(which is also the default value) if the code is applied once the DOM is ready.
New javascript code for variation
Name of given variation
redirection
object
Redirection parameters of a variation
In case of global redirection, option to include query parameters from the original url
Parameters used for the redirection, in case of parameter redirection
param1=foo¶m2=bar
Type of the redirection
Possible values: [GLOBAL_REDIRECTION
, PARAMETER_REDIRECTION
]
URL used for the redirection, in case of global redirection
www.kameleoon.com
Redirect URL used for redirecting variation. Deprecated property: use property 'redirection' instead
ShadowDOM option
Unique identifier of the site linked to given variation
Widget template input data in JSON format.
Responses
- 201
- 400
- 403
- 423
- 500
Created
- */*
- Schema
- Example (from schema)
Schema
Variation color displayed in the editor
New css style for variation
Custom JSON for this variation
Experiment id for this variation
Delay in seconds between two exposures
Frequency of exposure during the same visit
Frequency of the exposure for the same visitor
Delay in seconds between exposure for the same visitor
Unique identifier of the given variation
Set to true
(which is also the default value) if the code is applied once the DOM is ready.
New javascript code for variation
Name of given variation
redirection
object
Redirection parameters of a variation
In case of global redirection, option to include query parameters from the original url
Parameters used for the redirection, in case of parameter redirection
param1=foo¶m2=bar
Type of the redirection
Possible values: [GLOBAL_REDIRECTION
, PARAMETER_REDIRECTION
]
URL used for the redirection, in case of global redirection
www.kameleoon.com
Redirect URL used for redirecting variation. Deprecated property: use property 'redirection' instead
ShadowDOM option
Unique identifier of the site linked to given variation
Widget template input data in JSON format.
{
"color": 0,
"cssCode": "string",
"customJson": "string",
"experimentId": 0,
"expositionFrequencyDelaySecondsBetweenTwoExpositions": 0,
"expositionFrequencySameVisit": 0,
"expositionFrequencySameVisitor": 0,
"expositionFrequencySameVisitorDelaySeconds": 0,
"forceNoFlicker": true,
"id": 0,
"isJsCodeAfterDomReady": true,
"jsCode": "string",
"name": "string",
"redirection": {
"includeQueryParameters": true,
"parameters": "param1=foo¶m2=bar",
"type": "GLOBAL_REDIRECTION",
"url": "www.kameleoon.com"
},
"shadowDom": true,
"siteId": 0,
"widgetTemplateInput": "string"
}
Bad Request
- */*
- Schema
- Example (from schema)
Schema
Possible values: [SUCCESS
, ERROR
]
{
"code": "string",
"impersonator": "string",
"message": "string",
"name": "string",
"status": "SUCCESS",
"sub": "string",
"time": 0,
"timestamp": "2024-07-29T15:51:28.071Z"
}
Forbidden
- */*
- Schema
- Example (from schema)
Schema
Possible values: [SUCCESS
, ERROR
]
{
"code": "string",
"impersonator": "string",
"message": "string",
"name": "string",
"status": "SUCCESS",
"sub": "string",
"time": 0,
"timestamp": "2024-07-29T15:51:28.071Z"
}
Locked
- */*
- Schema
- Example (from schema)
Schema
Possible values: [SUCCESS
, ERROR
]
{
"code": "string",
"impersonator": "string",
"message": "string",
"name": "string",
"status": "SUCCESS",
"sub": "string",
"time": 0,
"timestamp": "2024-07-29T15:51:28.071Z"
}
Internal Server Error
- */*
- Schema
- Example (from schema)
Schema
Possible values: [SUCCESS
, ERROR
]
{
"code": "string",
"impersonator": "string",
"message": "string",
"name": "string",
"status": "SUCCESS",
"sub": "string",
"time": 0,
"timestamp": "2024-07-29T15:51:28.071Z"
}