REST API (Server-Side API)

Welcome to Kameleoon API! This API will allow you to use every entity of Kameleoon application inside your own application. Find the full list of the supported functionalities on this page.

Rest Auth

Get Token

Create temporary token using username and password from request body. Expiration in 1 hour.

/k-api/authorization
curl -k -X POST \
-H "Content-Type: application/json" \
-d '{username: a@a.com, password: 123456qwerty}' \
"https://api.kameleoon.com/k-api/authorization" \

Parameter

Field Description
username

Your user name.

password

Your user password.

HTTP/1.1 200 OK
{
     "success": true,
     "errors": [],
     "result": {
         "token": "ABCDEF123456789",
         "expiration_in": 3600
     }
}

Site

Create Site

Create a site with default values.

https://api.kameleeon.com/k-api/sites
curl -k -X POST \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
-H "Content-Type: application/json" \
-d '{
    "description":"site description",
    "url":"https://www.example.com"
}' \
"https://api.kameleoon.com/k-api/sites" \

Parameter

Field Type Description
url String

The site url. Must start from http:// or https://.

description optional
String

The site description.

HTTP/1.1 200 OK
{
		"result": {
			"includeJQuery": false,
			"description": "site description",
			"id": 2,
			"url": "https://www.example.com"
		},
		"success": true,
		"errors": []
}

Get Site

Get the informations of a site. Site ID is required in the URL.

https://api.kameleeon.com/k-api/sites/:id
curl -k -X GET \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
-H "Content-Type: application/json" \
"https://api.kameleoon.com/k-api/sites/1" \
HTTP/1.1 200 OK
{
		"result": {
			"includeJQuery": false,
			"description": "site description",
			"id": 2,
			"url": "https://www.example.com"
		},
		"success": true,
		"errors": []
}
 

Get list of sites

Get the list of customer sites.

https://api.kameleeon.com/k-api/sites
curl -k -X GET \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
-H "Content-Type: application/json" \
"https://api.kameleoon.com/k-api/sites" \
HTTP/1.1 200 OK
{
		"result": {
			"sites": [
				{
					"includeJQuery": false,
					"description": "site description",
					"id": 1,
					"url": "http://www.example.com"
				}
			]
		},
		"success": true,
		"errors": []
}

Update Site

Update the information of a site. Site ID is required in the URL.

https://api.kameleeon.com/k-api/sites/:id
curl -k -X PUT \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
-H "Content-Type: application/json" \
-d '{
    "name":"new site name",
    "url":"https://www.new-example.com",
    "includeJQuery":false
}' \
"https://api.kameleoon.com/k-api/sites/1" \

Parameter

Field Type Description
name optional String

The site name.

url optional String

The site url. Must start from http://
or https://.

includeJQuery optional Boolean

Set true if you want to include JQuery
on your site.

     
     
HTTP/1.1 200 OK
{
		"result": {
			"includeJQuery": false,
			"description": "site description",
			"id": 1,
 		        "url": "https://www.new-example.com"
		},
		"success": true,
		"errors": []
}

Delete Site

Delete a site. Site ID is required in the URL.

https://api.kameleeon.com/k-api/sites/:id
curl -k -X DELETE \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
"https://api.kameleoon.com/k-api/sites/1" \
HTTP/1.1 200 OK
{
		"result": {},
		"success": true,
		"errors": []
}

Disable Site

Disable kameleoon.js on a site. Site ID is required in the URL.

https://api.kameleeon.com/k-api/sites/:id/disable
curl -k -X PUT \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
"https://api.kameleoon.com/k-api/sites/1/disable" \
HTTP/1.1 200 OK
{
		"result": {},
		"success": true,
		"errors": []
}

Enable Site

Enable kameleoon.js on a site. Site ID is required in the URL.

https://api.kameleeon.com/k-api/sites/:id/enable
curl -k -X PUT \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
"https://api.kameleoon.com/k-api/sites/1/enable" \
HTTP/1.1 200 OK
{
		"result": {},
		"success": true,
		"errors": []
}

Experiment

Create Experiment

Create a experiment on a site with default values. Site ID is required in the URL.

https://api.kameleoon.com/k-api/sites/:siteId/experiments
curl -k -X POST \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
-H "Content-Type: application/json" \
-d '{
		"name":"experiment name"
}' \
"https://api.kameleoon.com/k-api/sites/1/experiments" \

Parameter

Field Type Description
name optional String

Name of the Experiment.

HTTP/1.1 200 OK
{
		"result": {
			"goalId": null,
			"name": "experiment name",
			"siteId": 14794,
			"variationsId": "[]",
			"id": 27856,
			"experimentStatus": "draft"
		},
		"success": true,
		"errors": []
	}

Get Experiment

Get the information of an experiment. Experiment ID is required in the URL.

https://api.kameleeon.com/k-api/sites/:siteId/experiments/:id
curl -k -X GET \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
"https://api.kameleoon.com/k-api/sites/1/experiments/2" \
HTTP/1.1 200 OK
{
		"result": {
			"targetingSegmentId": 1,
			"reportingTools": {
				"repotingToolsValues": [
					"[Newsletter]"
				],
				"repotingToolsNames": [
					"kameleoonTracking"
				]
			},
			"deviations": {
				"1": 0.3,
				"reference": 0.7
			},
			"scheduleCronStop": "At 10:00 PM, only on Sunday, Monday, Tuesday, Wednesday and Thursday, only in 2016",
			"scheduleCronStart": "At 8:00 AM, only on Sunday, Monday, Tuesday, Wednesday and Thursday, only in 2016",
			"mainGoal": "22560",
			"variations": [
				1,
				2
			],
			"name": "Test 45 (copy of Test 35)",
			"siteId": 1,
			"id": 1,
			"experimentStatus": "DRAFT",
			"goals": [
				1
			]
		},
		"success": true,
		"errors": []
	}

Get list of Experiments

Get the list of experiments for a site. Site ID is required in the URL.

