Skip to main content
PATCH
/
variations
/
{variationId}
Partially update a variation
curl --request PATCH \
  --url https://api.kameleoon.com/variations/{variationId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "cssCode": "<string>",
  "experimentId": 123,
  "isJsCodeAfterDomReady": true,
  "jsCode": "<string>",
  "name": "<string>",
  "shadowDom": true
}
'
{
  "name": "<string>",
  "siteId": 123,
  "color": 123,
  "cssCode": "<string>",
  "customJson": "<string>",
  "experimentId": 123,
  "expositionFrequencyDelaySecondsBetweenTwoExpositions": 123,
  "expositionFrequencySameVisit": 123,
  "expositionFrequencySameVisitor": 123,
  "expositionFrequencySameVisitorDelaySeconds": 123,
  "forceNoFlicker": true,
  "id": 123,
  "isJsCodeAfterDomReady": true,
  "jsCode": "<string>",
  "personalizationId": 123,
  "prompt": {
    "textInput": "<string>",
    "promptSource": "<string>"
  },
  "redirection": {
    "includeQueryParameters": true,
    "parameters": "param1=foo&param2=bar",
    "type": "GLOBAL_REDIRECTION",
    "url": "www.kameleoon.com"
  },
  "redirectionStrings": "<string>",
  "shadowDom": true,
  "widgetTemplateInput": "<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.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

variationId
integer<int64>
required

Body

application/json
cssCode
string

Code editor-css style

experimentId
integer<int64>

Experiment id for this variation

isJsCodeAfterDomReady
boolean

Set to true (which is also the default value) if the code is applied after the DOM is ready.

jsCode
string

Code editor-javascript code

name
string

Name of the given variation

prompt
object

Object used to define an autorun message in the variation. Triggers the creation of a message of type autorun if valid

shadowDom
boolean

ShadowDOM option

Response

OK

name
string
required

Name of the variation

siteId
integer<int64>
required

Site Id of the project the variation belongs to

color
integer<int32>

Variation color displayed in the editor

cssCode
string

Code editor css code for variation

customJson
string

Custom JSON for this variation

experimentId
integer<int64>
read-only

Id of the experiment this variation belongs to

expositionFrequencyDelaySecondsBetweenTwoExpositions
integer<int64>

Delay in seconds between two exposures

expositionFrequencySameVisit
integer<int32>

Frequency of exposure during the same visit

expositionFrequencySameVisitor
integer<int32>

Frequency of the exposure for the same visitor

expositionFrequencySameVisitorDelaySeconds
integer<int64>

Delay in seconds between exposure for the same visitor

forceNoFlicker
boolean
id
integer<int64>

Unique Id of the variation

isJsCodeAfterDomReady
boolean

Set to true (which is also the default value) if the code is applied once the DOM is ready.

jsCode
string

Code editor javascript code for variation

personalizationId
integer<int64>
read-only

Id of the personalization this variation belongs to

prompt
object

Object used to define an autorun message in the variation. Triggers the creation of a message of type autorun if valid

redirection
object

Redirection parameters of a variation

redirectionStrings
string
deprecated

Redirect URL used for redirecting variation. Deprecated property: use property 'redirection' instead

shadowDom
boolean

ShadowDOM option

widgetTemplateInput
string

Widget template input data in JSON format.