https://api.kameleeon.com/k-api/sites/:siteId/experiments
curl -k -X GET \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
-H "Content-Type: application/json" \
"https://api.kameleoon.com/k-api/sites/1/experiments" \
    HTTP/1.1 200 OK
    {
    		"result": {
    			"experiments": [
					{
    					"targetingSegmentId": 1,
    					"reportingTools": {
    						"repotingToolsValues": [
    							"[Newsletter]"
    						],
    						"repotingToolsNames": [
    							"kameleoonTracking"
    						]
    					},
    					"deviations": {
    						"1": 0.3,
    						"reference": 0.7
    					},
    					"scheduleCronStop": "At 10:00 PM, only on Sunday, Monday, Tuesday, Wednesday and Thursday, only in 2016",
    					"scheduleCronStart": "At 8:00 AM, only on Sunday, Monday, Tuesday, Wednesday and Thursday, only in 2016",
    					"mainGoal": "22560",
    					"variations": [
    						1,
    						2
    					],
    					"name": "Test 45 (copy of Test 35)",
    					"siteId": 1,
    					"id": 1,
    					"experimentStatus": "DRAFT",
    					"goals": [
    						1
    					]
    				}
    			]
    		},
    		"success": true,
    		"errors": []
    	}

Update Experiment

Update the information of an experiment. Experiment ID is required in the URL.

https://api.kameleeon.com/k-api/sites/:siteId/experiments/:id
curl -k -X PUT \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
-d '{
		"experimentStatus":"PAUSE"
}' \
"https://api.kameleoon.com/k-api/sites/1/experiments/2" \

Parameter

Field Type Description
     
name String

new Experiment name.

experimentStatus String

new Experiment status.

Allowed values: {ACTIVE, PAUSE, ENDED}

segmentId optional String

Id of Targeting Segment to bind with Experiment.

deviation optional JsonObject

Deviation as json.

reference Float

Part of audience go by main reference.

Ordre de grandeur : 0..1

:variationId Float

Part of audience go by variation with id=variationId.

Ordre de grandeur : 0..1

HTTP/1.1 200 OK
{
		"result": {
			"targetingSegmentId": 45667,
			"reportingTools": {
				"repotingToolsValues": [
					[
						"Engagement"
					]
				],
				"repotingToolsNames": [
					"kameleoonTracking"
				]
			},
			"deviations": {
				"115466": 0.32,
				"reference": 0.68
			},
			"scheduleCronStop": "At 10:00 PM, only on Sunday, Monday, Tuesday, Wednesday and Thursday, only in 2016",
			"scheduleCronStart": "",
			"mainGoal": "22752",
			"variations": [],
			"name": "Test 1",
			"siteId": 14797,
			"id": 27860,
			"experimentStatus": "PAUSE",
			"goals": [
				22752
			]
		},
		"success": true,
		"errors": []
	} 

Experiment Results

Get the results of an experiment. Experiment ID is required in the URL.

https://api.kameleeon.com/k-api/sites/:siteId/experiments/result?interval=:interval
curl -k -X GET \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
"https://api.kameleoon.com/k-api/sites/1/experiments/result?interval=hour" \

Parameter

Field Type Description
interval optional String

Interval for getting results.

Default value: DAY

Allowed values: HOUR, DAY, WEEK, MONTH, YEAR

Success 200

Field Type Description
goals JsonArray

List of Goals.

goalId JsonObject

Contains list of variations.

id Number

Variation id. "reference" - case for absence of any variations. "winner" - the best variation.

name String

The variation name.

trustRate Number

The trust rate.

improvement Number

Relative improvement over absence of any variations, computed as the ratio of conversionRate values minus 1.

conversionRate Number

Conversion rate, computed as conversions/visitors for this variation.

visits Number

Number of site visitors for this variation.

allConversions Number

All conversions during the test.

convertedVisits Number

Visits who have converted the goal.

HTTP/1.1 200 OK
{
		"result": {
			"goals": [
				"20292": {
					"111643": "{name=MENU HORIZONTAL (A), id=111643, Improvement=+9.22%, StatisticalSignificance=100.00%, allConversions=6,369, visits=16,551, convertedVisits=2,600, ConversionRate=15.71%}",
					"112435": "{name=MENU HORIZONTAL Fusion Musique (B), id=112435, Improvement=+6.58%, StatisticalSignificance=99.80%, allConversions=5,944, visits=16,517, convertedVisits=2,532, ConversionRate=15.33%}",
					"112436": "{name=MENU HORIZONTAL Fusion Son (C), id=112436, Improvement=+5.62%, StatisticalSignificance=99.31%, allConversions=6,129, visits=16,549, convertedVisits=2,514, ConversionRate=15.19%}",
					"112437": "{name=MENU HORIZONTAL Fusion Musique et Son (D), id=112437, Improvement=+8.23%, StatisticalSignificance=99.98%, allConversions=6,108, visits=16,510, convertedVisits=2,570, ConversionRate=15.57%}",
					"112920": "{name=Référence Bis Sans Lien Niveau 1, id=112920, Improvement=-100.00%, StatisticalSignificance=--, allConversions=0, visits=0, convertedVisits=0, ConversionRate=0.00%}",
					"reference": "{name=reference, id=reference, Improvement=+0.00%, StatisticalSignificance=--, allConversions=13,659, visits=40,930, convertedVisits=5,887, ConversionRate=14.38%}",
					"winner": "{name=MENU HORIZONTAL (A), id=111643, Improvement=+9.22%, StatisticalSignificance=100.00%, allConversions=6,369, visits=16,551, convertedVisits=2,600, ConversionRate=15.71%}"
				}
			]
		}
		"success": true,
		"errors": []
	}

Export Experiment Results

Export experiment results to csv file.

https://api.kameleeon.com/k-api/sites/:siteId/experiments/:id/export?interval=:interval
wget \
--header="X-Auth-Key:2MSO9VFIUSPI6YU" \
--header="X-Auth-Email:a@a.com" \
https://api.kameleoon.com/k-api/sites/1/experiments/2/export?interval=hour \
--no-check-certificate \
--content-disposition \

Parameter

Field Type Description
interval optional String

Interval for getting results.

Default value: DAY

Allowed values: HOUR, DAY, WEEK, MONTH, YEAR

Delete Experiment

Delete an experiment. Experiment ID is required in the URL.

https://api.kameleeon.com/k-api/sites/:siteId/experiments/:id
curl -k -X DELETE \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
"https://api.kameleoon.com/k-api/sites/1/experiments/2" \
HTTP/1.1 200 OK
{
		"result": {},
		"success": true,
		"errors": []
	}

Variation

Create Variation

Create a variation on an experiment. Experiment ID is required in the URL.

/k-api/sites/:siteId/experiments/:experimentId/variations
curl -k -X POST \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
-H "Content-Type: application/json" \
-d '{
     "name":"variation name",
     "jsCode":"variation js",
     "cssCode":"variation css"
}'
"https://api.kameleoon.com/k-api/sites/1/experiments/2/variations" \

Parameter

Field Type Description
name String

The variation name.

jsCode optional String

The variation javascript code.

cssCode optional String

The variation css style.

waitDOMReady optional Boolean

Is js code applied after DOM ready.

Default value: true

HTTP/1.1 200 OK
{
		"result": {
			"customCssCode": "variation css",
			"waitDOMReady": true,
			"name": "variation name",
			"id": 1,
			"attachedExperimentId": 1,
			"javaScriptCode": "variation js"
		},
		"success": true,
		"errors": []
}

Get Variation

Get the information of a variation. Variation ID is required in the URL.

/k-api/sites/:siteId/experiments/:experimentId/variations/:variationId
curl -k -X GET \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
"https://api.kameleoon.com/k-api/sites/1/experiments/2/variations/3" \
HTTP/1.1 200 OK
{
		"result": {
			"customCssCode": "variation css",
			"waitDOMReady": true,
			"name": "variation name",
			"id": 1,
			"attachedExperimentId": 1,
			"javaScriptCode": "variation js"
		},
		"success": true,
		"errors": []
}

Get list of Variations

Get the list of variations for an experiment. Experiment ID is required in the URL.

/k-api/sites/:siteId/experiments/:experimentId/variations
curl -k -X GET \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
"https://api.kameleoon.com/k-api/sites/1/experiments/2/variations" \
HTTP/1.1 200 OK
{
		"result": {
			"variations": [
				{
					"customCssCode": "variation css",
					"waitDOMReady": true,
					"name": "variation name",
					"id": 1,
					"attachedExperimentId": 1,
					"javaScriptCode": "variation js"
				}
			],
		},
		"success": true,
		"errors": []
}

Update Variation

Update the information of a variation. Variation ID is required in the URL.

/k-api/sites/:siteId/experiments/:experimentId/variations/:variationId
curl -k -X PUT \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
-H "Content-Type: application/json" \
-d '{
     "jsCode":"variation js new",
     "cssCode":"variation css new"
}' \
"https://api.kameleoon.com/k-api/sites/1/experiments/2/variations/3" \

Parameter

Field Type Description
jsCode optional String

New javascript code for variation.

cssCode optional String

New css style for variation.

waitDOMReady optional Boolean

Set true if code applied after DOM ready.

Default value: true

HTTP/1.1 200 OK
{
		"result": {
			"customCssCode": "variation css new",
			"waitDOMReady": true,
			"name": "variation name",
			"id": 1,
			"attachedExperimentId": 1,
			"javaScriptCode": "variation js new"
		},
		"success": true,
		"errors": []
}

 

Delete Variation

Delete a variation. Variation ID is required in the URL.

/k-api/sites/:siteId/experiments/:experimentId/variations/:variationId
curl -k -X DELETE \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
"https://api.kameleoon.com/k-api/sites/1/experiments/2/variations/3" \
HTTP/1.1 200 OK
{
		"result": {},
		"success": true,
		"errors": []
}

Goal

Create Goal

Create a goal on a site. Site ID is required in the URL.

/k-api/sites/:siteId/goals
curl -k -X POST \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
-H "Content-Type: application/json" \
-d '{
     "name":"goal name",
     "goalType":"URL"
}'
"https://api.kameleoon.com/k-api/sites/1/goals" \

Parameter

Field Type Description
name String

Goal name.

goalType String

Type of Goal.

Allowed values: ENGAGEMENT, CLICK, URL, PAGE_VIEWS, TIME_SPENT, CUSTOM

HTTP/1.1 200 OK
{
		"result": {
	    	"piwikEventTracking": true,
	    	"adobeOmnitureEventTracking": true,
	    	"kissMetricsEventTracking": true,
	    	"comScoreEventTracking": true,
	    	"matchType": "null",
	    	"attachedGoalName": null,
	    	"masterGoalId": null,
 		"multipleConversions": false,
	    	"type": "URL",
	    	"heatMapEventTracking": true,
	    	"action": null,
	    	"experimentId": null,
	    	"selector": null,
	    	"id": 1,
	    	"eulerianEventTracking": true,
	    	"crazyEggEventTracking": true,
	    	"mentalistWeight": 0,
	    	"timeSpent": null,
	    	"attachedGoalId": null,
	    	"universalAnalyticsEventTracking": true,
	    	"url": null,
	    	"googleAnalyticsEventTracking": true,
	    	"pageViews": null,
	    	"name": null,
	    	"attached": false,
	    	"webtrendsEventTracking": true,
		    "reportingScriptEventTracking": true,
		    "category": null,
	    	"atInternetEventTracking": true
		},
		"success": true,
		"errors": []
}

Get Goal

Get a goal. Goal ID and Site ID are required in the URL.

/k-api/sites/:siteId/goals/:id
curl -k -X GET \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
"https://api.kameleoon.com/k-api/sites/1/goals/2" \
HTTP/1.1 200 OK
{
		"result": {
	    	"piwikEventTracking": true,
	    	"adobeOmnitureEventTracking": true,
	    	"kissMetricsEventTracking": true,
	    	"comScoreEventTracking": true,
	    	"matchType": "null",
	    	"attachedGoalName": null,
	    	"masterGoalId": null,
 		"multipleConversions": false,
	    	"type": "URL",
	    	"heatMapEventTracking": true,
	    	"action": null,
	    	"experimentId": null,
	    	"selector": null,
	    	"id": 1,
	    	"eulerianEventTracking": true,
	    	"crazyEggEventTracking": true,
	    	"mentalistWeight": 0,
	    	"timeSpent": null,
	    	"attachedGoalId": null,
	    	"universalAnalyticsEventTracking": true,
	    	"url": null,
	    	"googleAnalyticsEventTracking": true,
	    	"pageViews": null,
	    	"name": null,
	    	"attached": false,
	    	"webtrendsEventTracking": true,
		    "reportingScriptEventTracking": true,
		    "category": null,
	    	"atInternetEventTracking": true
		},
		"success": true,
		"errors": []
}

Get list of Site Goals

Get the list of goals associated with a site. Site ID is required in the URL.

/k-api/sites/:siteId/goals
curl -k -X GET \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
"https://api.kameleoon.com/k-api/sites/1/goals" \
HTTP/1.1 200 OK
{
		"result": {
			"mainPersonalizationGoal": null,
			"goals": [
				{
	    			"piwikEventTracking": true,
	    			"adobeOmnitureEventTracking": true,
	    			"kissMetricsEventTracking": true,
	    			"comScoreEventTracking": true,
	    			"matchType": "null",
	    			"attachedGoalName": null,
	    			"masterGoalId": null,
 				"multipleConversions": false,
	    			"type": "URL",
	    			"heatMapEventTracking": true,
	    			"action": null,
	    			"experimentId": null,
	    			"selector": null,
	    			"id": 1,
	    			"eulerianEventTracking": true,
	    			"crazyEggEventTracking": true,
	   			 	"mentalistWeight": 0,
	    			"timeSpent": null,
	   			 	"attachedGoalId": null,
	   			 	"universalAnalyticsEventTracking": true,
	    			"url": null,
	   			 	"googleAnalyticsEventTracking": true,
	    			"pageViews": null,
	    			"name": null,
	    			"attached": false,
	    			"webtrendsEventTracking": true,
		   			"reportingScriptEventTracking": true,
		   			"category": null,
	    			"atInternetEventTracking": true
				}
			]
		},
		"success": true,
		"errors": []
	}

Update Goal

Update the information of a goal. Goal ID is required in the URL.

/k-api/sites/:siteId/goals/:id
curl -k -X PUT \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
-H "Content-Type: application/json" \
-d '{
     "name":"goal name new",
     "goalType":"TIME_SPENT"
}'
"https://api.kameleoon.com/k-api/sites/1/goals/2" \
HTTP/1.1 200 OK
{
		"result": {
	    	"piwikEventTracking": true,
	    	"adobeOmnitureEventTracking": true,
	    	"kissMetricsEventTracking": true,
	    	"comScoreEventTracking": true,
	    	"matchType": "null",
	    	"attachedGoalName": null,
	    	"masterGoalId": null,
 		"multipleConversions": false,
	    	"type": "TIME_SPENT",
	    	"heatMapEventTracking": true,
	    	"action": null,
	    	"experimentId": null,
	    	"selector": null,
	    	"id": 1,
	    	"eulerianEventTracking": true,
	    	"crazyEggEventTracking": true,
	    	"mentalistWeight": 0,
	    	"timeSpent": null,
	    	"attachedGoalId": null,
	    	"universalAnalyticsEventTracking": true,
	    	"url": null,
	    	"googleAnalyticsEventTracking": true,
	    	"pageViews": null,
	    	"name": "goal name new,
	    	"attached": false,
	    	"webtrendsEventTracking": true,
		    "reportingScriptEventTracking": true,
		    "category": null,
	    	"atInternetEventTracking": true
		},
		"success": true,
		"errors": []
	}

 

Delete Goal

Delete a goal. Goal ID and Site ID are required in the URL.

/k-api/sites/:siteId/goals/:id
curl -k -X Delete \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
"https://api.kameleoon.com/k-api/sites/1/goals/2" \
HTTP/1.1 200 OK
{
		"result": {},
		"success": true,
		"errors": []
	}

Targeting Segment

Create TargetingSegment

Create a targeting segment on a site. Site id is required in the URL.

/k-api/sites/:siteId/segments
curl -k \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
-H "Content-Type: application/json" \
-d '{
     "name":"segment name",
     "description":"segment description",
     "conditionsData": {
"firstLevelOrOperators":[false,false],
"secondLevel":
[
{
"orOperators":[false],
"conditions":[
{
"targetingType":"PAGE_URL",
"url":"www",
"isInclude":"true",
"matchType":"CONTAINS",
"weight":1
},
{
"targetingType":"PAGE_VIEWS",
"pageCount":"3",
"isInclude":"true",
"countOp":"GREATER",
"weight":1
}
]
},
{
"orOperators":[],
"conditions":[
{
"targetingType":"PAGE_TITLE",
"title":"test",
"isInclude":"true",
"matchType":"EXACT",
"weight":1
}
]
}
]
} }'
\ "https://api.kameleoon.com/k-api/sites/1/segments" \

Parameter

Field Type Description
name String

Targeting segment name.

description optional String

Targeting segment description.

conditionsData optional JsonObject

Targeting segment conditions.

conditionsData

Field Type Description
firstLevelOrOperators optional JsonArray

Array of booleans ("or"=true, "and"=false) for binding secondLevel outer conditions.

secondLevel optional JsonArray

Array of JsonObjects with outer conditions.

secondLevel

Field Type Description
orOperators optional JsonArray

Boolean ("or"=true, "and"=false) for binding secondLevel inner conditions.

conditions optional JsonArray

JsonArray with secondLevel inner conditions.

conditions

Field Type Description
targetingType String

Targeting condition type. According to this field it's necessary to add some additional fields as shown below!

Allowed values: PAGE_URL, PAGE_TITLE, LANDING_PAGE, ORIGIN, ORIGIN_TYPE, SEARCH_KEYWORD, NEW_VISITORS, BROWSER_LANGUAGE, GEOLOCATION, DEVICE_TYPE, PREVIOUS_PAGE, PAGE_VIEWS, FIRST_VISIT, LAST_VISIT, ACTIVE_SESSION, TIME_SINCE_PAGE_LOAD, SAME_DAY_VISITS, VISITS, MOUSE_OUT, CONVERSIONS, INTERNAL_SEARCH_KEYWORDS, TABS_ON_SITE, WEATHER, DAY_OF_WEEK, TIME_RANGE, HOUR_MINUTE_RANGE, JS_CODE, COOKIE, EVENT, BROWSER, OPERATING_SYSTEM, DOM_ELEMENT

PAGE_URL

Field Type Description
url String

URL template.

matchType optional String

Accordance between requested URL and URL template.

Default value: EXACT

Allowed values: EXACT, CONTAINS, REGULAR_EXPRESSION

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

PAGE_TITLE

Field Type Description
title String

Title template.

matchType optional String

Accordance between page title and title template.

Default value: EXACT

Allowed values: EXACT, CONTAINS, REGULAR_EXPRESSION

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

LANDING_PAGE

Field Type Description
url String

Landing URL template.

matchType optional String

Accordance between requested URL and landing URL template.

Default value: EXACT

Allowed values: EXACT, CONTAINS, REGULAR_EXPRESSION

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

ORIGIN

Field Type Description
url String

Referring website URL template.

matchType optional String

Accordance between visitors origin URL and referring website URL template.

Default value: EXACT

Allowed values: EXACT, CONTAINS, REGULAR_EXPRESSION

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

ORIGIN_TYPE

Field Type Description
trafficType String

Traffic type.

Allowed values: SEO, SEM, AFFILIATION, EMAIL, DIRECT

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

SEARCH_KEYWORD

Field Type Description
keyword String

AdWords search keywords.

matchType optional String

Accordance between visitors search word and keyword.

Default value: EXACT

Allowed values: EXACT, CONTAINS, REGULAR_EXPRESSION

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

NEW_VISITORS

Field Type Description
visitorsType String

New or returning visitors.

Allowed values: NEW, RETURNING

weight optional Integer

More important conditions have greater values.

Default value: 1

BROWSER_LANGUAGE

Field Type Description
language String

Browser language code in ISO 639-1.

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

GEOLOCATION

Field Type Description
country String

IP location country.

region optional String

IP location region.

city optional String

IP location city.

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

DEVICE_TYPE

Field Type Description
device String

Device type.

Allowed values: DESKTOP, TABLET, PHONE

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

PREVIOUS_PAGE

Field Type Description
url String

Previous page URL template.

matchType optional String

Accordance between previous page URL and URL template.

Default value: EXACT

Allowed values: EXACT, CONTAINS, REGULAR_EXPRESSION

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

PAGE_VIEWS

Field Type Description
pageCount Integer

Number of page views.

countOp String

Operand for pageCount.

Allowed values: LOWER, GREATER, EQUAL

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

FIRST_VISIT

Field Type Description
dayCount Integer

Days elapsed since first visit.

countOp String

Operand for dayCount.

Allowed values: LOWER, GREATER, EQUAL

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

LAST_VISIT

Field Type Description
dayCount Integer

Days elapsed since last visit .

countOp String

Operand for dayCount.

Allowed values: LOWER, GREATER, EQUAL

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

ACTIVE_SESSION

Field Type Description
secondCount Integer

Seconds elapsed since session became active.

countOp String

Operand for secondCount.

Allowed values: LOWER, GREATER

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

TIME_SINCE_PAGE_LOAD

Field Type Description
secondCount Integer

Seconds elapsed since page load.

countOp String

Operand for secondCount.

Allowed values: LOWER, GREATER

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

SAME_DAY_VISITS

Field Type Description
visitCount Integer

Number of visits for day.

countOp String

Operand for visitCount.

Allowed values: LOWER, GREATER, EQUAL

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

VISITS

Field Type Description
visitCount Integer

Total number of visits.

countOp String

Operand for visitCount.

Allowed values: LOWER, GREATER, EQUAL

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

MOUSE_OUT

Field Type Description
weight optional Integer

More important conditions have greater values.

Default value: 1

CONVERSIONS

Field Type Description
goal String

Goal that have reached by visitors.

Allowed values: ANY, ENGAGEMENT, :GOAL_ID

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

INTERNAL_SEARCH_KEYWORDS

Field Type Description
keyword String

On site search keyword.

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

TABS_ON_SITE

Field Type Description
tabCount Integer

Number of tabs opened.

countOp String

Operand for tabCount.

Allowed values: LOWER, GREATER, EQUAL

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

DAY_OF_WEEK

Field Type Description
day String

Weekday.

Allowed values: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

TIME_RANGE

Field Type Description
since String

Since date. Date format: dd/mm/yyyyThh:MM.

to String

To date. Date format: dd/mm/yyyyThh:MM.

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

HOUR_MINUTE_RANGE

Field Type Description
since String

Since time. Time format: hh:MM.

to String

To time. Time format: hh:MM.

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

JS_CODE

Field Type Description
jsCode String

Custom JavaScript condition.

applied optional String

Run js code after DOM ready or immediate?

Default value: DOM_READY

Allowed values: DOM_READY, IMMEDIATE

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

COOKIE

Field Type Description
name String

Browser cookie name template.

value optionnel String

Wait while DOM is ready.

matchType optional String

Accordance between visitors cookie name and cookie name template.

Default value: EXACT

Allowed values: EXACT, CONTAINS, REGULAR_EXPRESSION

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

EVENT

Field Type Description
event String

Custom event.

weight optional Integer

More important conditions have greater values.

Default value: 1

BROWSER

Field Type Description
browser String

Browser.

Allowed values: CHROME, IE, FIREFOX, SAFARI, OPERA

version Integer

Browser version.

versionOp String

Operand for version.

Allowed values: LOWER, GREATER, EQUAL

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

OPERATING_SYSTEM

Field Type Description
os String

Operating system.

Allowed values: WINDOWS, LINUX, MAC_OS, ANDROID, IOS

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

DOM_ELEMENT

Field Type Description
elementType String

Type of element on the page.

Allowed values: ANY_MODIFIED, SINGLE

elementValue optional String

Element on the page (id, class, ...) if elementType is SINGLE.

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

WEATHER

Field Type Description
weather String

Weather in client place.

Allowed values: CLEAR, CLOUDY, DRIZZLE, RAIN, THUNDERSTORM, HAIL, SNOW, CALM, BREEZE, HIGH_WIND, DISTURBED, HOT, COLD, SETTING

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

REFERRERS

Field Type Description
referrer String

The visitors referrer.

Allowed values: ANY_REFERRER, GOOGLE_ADWORDS, GOOGLE_SEARCH, BING_SEARCH, YAHOO_SEARCH, BAIDU_SEARCH

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

INTERESTS

Field Type Description
interest String

The visitor interests.

Allowed values: ANY, :INTEREST_NAME

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

KEY_PAGES

Field Type Description
pages String

Key pages that have visited visitors.

Allowed values: ANY, :KEY_PAGES_NAME

weight optional Integer

More important conditions have greater values.

Default value: 1

isInclude optional Boolean

Is include if match this condition?

Default value: true

Get TargetingSegment

Get the information of a targeting segment. Segment id and siteId are required in the URL.

/k-api/sites/:siteId/segments/:id
curl -k -X GET \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
"https://api.kameleoon.com/k-api/sites/1/segments/2" \

Update TargetingSegment

The segment id and siteId are required in the URL. Only targeting conditions will be updated. For more description see 'Create TargetingSegment' section.

/k-api/sites/:siteId/segments/:id
curl -k -X PUT \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
-H "Content-Type: application/json" \
-d '{
     "name":"json name new",
     "description":"json description new",
     "conditionsData": {
         "secondLevel": [
             {
                 "conditions": [
                     {
                         "targetingType": "SEARCH_KEYWORD",
                         "keyword": "search+word+new",
                         "include": "true",
                         "weight": 1
                     }
                 ]
             }
         ]
     }
}' \
"https://api.kameleoon.com/k-api/sites/1/segments/2" \

Parameter

Field Type Description
conditionsData JsonObject

New targeting condition data.

Delete TargetingSegment

Delete a targeting segment. Segment ID and Site ID are required in the URL.

/k-api/sites/:siteId/segments/:id
curl -k -X DELETE \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
"https://api.kameleoon.com/k-api/sites/1/segments/2" \

Parameter

Field Type Description
conditionsData JsonObject

New targeting condition data.

List of TargetingSegment

Get the list of targeting segments for a site. Site ID is required in the URL.

/k-api/sites/:siteId/segments
curl -k -X GET \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
"https://api.kameleoon.com/k-api/sites/1/segments" \

Personalization

Create Personalization

Create a personalization on a site with default values. Site ID is required in the URL.

https://api.kameleeon.com/k-api/sites/:siteId/personalizations
curl -k -X POST\
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
-H "Content-Type: application/json" \
"https://api.kameleoon.com/k-api/sites/1/personalizations" \ 
-d '{ "name":"perso" }' \

Parameter

Field Type Description
name String

name of Personalization.

HTTP/1.1 200 OK
{
		"result": {
			"cappingPerVisitorConvertGoal": false,
			"goalId": null,
			"popIn": null,
			"description": null,
			"pluginCountDownHeadband": null,
			"globalCappingVisitorsConfiguration": "null",
			"variation": "{name=Variation 1, id=115495}",
			"expositionFrequencySameVisit": null,
			"targetingSegmentId": 45733,
			"trackerData": null,
			"cappingPerVisitorNumberExpositions": false,
			"archived": false,
			"kameleoonTracking": true,
			"pluginGoogleForm": null,
			"customContent": "{customCSS=null, customJavaScript=null}",
			"dateStarted": null,
			"dateEnded": null,
			"goals": [],
			"expositionFrequencyDelaySecondsBetweenTwoExpositions": null,
			"expositionFrequencySameVisitorDelaySeconds": null,
			"stickyBlock": null,
			"expositionFrequencySameVisitor": null,
			"id": 17995,
			"expositionFrequencySameVisitorMax": 8,
			"globalCappingNumberVisitors": false,
			"cappingPerVisitorGoalId": null,
			"pluginIAdvize": null,
			"personalizationCheckConditionsRule": "ALL_CONDITIONS",
			"targetingSegment": "{id=45733, name=additional, description=additional, conditions={firstLevelOrOperators=[], secondLevel=[{orOperators=[false, false], conditions=[{group=, type=REFERRERS, firstValue=0, secondValue=null, thirdValue=null, include=true, matchType=EXACT, customTargetingConditionId=null, readableDescription=Visitors having the configured referrer Google AdWords, disabled=false, weight=1}, {group=, type=INTERESTS, firstValue=1, secondValue=null, thirdValue=null, include=true, matchType=EXACT, customTargetingConditionId=null, readableDescription=Visitors interested in ya, disabled=false, weight=1}, {group=, type=CONVERSIONS, firstValue=22751, secondValue=null, thirdValue=null, include=true, matchType=EXACT, customTargetingConditionId=null, readableDescription=Visitors who converted the goal goal  name new, disabled=false, weight=1}]}]}, usedInExperiments=0, usedInPersonalizations=1, isBuyerPersonasSegment=false, eCommerceObjectivesNeeded=false}",
			"personalizationStatus": "DRAFT",
			"pluginSocialBar": null,
			"priority": 1,
			"pluginAdBlock": null,
			"personalizationConfiguration": "NONE",
			"variationId": 115495,
			"globalCappingGoalId": null,
			"customExpositionRate": 100,
			"name": "perso",
			"siteId": 14797,
			"imageInPage": null
		},
		"success": true,
		"errors": []
	}

Get Personalization

Get the information of a personalization. Personalization ID and Site ID are required in the URL.

https://api.kameleeon.com/k-api/sites/:siteId/personalizations/:id
curl -k -X GET \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
-H "Content-Type: application/json" \
"https://api.kameleoon.com/k-api/sites/1/personalizations/2" \
HTTP/1.1 200 OK
{
		"result": {
			"site": {
				"includeJQuery": false,
				"name": "b@b.com",
				"id": 1,
				"googleAnalyticsProfile": null,
				"googleAnalyticsMainGoal": "E_COMMERCE",
				"url": "http://www.gallery-belyaevo.ru"
			},
			"personalizations": {
				"cappingPerVisitorConvertGoal": false,
				"goalId": null,
				"popIn": null,
				"description": null,
				"pluginCountDownHeadband": null,
				"globalCappingVisitorsConfiguration": "null",
				"variation": "{name=Variation 1, id=115495}",
				"expositionFrequencySameVisit": null,
				"targetingSegmentId": 45733,
				"trackerData": null,
				"cappingPerVisitorNumberExpositions": false,
				"archived": false,
				"kameleoonTracking": true,
				"pluginGoogleForm": null,
				"customContent": "{customCSS=null, customJavaScript=null}",
				"dateStarted": null,
				"dateEnded": null,
				"goals": [],
				"expositionFrequencyDelaySecondsBetweenTwoExpositions": null,
				"expositionFrequencySameVisitorDelaySeconds": null,
				"stickyBlock": null,
				"expositionFrequencySameVisitor": null,
				"id": 17995,
				"expositionFrequencySameVisitorMax": 8,
				"globalCappingNumberVisitors": false,
				"cappingPerVisitorGoalId": null,
				"pluginIAdvize": null,
				"personalizationCheckConditionsRule": "ALL_CONDITIONS",
				"targetingSegment": "{id=45733, name=additional, description=additional, conditions={firstLevelOrOperators=[], secondLevel=[{orOperators=[false, false], conditions=[{group=, type=REFERRERS, firstValue=0, secondValue=null, thirdValue=null, include=true, matchType=EXACT, customTargetingConditionId=null, readableDescription=Visitors having the configured referrer Google AdWords, disabled=false, weight=1}, {group=, type=INTERESTS, firstValue=1, secondValue=null, thirdValue=null, include=true, matchType=EXACT, customTargetingConditionId=null, readableDescription=Visitors interested in ya, disabled=false, weight=1}, {group=, type=CONVERSIONS, firstValue=22751, secondValue=null, thirdValue=null, include=true, matchType=EXACT, customTargetingConditionId=null, readableDescription=Visitors who converted the goal goal  name new, disabled=false, weight=1}]}]}, usedInExperiments=0, usedInPersonalizations=1, isBuyerPersonasSegment=false, eCommerceObjectivesNeeded=false}",
				"personalizationStatus": "DRAFT",
				"pluginSocialBar": null,
				"priority": 1,
				"pluginAdBlock": null,
				"personalizationConfiguration": "NONE",
				"variationId": 115495,
				"globalCappingGoalId": null,
				"customExpositionRate": 100,
				"name": "perso",
				"siteId": 14797,
				"imageInPage": null
			}
		},
		"success": true,
		"errors": []
	}

Get list of Personalizations

Get the list of personalizations of a site. Site ID is required in the URL.

https://api.kameleeon.com/k-api/sites/:siteId/personalizations
curl -k -X GET \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
-H "Content-Type: application/json" \
"https://api.kameleoon.com/k-api/sites/1/personalizations" \
HTTP/1.1 200 OK
{
		"result": {
			"site": {
				"includeJQuery": false,
				"name": "b@b.com",
				"id": 1,
				"googleAnalyticsProfile": null,
				"googleAnalyticsMainGoal": "E_COMMERCE",
				"url": "http://www.gallery-belyaevo.ru"
			},
			"personalizations": [
				{
					"cappingPerVisitorConvertGoal": false,
					"goalId": null,
					"popIn": null,
					"description": null,
					"pluginCountDownHeadband": null,
					"globalCappingVisitorsConfiguration": "null",
					"variation": "{name=Variation 1, id=115495}",
					"expositionFrequencySameVisit": null,
					"targetingSegmentId": 45733,
					"trackerData": null,
					"cappingPerVisitorNumberExpositions": false,
					"archived": false,
					"kameleoonTracking": true,
					"pluginGoogleForm": null,
					"customContent": "{customCSS=null, customJavaScript=null}",
					"dateStarted": null,
					"dateEnded": null,
					"expositionFrequencyDelaySecondsBetweenTwoExpositions": null,
					"expositionFrequencySameVisitorDelaySeconds": null,
					"stickyBlock": null,
					"expositionFrequencySameVisitor": null,
					"id": 17995,
					"expositionFrequencySameVisitorMax": 8,
					"globalCappingNumberVisitors": false,
					"cappingPerVisitorGoalId": null,
					"pluginIAdvize": null,
					"personalizationCheckConditionsRule": "ALL_CONDITIONS",
					"targetingSegment": "{id=45733, name=additional, description=additional, conditions={firstLevelOrOperators=[], secondLevel=[{orOperators=[false, false], conditions=[{group=, type=REFERRERS, firstValue=0, secondValue=null, thirdValue=null, include=true, matchType=EXACT, customTargetingConditionId=null, readableDescription=Visitors having the configured referrer Google AdWords, disabled=false, weight=1}, {group=, type=INTERESTS, firstValue=1, secondValue=null, thirdValue=null, include=true, matchType=EXACT, customTargetingConditionId=null, readableDescription=Visitors interested in ya, disabled=false, weight=1}, {group=, type=CONVERSIONS, firstValue=22751, secondValue=null, thirdValue=null, include=true, matchType=EXACT, customTargetingConditionId=null, readableDescription=Visitors who converted the goal goal  name new, disabled=false, weight=1}]}]}, usedInExperiments=0, usedInPersonalizations=1, isBuyerPersonasSegment=false, eCommerceObjectivesNeeded=false}",
					"personalizationStatus": "DRAFT",
					"pluginSocialBar": null,
					"priority": 1,
					"pluginAdBlock": null,
					"personalizationConfiguration": "NONE",
					"variationId": 115495,
					"globalCappingGoalId": null,
					"customExpositionRate": 100,
					"name": "perso",
					"siteId": 14797,
					"imageInPage": null
				}
			]
		},
		"success": true,
		"errors": []
	}

Update Personalization

Update the information of a personalization. Personalization ID and Site ID are required in the URL.

https://api.kameleeon.com/k-api/sites/:siteId/personalizations/:id
curl -k -X PUT \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
-H "Content-Type: application/json" \
-d '{
		"name":"perso new"
}' \
"https://api.kameleoon.com/k-api/sites/1/personalizations/2" \

Parameter

Field Type Description
name optionnel String

name of Personalization.

targetingSegmentId optional String

Targeting segment id for binding with personalization.

description optional String

description of Personalization.

personalizationStatus optional String

status of Personalization. Can be: DRAFT, ACTIVE, PAUSE, ENDED

customExpositionRate optional Number

percent of Visitors exposed with personalization

priority optional Number

priority of personalization

resetExpositionFrequencySameVisit optional Boolean

if true exposition frequency functions will be reseted.

expositionFrequencySameVisit optional Number

Maximum times of display personalization during a unique visit

expositionFrequencySameVisitor optional Number

Maximum times of display personalization to the same visitor every n milliseconds

expositionFrequencySameVisitorDelaySeconds optional Number

Number of milliseconds for repeating exposition behaviour

expositionFrequencyDelaySecondsBetweenTwoExpositions optional Number

Number of millisecond betveen two expositions of personalization

maxNumberVisitorsExposed optional Number  
HTTP/1.1 200 OK
{
		"result": {
			"site": {
				"includeJQuery": false,
				"name": "b@b.com",
				"id": 1,
				"googleAnalyticsProfile": null,
				"googleAnalyticsMainGoal": "E_COMMERCE",
				"url": "http://www.gallery-belyaevo.ru"
			},
			"personalizations": {
				"cappingPerVisitorConvertGoal": false,
				"goalId": null,
				"popIn": null,
				"description": null,
				"pluginCountDownHeadband": null,
				"globalCappingVisitorsConfiguration": "null",
				"variation": "{name=Variation 1, id=115495}",
				"expositionFrequencySameVisit": null,
				"targetingSegmentId": 45733,
				"trackerData": null,
				"cappingPerVisitorNumberExpositions": false,
				"archived": false,
				"kameleoonTracking": true,
				"pluginGoogleForm": null,
				"customContent": "{customCSS=null, customJavaScript=null}",
				"dateStarted": null,
				"dateEnded": null,
				"goals": [],
				"expositionFrequencyDelaySecondsBetweenTwoExpositions": null,
				"expositionFrequencySameVisitorDelaySeconds": null,
				"stickyBlock": null,
				"expositionFrequencySameVisitor": null,
				"id": 17995,
				"expositionFrequencySameVisitorMax": 8,
				"globalCappingNumberVisitors": false,
				"cappingPerVisitorGoalId": null,
				"pluginIAdvize": null,
				"personalizationCheckConditionsRule": "ALL_CONDITIONS",
				"targetingSegment": "{id=45733, name=additional, description=additional, conditions={firstLevelOrOperators=[], secondLevel=[{orOperators=[false, false], conditions=[{group=, type=REFERRERS, firstValue=0, secondValue=null, thirdValue=null, include=true, matchType=EXACT, customTargetingConditionId=null, readableDescription=Visitors having the configured referrer Google AdWords, disabled=false, weight=1}, {group=, type=INTERESTS, firstValue=1, secondValue=null, thirdValue=null, include=true, matchType=EXACT, customTargetingConditionId=null, readableDescription=Visitors interested in ya, disabled=false, weight=1}, {group=, type=CONVERSIONS, firstValue=22751, secondValue=null, thirdValue=null, include=true, matchType=EXACT, customTargetingConditionId=null, readableDescription=Visitors who converted the goal goal  name new, disabled=false, weight=1}]}]}, usedInExperiments=0, usedInPersonalizations=1, isBuyerPersonasSegment=false, eCommerceObjectivesNeeded=false}",
				"personalizationStatus": "DRAFT",
				"pluginSocialBar": null,
				"priority": 1,
				"pluginAdBlock": null,
				"personalizationConfiguration": "NONE",
				"variationId": 115495,
				"globalCappingGoalId": null,
				"customExpositionRate": 100,
				"name": "perso new",
				"siteId": 14797,
				"imageInPage": null
			}
		},
		"success": true,
		"errors": []
	} 

Delete Personalization

Delete Personalization. Personalization ID is required in the url.

https://api.kameleeon.com/k-api/sites/:siteId/personalizations/:id
curl -k -X DELETE \
-H "X-Auth-Key: ABCDEF123456789" \
-H "X-Auth-Email: a@a.com" \
-H "Content-Type: application/json" \
"https://api.kameleoon.com/k-api/sites/1/personalizations/2" \
HTTP/1.1 200 OK
{
		"result": {},
		"success": true,
		"errors": []
	}

 
Have more questions? Submit a request
Powered by Zendesk