curl --request POST \
--url https://api.kameleoon.com/personalizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"baseURL": "<string>",
"name": "<string>",
"siteId": 123,
"attributionWindow": 123,
"cappingPerVisitorConvertGoal": true,
"cappingPerVisitorExposedVisits": true,
"cappingPerVisitorExpositions": true,
"cappingPerVisitorGoalId": 123,
"category": "<string>",
"collectingDataEnabled": true,
"cssCode": "<string>",
"customExpositionRate": 123,
"description": "<string>",
"exposedVisitsSameVisitorMax": 123,
"expositionFrequencyDelay": 123,
"format": "<string>",
"globalCappingGoalId": 123,
"globalCappingNumberVisitors": true,
"globalScript": "<string>",
"goals": [
123
],
"imageInPage": {
"domElementSelector": "<string>",
"height": "<string>",
"htmlContent": "<string>",
"image": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"mainPageUrl": "<string>",
"redirectURL": "<string>",
"width": "<string>"
},
"isArchived": true,
"javaScriptCode": "<string>",
"location": "<string>",
"mainGoalId": 123,
"market": "<string>",
"maxNumberVisitorsExposed": 123,
"metaReadOnly": "<string>",
"multiExpositionFrequencyDelay": 123,
"popIn": {
"backgroundColor": "<string>",
"closeWithClickOnOverlay": true,
"customPositionAxisX": "<string>",
"customPositionAxisY": "<string>",
"fontSize": "<string>",
"height": "<string>",
"heightImageDesktop": "<string>",
"heightImageMobile": "<string>",
"heightImageTablet": "<string>",
"htmlContent": "<string>",
"idTarget2Sell": "<string>",
"image": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageDesktop": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageMobile": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageTablet": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"name": "<string>",
"redirectURL": "<string>",
"targetBlank": true,
"template": true,
"textColor": "<string>",
"textContent": "<string>",
"width": "<string>",
"widthImageDesktop": "<string>",
"widthImageMobile": "<string>",
"widthImageTablet": "<string>",
"withOverlay": true
},
"stickyBlock": {
"backgroundColor": "<string>",
"customPositionAxisX": "<string>",
"customPositionAxisY": "<string>",
"fontSize": "<string>",
"height": "<string>",
"heightImageDesktop": "<string>",
"heightImageMobile": "<string>",
"heightImageTablet": "<string>",
"htmlContent": "<string>",
"idTarget2Sell": "<string>",
"image": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageDesktop": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageMobile": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageTablet": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"name": "<string>",
"redirectURL": "<string>",
"shiftContent": true,
"shouldScrollTo": true,
"targetBlank": true,
"template": true,
"textColor": "<string>",
"textContent": "<string>",
"width": "<string>",
"widthImageDesktop": "<string>",
"widthImageMobile": "<string>",
"widthImageTablet": "<string>"
},
"tags": [
"<string>"
],
"targetingSegmentId": 123,
"trackingTools": [
{
"adobeOmnitureObject": "<string>",
"comScoreCustomerId": "<string>",
"comScoreDomain": "<string>",
"contentSquareUrl": "<string>",
"customIntegrations": [
"<string>"
],
"customVariable": 123,
"eulerianUserCentricParameter": "<string>",
"reportingScript": "<string>",
"universalAnalyticsDimension": 123
}
],
"variationId": 123,
"variationIds": [
123
],
"visitExpositionFrequency": 123,
"visitorExpositionFrequency": 123,
"visitorExpositionFrequencyMax": 123
}
'import requests
url = "https://api.kameleoon.com/personalizations"
payload = {
"baseURL": "<string>",
"name": "<string>",
"siteId": 123,
"attributionWindow": 123,
"cappingPerVisitorConvertGoal": True,
"cappingPerVisitorExposedVisits": True,
"cappingPerVisitorExpositions": True,
"cappingPerVisitorGoalId": 123,
"category": "<string>",
"collectingDataEnabled": True,
"cssCode": "<string>",
"customExpositionRate": 123,
"description": "<string>",
"exposedVisitsSameVisitorMax": 123,
"expositionFrequencyDelay": 123,
"format": "<string>",
"globalCappingGoalId": 123,
"globalCappingNumberVisitors": True,
"globalScript": "<string>",
"goals": [123],
"imageInPage": {
"domElementSelector": "<string>",
"height": "<string>",
"htmlContent": "<string>",
"image": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": ["<string>"],
"name": "<string>",
"path": "<string>",
"shared": True,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": ["<string>"],
"width": 123
},
"mainPageUrl": "<string>",
"redirectURL": "<string>",
"width": "<string>"
},
"isArchived": True,
"javaScriptCode": "<string>",
"location": "<string>",
"mainGoalId": 123,
"market": "<string>",
"maxNumberVisitorsExposed": 123,
"metaReadOnly": "<string>",
"multiExpositionFrequencyDelay": 123,
"popIn": {
"backgroundColor": "<string>",
"closeWithClickOnOverlay": True,
"customPositionAxisX": "<string>",
"customPositionAxisY": "<string>",
"fontSize": "<string>",
"height": "<string>",
"heightImageDesktop": "<string>",
"heightImageMobile": "<string>",
"heightImageTablet": "<string>",
"htmlContent": "<string>",
"idTarget2Sell": "<string>",
"image": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": ["<string>"],
"name": "<string>",
"path": "<string>",
"shared": True,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": ["<string>"],
"width": 123
},
"imageDesktop": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": ["<string>"],
"name": "<string>",
"path": "<string>",
"shared": True,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": ["<string>"],
"width": 123
},
"imageMobile": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": ["<string>"],
"name": "<string>",
"path": "<string>",
"shared": True,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": ["<string>"],
"width": 123
},
"imageTablet": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": ["<string>"],
"name": "<string>",
"path": "<string>",
"shared": True,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": ["<string>"],
"width": 123
},
"name": "<string>",
"redirectURL": "<string>",
"targetBlank": True,
"template": True,
"textColor": "<string>",
"textContent": "<string>",
"width": "<string>",
"widthImageDesktop": "<string>",
"widthImageMobile": "<string>",
"widthImageTablet": "<string>",
"withOverlay": True
},
"stickyBlock": {
"backgroundColor": "<string>",
"customPositionAxisX": "<string>",
"customPositionAxisY": "<string>",
"fontSize": "<string>",
"height": "<string>",
"heightImageDesktop": "<string>",
"heightImageMobile": "<string>",
"heightImageTablet": "<string>",
"htmlContent": "<string>",
"idTarget2Sell": "<string>",
"image": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": ["<string>"],
"name": "<string>",
"path": "<string>",
"shared": True,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": ["<string>"],
"width": 123
},
"imageDesktop": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": ["<string>"],
"name": "<string>",
"path": "<string>",
"shared": True,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": ["<string>"],
"width": 123
},
"imageMobile": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": ["<string>"],
"name": "<string>",
"path": "<string>",
"shared": True,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": ["<string>"],
"width": 123
},
"imageTablet": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": ["<string>"],
"name": "<string>",
"path": "<string>",
"shared": True,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": ["<string>"],
"width": 123
},
"name": "<string>",
"redirectURL": "<string>",
"shiftContent": True,
"shouldScrollTo": True,
"targetBlank": True,
"template": True,
"textColor": "<string>",
"textContent": "<string>",
"width": "<string>",
"widthImageDesktop": "<string>",
"widthImageMobile": "<string>",
"widthImageTablet": "<string>"
},
"tags": ["<string>"],
"targetingSegmentId": 123,
"trackingTools": [
{
"adobeOmnitureObject": "<string>",
"comScoreCustomerId": "<string>",
"comScoreDomain": "<string>",
"contentSquareUrl": "<string>",
"customIntegrations": ["<string>"],
"customVariable": 123,
"eulerianUserCentricParameter": "<string>",
"reportingScript": "<string>",
"universalAnalyticsDimension": 123
}
],
"variationId": 123,
"variationIds": [123],
"visitExpositionFrequency": 123,
"visitorExpositionFrequency": 123,
"visitorExpositionFrequencyMax": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
baseURL: '<string>',
name: '<string>',
siteId: 123,
attributionWindow: 123,
cappingPerVisitorConvertGoal: true,
cappingPerVisitorExposedVisits: true,
cappingPerVisitorExpositions: true,
cappingPerVisitorGoalId: 123,
category: '<string>',
collectingDataEnabled: true,
cssCode: '<string>',
customExpositionRate: 123,
description: '<string>',
exposedVisitsSameVisitorMax: 123,
expositionFrequencyDelay: 123,
format: '<string>',
globalCappingGoalId: 123,
globalCappingNumberVisitors: true,
globalScript: '<string>',
goals: [123],
imageInPage: {
domElementSelector: '<string>',
height: '<string>',
htmlContent: '<string>',
image: {
altText: '<string>',
baseColor: 123,
colorDepth: 123,
date: '2023-11-07T05:31:56Z',
description: '<string>',
fileName: '<string>',
height: 123,
keywords: ['<string>'],
name: '<string>',
path: '<string>',
shared: true,
siteId: 123,
source: '<string>',
sourceUrl: '<string>',
tags: ['<string>'],
width: 123
},
mainPageUrl: '<string>',
redirectURL: '<string>',
width: '<string>'
},
isArchived: true,
javaScriptCode: '<string>',
location: '<string>',
mainGoalId: 123,
market: '<string>',
maxNumberVisitorsExposed: 123,
metaReadOnly: '<string>',
multiExpositionFrequencyDelay: 123,
popIn: {
backgroundColor: '<string>',
closeWithClickOnOverlay: true,
customPositionAxisX: '<string>',
customPositionAxisY: '<string>',
fontSize: '<string>',
height: '<string>',
heightImageDesktop: '<string>',
heightImageMobile: '<string>',
heightImageTablet: '<string>',
htmlContent: '<string>',
idTarget2Sell: '<string>',
image: {
altText: '<string>',
baseColor: 123,
colorDepth: 123,
date: '2023-11-07T05:31:56Z',
description: '<string>',
fileName: '<string>',
height: 123,
keywords: ['<string>'],
name: '<string>',
path: '<string>',
shared: true,
siteId: 123,
source: '<string>',
sourceUrl: '<string>',
tags: ['<string>'],
width: 123
},
imageDesktop: {
altText: '<string>',
baseColor: 123,
colorDepth: 123,
date: '2023-11-07T05:31:56Z',
description: '<string>',
fileName: '<string>',
height: 123,
keywords: ['<string>'],
name: '<string>',
path: '<string>',
shared: true,
siteId: 123,
source: '<string>',
sourceUrl: '<string>',
tags: ['<string>'],
width: 123
},
imageMobile: {
altText: '<string>',
baseColor: 123,
colorDepth: 123,
date: '2023-11-07T05:31:56Z',
description: '<string>',
fileName: '<string>',
height: 123,
keywords: ['<string>'],
name: '<string>',
path: '<string>',
shared: true,
siteId: 123,
source: '<string>',
sourceUrl: '<string>',
tags: ['<string>'],
width: 123
},
imageTablet: {
altText: '<string>',
baseColor: 123,
colorDepth: 123,
date: '2023-11-07T05:31:56Z',
description: '<string>',
fileName: '<string>',
height: 123,
keywords: ['<string>'],
name: '<string>',
path: '<string>',
shared: true,
siteId: 123,
source: '<string>',
sourceUrl: '<string>',
tags: ['<string>'],
width: 123
},
name: '<string>',
redirectURL: '<string>',
targetBlank: true,
template: true,
textColor: '<string>',
textContent: '<string>',
width: '<string>',
widthImageDesktop: '<string>',
widthImageMobile: '<string>',
widthImageTablet: '<string>',
withOverlay: true
},
stickyBlock: {
backgroundColor: '<string>',
customPositionAxisX: '<string>',
customPositionAxisY: '<string>',
fontSize: '<string>',
height: '<string>',
heightImageDesktop: '<string>',
heightImageMobile: '<string>',
heightImageTablet: '<string>',
htmlContent: '<string>',
idTarget2Sell: '<string>',
image: {
altText: '<string>',
baseColor: 123,
colorDepth: 123,
date: '2023-11-07T05:31:56Z',
description: '<string>',
fileName: '<string>',
height: 123,
keywords: ['<string>'],
name: '<string>',
path: '<string>',
shared: true,
siteId: 123,
source: '<string>',
sourceUrl: '<string>',
tags: ['<string>'],
width: 123
},
imageDesktop: {
altText: '<string>',
baseColor: 123,
colorDepth: 123,
date: '2023-11-07T05:31:56Z',
description: '<string>',
fileName: '<string>',
height: 123,
keywords: ['<string>'],
name: '<string>',
path: '<string>',
shared: true,
siteId: 123,
source: '<string>',
sourceUrl: '<string>',
tags: ['<string>'],
width: 123
},
imageMobile: {
altText: '<string>',
baseColor: 123,
colorDepth: 123,
date: '2023-11-07T05:31:56Z',
description: '<string>',
fileName: '<string>',
height: 123,
keywords: ['<string>'],
name: '<string>',
path: '<string>',
shared: true,
siteId: 123,
source: '<string>',
sourceUrl: '<string>',
tags: ['<string>'],
width: 123
},
imageTablet: {
altText: '<string>',
baseColor: 123,
colorDepth: 123,
date: '2023-11-07T05:31:56Z',
description: '<string>',
fileName: '<string>',
height: 123,
keywords: ['<string>'],
name: '<string>',
path: '<string>',
shared: true,
siteId: 123,
source: '<string>',
sourceUrl: '<string>',
tags: ['<string>'],
width: 123
},
name: '<string>',
redirectURL: '<string>',
shiftContent: true,
shouldScrollTo: true,
targetBlank: true,
template: true,
textColor: '<string>',
textContent: '<string>',
width: '<string>',
widthImageDesktop: '<string>',
widthImageMobile: '<string>',
widthImageTablet: '<string>'
},
tags: ['<string>'],
targetingSegmentId: 123,
trackingTools: [
{
adobeOmnitureObject: '<string>',
comScoreCustomerId: '<string>',
comScoreDomain: '<string>',
contentSquareUrl: '<string>',
customIntegrations: ['<string>'],
customVariable: 123,
eulerianUserCentricParameter: '<string>',
reportingScript: '<string>',
universalAnalyticsDimension: 123
}
],
variationId: 123,
variationIds: [123],
visitExpositionFrequency: 123,
visitorExpositionFrequency: 123,
visitorExpositionFrequencyMax: 123
})
};
fetch('https://api.kameleoon.com/personalizations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kameleoon.com/personalizations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'baseURL' => '<string>',
'name' => '<string>',
'siteId' => 123,
'attributionWindow' => 123,
'cappingPerVisitorConvertGoal' => true,
'cappingPerVisitorExposedVisits' => true,
'cappingPerVisitorExpositions' => true,
'cappingPerVisitorGoalId' => 123,
'category' => '<string>',
'collectingDataEnabled' => true,
'cssCode' => '<string>',
'customExpositionRate' => 123,
'description' => '<string>',
'exposedVisitsSameVisitorMax' => 123,
'expositionFrequencyDelay' => 123,
'format' => '<string>',
'globalCappingGoalId' => 123,
'globalCappingNumberVisitors' => true,
'globalScript' => '<string>',
'goals' => [
123
],
'imageInPage' => [
'domElementSelector' => '<string>',
'height' => '<string>',
'htmlContent' => '<string>',
'image' => [
'altText' => '<string>',
'baseColor' => 123,
'colorDepth' => 123,
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'fileName' => '<string>',
'height' => 123,
'keywords' => [
'<string>'
],
'name' => '<string>',
'path' => '<string>',
'shared' => true,
'siteId' => 123,
'source' => '<string>',
'sourceUrl' => '<string>',
'tags' => [
'<string>'
],
'width' => 123
],
'mainPageUrl' => '<string>',
'redirectURL' => '<string>',
'width' => '<string>'
],
'isArchived' => true,
'javaScriptCode' => '<string>',
'location' => '<string>',
'mainGoalId' => 123,
'market' => '<string>',
'maxNumberVisitorsExposed' => 123,
'metaReadOnly' => '<string>',
'multiExpositionFrequencyDelay' => 123,
'popIn' => [
'backgroundColor' => '<string>',
'closeWithClickOnOverlay' => true,
'customPositionAxisX' => '<string>',
'customPositionAxisY' => '<string>',
'fontSize' => '<string>',
'height' => '<string>',
'heightImageDesktop' => '<string>',
'heightImageMobile' => '<string>',
'heightImageTablet' => '<string>',
'htmlContent' => '<string>',
'idTarget2Sell' => '<string>',
'image' => [
'altText' => '<string>',
'baseColor' => 123,
'colorDepth' => 123,
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'fileName' => '<string>',
'height' => 123,
'keywords' => [
'<string>'
],
'name' => '<string>',
'path' => '<string>',
'shared' => true,
'siteId' => 123,
'source' => '<string>',
'sourceUrl' => '<string>',
'tags' => [
'<string>'
],
'width' => 123
],
'imageDesktop' => [
'altText' => '<string>',
'baseColor' => 123,
'colorDepth' => 123,
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'fileName' => '<string>',
'height' => 123,
'keywords' => [
'<string>'
],
'name' => '<string>',
'path' => '<string>',
'shared' => true,
'siteId' => 123,
'source' => '<string>',
'sourceUrl' => '<string>',
'tags' => [
'<string>'
],
'width' => 123
],
'imageMobile' => [
'altText' => '<string>',
'baseColor' => 123,
'colorDepth' => 123,
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'fileName' => '<string>',
'height' => 123,
'keywords' => [
'<string>'
],
'name' => '<string>',
'path' => '<string>',
'shared' => true,
'siteId' => 123,
'source' => '<string>',
'sourceUrl' => '<string>',
'tags' => [
'<string>'
],
'width' => 123
],
'imageTablet' => [
'altText' => '<string>',
'baseColor' => 123,
'colorDepth' => 123,
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'fileName' => '<string>',
'height' => 123,
'keywords' => [
'<string>'
],
'name' => '<string>',
'path' => '<string>',
'shared' => true,
'siteId' => 123,
'source' => '<string>',
'sourceUrl' => '<string>',
'tags' => [
'<string>'
],
'width' => 123
],
'name' => '<string>',
'redirectURL' => '<string>',
'targetBlank' => true,
'template' => true,
'textColor' => '<string>',
'textContent' => '<string>',
'width' => '<string>',
'widthImageDesktop' => '<string>',
'widthImageMobile' => '<string>',
'widthImageTablet' => '<string>',
'withOverlay' => true
],
'stickyBlock' => [
'backgroundColor' => '<string>',
'customPositionAxisX' => '<string>',
'customPositionAxisY' => '<string>',
'fontSize' => '<string>',
'height' => '<string>',
'heightImageDesktop' => '<string>',
'heightImageMobile' => '<string>',
'heightImageTablet' => '<string>',
'htmlContent' => '<string>',
'idTarget2Sell' => '<string>',
'image' => [
'altText' => '<string>',
'baseColor' => 123,
'colorDepth' => 123,
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'fileName' => '<string>',
'height' => 123,
'keywords' => [
'<string>'
],
'name' => '<string>',
'path' => '<string>',
'shared' => true,
'siteId' => 123,
'source' => '<string>',
'sourceUrl' => '<string>',
'tags' => [
'<string>'
],
'width' => 123
],
'imageDesktop' => [
'altText' => '<string>',
'baseColor' => 123,
'colorDepth' => 123,
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'fileName' => '<string>',
'height' => 123,
'keywords' => [
'<string>'
],
'name' => '<string>',
'path' => '<string>',
'shared' => true,
'siteId' => 123,
'source' => '<string>',
'sourceUrl' => '<string>',
'tags' => [
'<string>'
],
'width' => 123
],
'imageMobile' => [
'altText' => '<string>',
'baseColor' => 123,
'colorDepth' => 123,
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'fileName' => '<string>',
'height' => 123,
'keywords' => [
'<string>'
],
'name' => '<string>',
'path' => '<string>',
'shared' => true,
'siteId' => 123,
'source' => '<string>',
'sourceUrl' => '<string>',
'tags' => [
'<string>'
],
'width' => 123
],
'imageTablet' => [
'altText' => '<string>',
'baseColor' => 123,
'colorDepth' => 123,
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'fileName' => '<string>',
'height' => 123,
'keywords' => [
'<string>'
],
'name' => '<string>',
'path' => '<string>',
'shared' => true,
'siteId' => 123,
'source' => '<string>',
'sourceUrl' => '<string>',
'tags' => [
'<string>'
],
'width' => 123
],
'name' => '<string>',
'redirectURL' => '<string>',
'shiftContent' => true,
'shouldScrollTo' => true,
'targetBlank' => true,
'template' => true,
'textColor' => '<string>',
'textContent' => '<string>',
'width' => '<string>',
'widthImageDesktop' => '<string>',
'widthImageMobile' => '<string>',
'widthImageTablet' => '<string>'
],
'tags' => [
'<string>'
],
'targetingSegmentId' => 123,
'trackingTools' => [
[
'adobeOmnitureObject' => '<string>',
'comScoreCustomerId' => '<string>',
'comScoreDomain' => '<string>',
'contentSquareUrl' => '<string>',
'customIntegrations' => [
'<string>'
],
'customVariable' => 123,
'eulerianUserCentricParameter' => '<string>',
'reportingScript' => '<string>',
'universalAnalyticsDimension' => 123
]
],
'variationId' => 123,
'variationIds' => [
123
],
'visitExpositionFrequency' => 123,
'visitorExpositionFrequency' => 123,
'visitorExpositionFrequencyMax' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kameleoon.com/personalizations"
payload := strings.NewReader("{\n \"baseURL\": \"<string>\",\n \"name\": \"<string>\",\n \"siteId\": 123,\n \"attributionWindow\": 123,\n \"cappingPerVisitorConvertGoal\": true,\n \"cappingPerVisitorExposedVisits\": true,\n \"cappingPerVisitorExpositions\": true,\n \"cappingPerVisitorGoalId\": 123,\n \"category\": \"<string>\",\n \"collectingDataEnabled\": true,\n \"cssCode\": \"<string>\",\n \"customExpositionRate\": 123,\n \"description\": \"<string>\",\n \"exposedVisitsSameVisitorMax\": 123,\n \"expositionFrequencyDelay\": 123,\n \"format\": \"<string>\",\n \"globalCappingGoalId\": 123,\n \"globalCappingNumberVisitors\": true,\n \"globalScript\": \"<string>\",\n \"goals\": [\n 123\n ],\n \"imageInPage\": {\n \"domElementSelector\": \"<string>\",\n \"height\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"image\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"mainPageUrl\": \"<string>\",\n \"redirectURL\": \"<string>\",\n \"width\": \"<string>\"\n },\n \"isArchived\": true,\n \"javaScriptCode\": \"<string>\",\n \"location\": \"<string>\",\n \"mainGoalId\": 123,\n \"market\": \"<string>\",\n \"maxNumberVisitorsExposed\": 123,\n \"metaReadOnly\": \"<string>\",\n \"multiExpositionFrequencyDelay\": 123,\n \"popIn\": {\n \"backgroundColor\": \"<string>\",\n \"closeWithClickOnOverlay\": true,\n \"customPositionAxisX\": \"<string>\",\n \"customPositionAxisY\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"height\": \"<string>\",\n \"heightImageDesktop\": \"<string>\",\n \"heightImageMobile\": \"<string>\",\n \"heightImageTablet\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"idTarget2Sell\": \"<string>\",\n \"image\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageDesktop\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageMobile\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageTablet\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"name\": \"<string>\",\n \"redirectURL\": \"<string>\",\n \"targetBlank\": true,\n \"template\": true,\n \"textColor\": \"<string>\",\n \"textContent\": \"<string>\",\n \"width\": \"<string>\",\n \"widthImageDesktop\": \"<string>\",\n \"widthImageMobile\": \"<string>\",\n \"widthImageTablet\": \"<string>\",\n \"withOverlay\": true\n },\n \"stickyBlock\": {\n \"backgroundColor\": \"<string>\",\n \"customPositionAxisX\": \"<string>\",\n \"customPositionAxisY\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"height\": \"<string>\",\n \"heightImageDesktop\": \"<string>\",\n \"heightImageMobile\": \"<string>\",\n \"heightImageTablet\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"idTarget2Sell\": \"<string>\",\n \"image\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageDesktop\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageMobile\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageTablet\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"name\": \"<string>\",\n \"redirectURL\": \"<string>\",\n \"shiftContent\": true,\n \"shouldScrollTo\": true,\n \"targetBlank\": true,\n \"template\": true,\n \"textColor\": \"<string>\",\n \"textContent\": \"<string>\",\n \"width\": \"<string>\",\n \"widthImageDesktop\": \"<string>\",\n \"widthImageMobile\": \"<string>\",\n \"widthImageTablet\": \"<string>\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"targetingSegmentId\": 123,\n \"trackingTools\": [\n {\n \"adobeOmnitureObject\": \"<string>\",\n \"comScoreCustomerId\": \"<string>\",\n \"comScoreDomain\": \"<string>\",\n \"contentSquareUrl\": \"<string>\",\n \"customIntegrations\": [\n \"<string>\"\n ],\n \"customVariable\": 123,\n \"eulerianUserCentricParameter\": \"<string>\",\n \"reportingScript\": \"<string>\",\n \"universalAnalyticsDimension\": 123\n }\n ],\n \"variationId\": 123,\n \"variationIds\": [\n 123\n ],\n \"visitExpositionFrequency\": 123,\n \"visitorExpositionFrequency\": 123,\n \"visitorExpositionFrequencyMax\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kameleoon.com/personalizations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"baseURL\": \"<string>\",\n \"name\": \"<string>\",\n \"siteId\": 123,\n \"attributionWindow\": 123,\n \"cappingPerVisitorConvertGoal\": true,\n \"cappingPerVisitorExposedVisits\": true,\n \"cappingPerVisitorExpositions\": true,\n \"cappingPerVisitorGoalId\": 123,\n \"category\": \"<string>\",\n \"collectingDataEnabled\": true,\n \"cssCode\": \"<string>\",\n \"customExpositionRate\": 123,\n \"description\": \"<string>\",\n \"exposedVisitsSameVisitorMax\": 123,\n \"expositionFrequencyDelay\": 123,\n \"format\": \"<string>\",\n \"globalCappingGoalId\": 123,\n \"globalCappingNumberVisitors\": true,\n \"globalScript\": \"<string>\",\n \"goals\": [\n 123\n ],\n \"imageInPage\": {\n \"domElementSelector\": \"<string>\",\n \"height\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"image\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"mainPageUrl\": \"<string>\",\n \"redirectURL\": \"<string>\",\n \"width\": \"<string>\"\n },\n \"isArchived\": true,\n \"javaScriptCode\": \"<string>\",\n \"location\": \"<string>\",\n \"mainGoalId\": 123,\n \"market\": \"<string>\",\n \"maxNumberVisitorsExposed\": 123,\n \"metaReadOnly\": \"<string>\",\n \"multiExpositionFrequencyDelay\": 123,\n \"popIn\": {\n \"backgroundColor\": \"<string>\",\n \"closeWithClickOnOverlay\": true,\n \"customPositionAxisX\": \"<string>\",\n \"customPositionAxisY\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"height\": \"<string>\",\n \"heightImageDesktop\": \"<string>\",\n \"heightImageMobile\": \"<string>\",\n \"heightImageTablet\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"idTarget2Sell\": \"<string>\",\n \"image\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageDesktop\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageMobile\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageTablet\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"name\": \"<string>\",\n \"redirectURL\": \"<string>\",\n \"targetBlank\": true,\n \"template\": true,\n \"textColor\": \"<string>\",\n \"textContent\": \"<string>\",\n \"width\": \"<string>\",\n \"widthImageDesktop\": \"<string>\",\n \"widthImageMobile\": \"<string>\",\n \"widthImageTablet\": \"<string>\",\n \"withOverlay\": true\n },\n \"stickyBlock\": {\n \"backgroundColor\": \"<string>\",\n \"customPositionAxisX\": \"<string>\",\n \"customPositionAxisY\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"height\": \"<string>\",\n \"heightImageDesktop\": \"<string>\",\n \"heightImageMobile\": \"<string>\",\n \"heightImageTablet\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"idTarget2Sell\": \"<string>\",\n \"image\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageDesktop\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageMobile\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageTablet\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"name\": \"<string>\",\n \"redirectURL\": \"<string>\",\n \"shiftContent\": true,\n \"shouldScrollTo\": true,\n \"targetBlank\": true,\n \"template\": true,\n \"textColor\": \"<string>\",\n \"textContent\": \"<string>\",\n \"width\": \"<string>\",\n \"widthImageDesktop\": \"<string>\",\n \"widthImageMobile\": \"<string>\",\n \"widthImageTablet\": \"<string>\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"targetingSegmentId\": 123,\n \"trackingTools\": [\n {\n \"adobeOmnitureObject\": \"<string>\",\n \"comScoreCustomerId\": \"<string>\",\n \"comScoreDomain\": \"<string>\",\n \"contentSquareUrl\": \"<string>\",\n \"customIntegrations\": [\n \"<string>\"\n ],\n \"customVariable\": 123,\n \"eulerianUserCentricParameter\": \"<string>\",\n \"reportingScript\": \"<string>\",\n \"universalAnalyticsDimension\": 123\n }\n ],\n \"variationId\": 123,\n \"variationIds\": [\n 123\n ],\n \"visitExpositionFrequency\": 123,\n \"visitorExpositionFrequency\": 123,\n \"visitorExpositionFrequencyMax\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kameleoon.com/personalizations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"baseURL\": \"<string>\",\n \"name\": \"<string>\",\n \"siteId\": 123,\n \"attributionWindow\": 123,\n \"cappingPerVisitorConvertGoal\": true,\n \"cappingPerVisitorExposedVisits\": true,\n \"cappingPerVisitorExpositions\": true,\n \"cappingPerVisitorGoalId\": 123,\n \"category\": \"<string>\",\n \"collectingDataEnabled\": true,\n \"cssCode\": \"<string>\",\n \"customExpositionRate\": 123,\n \"description\": \"<string>\",\n \"exposedVisitsSameVisitorMax\": 123,\n \"expositionFrequencyDelay\": 123,\n \"format\": \"<string>\",\n \"globalCappingGoalId\": 123,\n \"globalCappingNumberVisitors\": true,\n \"globalScript\": \"<string>\",\n \"goals\": [\n 123\n ],\n \"imageInPage\": {\n \"domElementSelector\": \"<string>\",\n \"height\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"image\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"mainPageUrl\": \"<string>\",\n \"redirectURL\": \"<string>\",\n \"width\": \"<string>\"\n },\n \"isArchived\": true,\n \"javaScriptCode\": \"<string>\",\n \"location\": \"<string>\",\n \"mainGoalId\": 123,\n \"market\": \"<string>\",\n \"maxNumberVisitorsExposed\": 123,\n \"metaReadOnly\": \"<string>\",\n \"multiExpositionFrequencyDelay\": 123,\n \"popIn\": {\n \"backgroundColor\": \"<string>\",\n \"closeWithClickOnOverlay\": true,\n \"customPositionAxisX\": \"<string>\",\n \"customPositionAxisY\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"height\": \"<string>\",\n \"heightImageDesktop\": \"<string>\",\n \"heightImageMobile\": \"<string>\",\n \"heightImageTablet\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"idTarget2Sell\": \"<string>\",\n \"image\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageDesktop\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageMobile\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageTablet\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"name\": \"<string>\",\n \"redirectURL\": \"<string>\",\n \"targetBlank\": true,\n \"template\": true,\n \"textColor\": \"<string>\",\n \"textContent\": \"<string>\",\n \"width\": \"<string>\",\n \"widthImageDesktop\": \"<string>\",\n \"widthImageMobile\": \"<string>\",\n \"widthImageTablet\": \"<string>\",\n \"withOverlay\": true\n },\n \"stickyBlock\": {\n \"backgroundColor\": \"<string>\",\n \"customPositionAxisX\": \"<string>\",\n \"customPositionAxisY\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"height\": \"<string>\",\n \"heightImageDesktop\": \"<string>\",\n \"heightImageMobile\": \"<string>\",\n \"heightImageTablet\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"idTarget2Sell\": \"<string>\",\n \"image\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageDesktop\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageMobile\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageTablet\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"name\": \"<string>\",\n \"redirectURL\": \"<string>\",\n \"shiftContent\": true,\n \"shouldScrollTo\": true,\n \"targetBlank\": true,\n \"template\": true,\n \"textColor\": \"<string>\",\n \"textContent\": \"<string>\",\n \"width\": \"<string>\",\n \"widthImageDesktop\": \"<string>\",\n \"widthImageMobile\": \"<string>\",\n \"widthImageTablet\": \"<string>\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"targetingSegmentId\": 123,\n \"trackingTools\": [\n {\n \"adobeOmnitureObject\": \"<string>\",\n \"comScoreCustomerId\": \"<string>\",\n \"comScoreDomain\": \"<string>\",\n \"contentSquareUrl\": \"<string>\",\n \"customIntegrations\": [\n \"<string>\"\n ],\n \"customVariable\": 123,\n \"eulerianUserCentricParameter\": \"<string>\",\n \"reportingScript\": \"<string>\",\n \"universalAnalyticsDimension\": 123\n }\n ],\n \"variationId\": 123,\n \"variationIds\": [\n 123\n ],\n \"visitExpositionFrequency\": 123,\n \"visitorExpositionFrequency\": 123,\n \"visitorExpositionFrequencyMax\": 123\n}"
response = http.request(request)
puts response.read_body{
"baseURL": "<string>",
"name": "<string>",
"siteId": 123,
"attributionWindow": 123,
"cappingPerVisitorConvertGoal": true,
"cappingPerVisitorExposedVisits": true,
"cappingPerVisitorExpositions": true,
"cappingPerVisitorGoalId": 123,
"category": "<string>",
"collectingDataEnabled": true,
"createdBy": 123,
"cssCode": "<string>",
"customExpositionRate": 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>",
"exposedVisitsSameVisitorMax": 123,
"expositionFrequencyDelay": 123,
"format": "<string>",
"globalCappingGoalId": 123,
"globalCappingNumberVisitors": true,
"globalScript": "<string>",
"goals": [
123
],
"id": 123,
"imageInPage": {
"domElementSelector": "<string>",
"height": "<string>",
"htmlContent": "<string>",
"image": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"mainPageUrl": "<string>",
"redirectURL": "<string>",
"width": "<string>"
},
"isArchived": true,
"javaScriptCode": "<string>",
"location": "<string>",
"mainGoalId": 123,
"market": "<string>",
"maxNumberVisitorsExposed": 123,
"metaReadOnly": "<string>",
"multiExpositionFrequencyDelay": 123,
"popIn": {
"backgroundColor": "<string>",
"closeWithClickOnOverlay": true,
"customPositionAxisX": "<string>",
"customPositionAxisY": "<string>",
"fontSize": "<string>",
"height": "<string>",
"heightImageDesktop": "<string>",
"heightImageMobile": "<string>",
"heightImageTablet": "<string>",
"htmlContent": "<string>",
"idTarget2Sell": "<string>",
"image": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageDesktop": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageMobile": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageTablet": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"name": "<string>",
"redirectURL": "<string>",
"targetBlank": true,
"template": true,
"textColor": "<string>",
"textContent": "<string>",
"width": "<string>",
"widthImageDesktop": "<string>",
"widthImageMobile": "<string>",
"widthImageTablet": "<string>",
"withOverlay": true
},
"priority": 123,
"status": "<string>",
"stickyBlock": {
"backgroundColor": "<string>",
"customPositionAxisX": "<string>",
"customPositionAxisY": "<string>",
"fontSize": "<string>",
"height": "<string>",
"heightImageDesktop": "<string>",
"heightImageMobile": "<string>",
"heightImageTablet": "<string>",
"htmlContent": "<string>",
"idTarget2Sell": "<string>",
"image": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageDesktop": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageMobile": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageTablet": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"name": "<string>",
"redirectURL": "<string>",
"shiftContent": true,
"shouldScrollTo": true,
"targetBlank": true,
"template": true,
"textColor": "<string>",
"textContent": "<string>",
"width": "<string>",
"widthImageDesktop": "<string>",
"widthImageMobile": "<string>",
"widthImageTablet": "<string>"
},
"tags": [
"<string>"
],
"targetingRule": {
"siteId": 123,
"id": 123,
"segmentId": 123,
"targetingConfigurationParam": "<string>",
"triggerId": 123
},
"targetingRuleId": 123,
"targetingSegmentId": 123,
"trackingTools": [
{
"adobeOmnitureObject": "<string>",
"comScoreCustomerId": "<string>",
"comScoreDomain": "<string>",
"contentSquareUrl": "<string>",
"customIntegrations": [
"<string>"
],
"customVariable": 123,
"eulerianUserCentricParameter": "<string>",
"reportingScript": "<string>",
"universalAnalyticsDimension": 123
}
],
"variationId": 123,
"variationIds": [
123
],
"visitExpositionFrequency": 123,
"visitorExpositionFrequency": 123,
"visitorExpositionFrequencyMax": 123,
"widget": {
"siteId": 123,
"config": "<string>",
"cssCode": "<string>",
"dateActivated": "2023-11-07T05:31:56Z",
"dateCreated": "2023-11-07T05:31:56Z",
"dateModified": "2023-11-07T05:31:56Z",
"description": "<string>",
"htmlCode": "<string>",
"id": 123,
"isCustomTemplate": true,
"name": "<string>",
"tags": [
"<string>"
],
"templateCssCode": "<string>",
"templateHtmlCode": "<string>",
"templateJavaScriptCode": "<string>",
"themeId": 123,
"url": "<string>",
"useCustomData": true,
"widgetEditorTemplate": "<string>"
}
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}Create new personalization
Create new personalization with given parameters
curl --request POST \
--url https://api.kameleoon.com/personalizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"baseURL": "<string>",
"name": "<string>",
"siteId": 123,
"attributionWindow": 123,
"cappingPerVisitorConvertGoal": true,
"cappingPerVisitorExposedVisits": true,
"cappingPerVisitorExpositions": true,
"cappingPerVisitorGoalId": 123,
"category": "<string>",
"collectingDataEnabled": true,
"cssCode": "<string>",
"customExpositionRate": 123,
"description": "<string>",
"exposedVisitsSameVisitorMax": 123,
"expositionFrequencyDelay": 123,
"format": "<string>",
"globalCappingGoalId": 123,
"globalCappingNumberVisitors": true,
"globalScript": "<string>",
"goals": [
123
],
"imageInPage": {
"domElementSelector": "<string>",
"height": "<string>",
"htmlContent": "<string>",
"image": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"mainPageUrl": "<string>",
"redirectURL": "<string>",
"width": "<string>"
},
"isArchived": true,
"javaScriptCode": "<string>",
"location": "<string>",
"mainGoalId": 123,
"market": "<string>",
"maxNumberVisitorsExposed": 123,
"metaReadOnly": "<string>",
"multiExpositionFrequencyDelay": 123,
"popIn": {
"backgroundColor": "<string>",
"closeWithClickOnOverlay": true,
"customPositionAxisX": "<string>",
"customPositionAxisY": "<string>",
"fontSize": "<string>",
"height": "<string>",
"heightImageDesktop": "<string>",
"heightImageMobile": "<string>",
"heightImageTablet": "<string>",
"htmlContent": "<string>",
"idTarget2Sell": "<string>",
"image": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageDesktop": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageMobile": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageTablet": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"name": "<string>",
"redirectURL": "<string>",
"targetBlank": true,
"template": true,
"textColor": "<string>",
"textContent": "<string>",
"width": "<string>",
"widthImageDesktop": "<string>",
"widthImageMobile": "<string>",
"widthImageTablet": "<string>",
"withOverlay": true
},
"stickyBlock": {
"backgroundColor": "<string>",
"customPositionAxisX": "<string>",
"customPositionAxisY": "<string>",
"fontSize": "<string>",
"height": "<string>",
"heightImageDesktop": "<string>",
"heightImageMobile": "<string>",
"heightImageTablet": "<string>",
"htmlContent": "<string>",
"idTarget2Sell": "<string>",
"image": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageDesktop": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageMobile": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageTablet": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"name": "<string>",
"redirectURL": "<string>",
"shiftContent": true,
"shouldScrollTo": true,
"targetBlank": true,
"template": true,
"textColor": "<string>",
"textContent": "<string>",
"width": "<string>",
"widthImageDesktop": "<string>",
"widthImageMobile": "<string>",
"widthImageTablet": "<string>"
},
"tags": [
"<string>"
],
"targetingSegmentId": 123,
"trackingTools": [
{
"adobeOmnitureObject": "<string>",
"comScoreCustomerId": "<string>",
"comScoreDomain": "<string>",
"contentSquareUrl": "<string>",
"customIntegrations": [
"<string>"
],
"customVariable": 123,
"eulerianUserCentricParameter": "<string>",
"reportingScript": "<string>",
"universalAnalyticsDimension": 123
}
],
"variationId": 123,
"variationIds": [
123
],
"visitExpositionFrequency": 123,
"visitorExpositionFrequency": 123,
"visitorExpositionFrequencyMax": 123
}
'import requests
url = "https://api.kameleoon.com/personalizations"
payload = {
"baseURL": "<string>",
"name": "<string>",
"siteId": 123,
"attributionWindow": 123,
"cappingPerVisitorConvertGoal": True,
"cappingPerVisitorExposedVisits": True,
"cappingPerVisitorExpositions": True,
"cappingPerVisitorGoalId": 123,
"category": "<string>",
"collectingDataEnabled": True,
"cssCode": "<string>",
"customExpositionRate": 123,
"description": "<string>",
"exposedVisitsSameVisitorMax": 123,
"expositionFrequencyDelay": 123,
"format": "<string>",
"globalCappingGoalId": 123,
"globalCappingNumberVisitors": True,
"globalScript": "<string>",
"goals": [123],
"imageInPage": {
"domElementSelector": "<string>",
"height": "<string>",
"htmlContent": "<string>",
"image": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": ["<string>"],
"name": "<string>",
"path": "<string>",
"shared": True,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": ["<string>"],
"width": 123
},
"mainPageUrl": "<string>",
"redirectURL": "<string>",
"width": "<string>"
},
"isArchived": True,
"javaScriptCode": "<string>",
"location": "<string>",
"mainGoalId": 123,
"market": "<string>",
"maxNumberVisitorsExposed": 123,
"metaReadOnly": "<string>",
"multiExpositionFrequencyDelay": 123,
"popIn": {
"backgroundColor": "<string>",
"closeWithClickOnOverlay": True,
"customPositionAxisX": "<string>",
"customPositionAxisY": "<string>",
"fontSize": "<string>",
"height": "<string>",
"heightImageDesktop": "<string>",
"heightImageMobile": "<string>",
"heightImageTablet": "<string>",
"htmlContent": "<string>",
"idTarget2Sell": "<string>",
"image": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": ["<string>"],
"name": "<string>",
"path": "<string>",
"shared": True,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": ["<string>"],
"width": 123
},
"imageDesktop": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": ["<string>"],
"name": "<string>",
"path": "<string>",
"shared": True,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": ["<string>"],
"width": 123
},
"imageMobile": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": ["<string>"],
"name": "<string>",
"path": "<string>",
"shared": True,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": ["<string>"],
"width": 123
},
"imageTablet": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": ["<string>"],
"name": "<string>",
"path": "<string>",
"shared": True,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": ["<string>"],
"width": 123
},
"name": "<string>",
"redirectURL": "<string>",
"targetBlank": True,
"template": True,
"textColor": "<string>",
"textContent": "<string>",
"width": "<string>",
"widthImageDesktop": "<string>",
"widthImageMobile": "<string>",
"widthImageTablet": "<string>",
"withOverlay": True
},
"stickyBlock": {
"backgroundColor": "<string>",
"customPositionAxisX": "<string>",
"customPositionAxisY": "<string>",
"fontSize": "<string>",
"height": "<string>",
"heightImageDesktop": "<string>",
"heightImageMobile": "<string>",
"heightImageTablet": "<string>",
"htmlContent": "<string>",
"idTarget2Sell": "<string>",
"image": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": ["<string>"],
"name": "<string>",
"path": "<string>",
"shared": True,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": ["<string>"],
"width": 123
},
"imageDesktop": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": ["<string>"],
"name": "<string>",
"path": "<string>",
"shared": True,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": ["<string>"],
"width": 123
},
"imageMobile": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": ["<string>"],
"name": "<string>",
"path": "<string>",
"shared": True,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": ["<string>"],
"width": 123
},
"imageTablet": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"height": 123,
"keywords": ["<string>"],
"name": "<string>",
"path": "<string>",
"shared": True,
"siteId": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": ["<string>"],
"width": 123
},
"name": "<string>",
"redirectURL": "<string>",
"shiftContent": True,
"shouldScrollTo": True,
"targetBlank": True,
"template": True,
"textColor": "<string>",
"textContent": "<string>",
"width": "<string>",
"widthImageDesktop": "<string>",
"widthImageMobile": "<string>",
"widthImageTablet": "<string>"
},
"tags": ["<string>"],
"targetingSegmentId": 123,
"trackingTools": [
{
"adobeOmnitureObject": "<string>",
"comScoreCustomerId": "<string>",
"comScoreDomain": "<string>",
"contentSquareUrl": "<string>",
"customIntegrations": ["<string>"],
"customVariable": 123,
"eulerianUserCentricParameter": "<string>",
"reportingScript": "<string>",
"universalAnalyticsDimension": 123
}
],
"variationId": 123,
"variationIds": [123],
"visitExpositionFrequency": 123,
"visitorExpositionFrequency": 123,
"visitorExpositionFrequencyMax": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
baseURL: '<string>',
name: '<string>',
siteId: 123,
attributionWindow: 123,
cappingPerVisitorConvertGoal: true,
cappingPerVisitorExposedVisits: true,
cappingPerVisitorExpositions: true,
cappingPerVisitorGoalId: 123,
category: '<string>',
collectingDataEnabled: true,
cssCode: '<string>',
customExpositionRate: 123,
description: '<string>',
exposedVisitsSameVisitorMax: 123,
expositionFrequencyDelay: 123,
format: '<string>',
globalCappingGoalId: 123,
globalCappingNumberVisitors: true,
globalScript: '<string>',
goals: [123],
imageInPage: {
domElementSelector: '<string>',
height: '<string>',
htmlContent: '<string>',
image: {
altText: '<string>',
baseColor: 123,
colorDepth: 123,
date: '2023-11-07T05:31:56Z',
description: '<string>',
fileName: '<string>',
height: 123,
keywords: ['<string>'],
name: '<string>',
path: '<string>',
shared: true,
siteId: 123,
source: '<string>',
sourceUrl: '<string>',
tags: ['<string>'],
width: 123
},
mainPageUrl: '<string>',
redirectURL: '<string>',
width: '<string>'
},
isArchived: true,
javaScriptCode: '<string>',
location: '<string>',
mainGoalId: 123,
market: '<string>',
maxNumberVisitorsExposed: 123,
metaReadOnly: '<string>',
multiExpositionFrequencyDelay: 123,
popIn: {
backgroundColor: '<string>',
closeWithClickOnOverlay: true,
customPositionAxisX: '<string>',
customPositionAxisY: '<string>',
fontSize: '<string>',
height: '<string>',
heightImageDesktop: '<string>',
heightImageMobile: '<string>',
heightImageTablet: '<string>',
htmlContent: '<string>',
idTarget2Sell: '<string>',
image: {
altText: '<string>',
baseColor: 123,
colorDepth: 123,
date: '2023-11-07T05:31:56Z',
description: '<string>',
fileName: '<string>',
height: 123,
keywords: ['<string>'],
name: '<string>',
path: '<string>',
shared: true,
siteId: 123,
source: '<string>',
sourceUrl: '<string>',
tags: ['<string>'],
width: 123
},
imageDesktop: {
altText: '<string>',
baseColor: 123,
colorDepth: 123,
date: '2023-11-07T05:31:56Z',
description: '<string>',
fileName: '<string>',
height: 123,
keywords: ['<string>'],
name: '<string>',
path: '<string>',
shared: true,
siteId: 123,
source: '<string>',
sourceUrl: '<string>',
tags: ['<string>'],
width: 123
},
imageMobile: {
altText: '<string>',
baseColor: 123,
colorDepth: 123,
date: '2023-11-07T05:31:56Z',
description: '<string>',
fileName: '<string>',
height: 123,
keywords: ['<string>'],
name: '<string>',
path: '<string>',
shared: true,
siteId: 123,
source: '<string>',
sourceUrl: '<string>',
tags: ['<string>'],
width: 123
},
imageTablet: {
altText: '<string>',
baseColor: 123,
colorDepth: 123,
date: '2023-11-07T05:31:56Z',
description: '<string>',
fileName: '<string>',
height: 123,
keywords: ['<string>'],
name: '<string>',
path: '<string>',
shared: true,
siteId: 123,
source: '<string>',
sourceUrl: '<string>',
tags: ['<string>'],
width: 123
},
name: '<string>',
redirectURL: '<string>',
targetBlank: true,
template: true,
textColor: '<string>',
textContent: '<string>',
width: '<string>',
widthImageDesktop: '<string>',
widthImageMobile: '<string>',
widthImageTablet: '<string>',
withOverlay: true
},
stickyBlock: {
backgroundColor: '<string>',
customPositionAxisX: '<string>',
customPositionAxisY: '<string>',
fontSize: '<string>',
height: '<string>',
heightImageDesktop: '<string>',
heightImageMobile: '<string>',
heightImageTablet: '<string>',
htmlContent: '<string>',
idTarget2Sell: '<string>',
image: {
altText: '<string>',
baseColor: 123,
colorDepth: 123,
date: '2023-11-07T05:31:56Z',
description: '<string>',
fileName: '<string>',
height: 123,
keywords: ['<string>'],
name: '<string>',
path: '<string>',
shared: true,
siteId: 123,
source: '<string>',
sourceUrl: '<string>',
tags: ['<string>'],
width: 123
},
imageDesktop: {
altText: '<string>',
baseColor: 123,
colorDepth: 123,
date: '2023-11-07T05:31:56Z',
description: '<string>',
fileName: '<string>',
height: 123,
keywords: ['<string>'],
name: '<string>',
path: '<string>',
shared: true,
siteId: 123,
source: '<string>',
sourceUrl: '<string>',
tags: ['<string>'],
width: 123
},
imageMobile: {
altText: '<string>',
baseColor: 123,
colorDepth: 123,
date: '2023-11-07T05:31:56Z',
description: '<string>',
fileName: '<string>',
height: 123,
keywords: ['<string>'],
name: '<string>',
path: '<string>',
shared: true,
siteId: 123,
source: '<string>',
sourceUrl: '<string>',
tags: ['<string>'],
width: 123
},
imageTablet: {
altText: '<string>',
baseColor: 123,
colorDepth: 123,
date: '2023-11-07T05:31:56Z',
description: '<string>',
fileName: '<string>',
height: 123,
keywords: ['<string>'],
name: '<string>',
path: '<string>',
shared: true,
siteId: 123,
source: '<string>',
sourceUrl: '<string>',
tags: ['<string>'],
width: 123
},
name: '<string>',
redirectURL: '<string>',
shiftContent: true,
shouldScrollTo: true,
targetBlank: true,
template: true,
textColor: '<string>',
textContent: '<string>',
width: '<string>',
widthImageDesktop: '<string>',
widthImageMobile: '<string>',
widthImageTablet: '<string>'
},
tags: ['<string>'],
targetingSegmentId: 123,
trackingTools: [
{
adobeOmnitureObject: '<string>',
comScoreCustomerId: '<string>',
comScoreDomain: '<string>',
contentSquareUrl: '<string>',
customIntegrations: ['<string>'],
customVariable: 123,
eulerianUserCentricParameter: '<string>',
reportingScript: '<string>',
universalAnalyticsDimension: 123
}
],
variationId: 123,
variationIds: [123],
visitExpositionFrequency: 123,
visitorExpositionFrequency: 123,
visitorExpositionFrequencyMax: 123
})
};
fetch('https://api.kameleoon.com/personalizations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kameleoon.com/personalizations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'baseURL' => '<string>',
'name' => '<string>',
'siteId' => 123,
'attributionWindow' => 123,
'cappingPerVisitorConvertGoal' => true,
'cappingPerVisitorExposedVisits' => true,
'cappingPerVisitorExpositions' => true,
'cappingPerVisitorGoalId' => 123,
'category' => '<string>',
'collectingDataEnabled' => true,
'cssCode' => '<string>',
'customExpositionRate' => 123,
'description' => '<string>',
'exposedVisitsSameVisitorMax' => 123,
'expositionFrequencyDelay' => 123,
'format' => '<string>',
'globalCappingGoalId' => 123,
'globalCappingNumberVisitors' => true,
'globalScript' => '<string>',
'goals' => [
123
],
'imageInPage' => [
'domElementSelector' => '<string>',
'height' => '<string>',
'htmlContent' => '<string>',
'image' => [
'altText' => '<string>',
'baseColor' => 123,
'colorDepth' => 123,
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'fileName' => '<string>',
'height' => 123,
'keywords' => [
'<string>'
],
'name' => '<string>',
'path' => '<string>',
'shared' => true,
'siteId' => 123,
'source' => '<string>',
'sourceUrl' => '<string>',
'tags' => [
'<string>'
],
'width' => 123
],
'mainPageUrl' => '<string>',
'redirectURL' => '<string>',
'width' => '<string>'
],
'isArchived' => true,
'javaScriptCode' => '<string>',
'location' => '<string>',
'mainGoalId' => 123,
'market' => '<string>',
'maxNumberVisitorsExposed' => 123,
'metaReadOnly' => '<string>',
'multiExpositionFrequencyDelay' => 123,
'popIn' => [
'backgroundColor' => '<string>',
'closeWithClickOnOverlay' => true,
'customPositionAxisX' => '<string>',
'customPositionAxisY' => '<string>',
'fontSize' => '<string>',
'height' => '<string>',
'heightImageDesktop' => '<string>',
'heightImageMobile' => '<string>',
'heightImageTablet' => '<string>',
'htmlContent' => '<string>',
'idTarget2Sell' => '<string>',
'image' => [
'altText' => '<string>',
'baseColor' => 123,
'colorDepth' => 123,
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'fileName' => '<string>',
'height' => 123,
'keywords' => [
'<string>'
],
'name' => '<string>',
'path' => '<string>',
'shared' => true,
'siteId' => 123,
'source' => '<string>',
'sourceUrl' => '<string>',
'tags' => [
'<string>'
],
'width' => 123
],
'imageDesktop' => [
'altText' => '<string>',
'baseColor' => 123,
'colorDepth' => 123,
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'fileName' => '<string>',
'height' => 123,
'keywords' => [
'<string>'
],
'name' => '<string>',
'path' => '<string>',
'shared' => true,
'siteId' => 123,
'source' => '<string>',
'sourceUrl' => '<string>',
'tags' => [
'<string>'
],
'width' => 123
],
'imageMobile' => [
'altText' => '<string>',
'baseColor' => 123,
'colorDepth' => 123,
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'fileName' => '<string>',
'height' => 123,
'keywords' => [
'<string>'
],
'name' => '<string>',
'path' => '<string>',
'shared' => true,
'siteId' => 123,
'source' => '<string>',
'sourceUrl' => '<string>',
'tags' => [
'<string>'
],
'width' => 123
],
'imageTablet' => [
'altText' => '<string>',
'baseColor' => 123,
'colorDepth' => 123,
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'fileName' => '<string>',
'height' => 123,
'keywords' => [
'<string>'
],
'name' => '<string>',
'path' => '<string>',
'shared' => true,
'siteId' => 123,
'source' => '<string>',
'sourceUrl' => '<string>',
'tags' => [
'<string>'
],
'width' => 123
],
'name' => '<string>',
'redirectURL' => '<string>',
'targetBlank' => true,
'template' => true,
'textColor' => '<string>',
'textContent' => '<string>',
'width' => '<string>',
'widthImageDesktop' => '<string>',
'widthImageMobile' => '<string>',
'widthImageTablet' => '<string>',
'withOverlay' => true
],
'stickyBlock' => [
'backgroundColor' => '<string>',
'customPositionAxisX' => '<string>',
'customPositionAxisY' => '<string>',
'fontSize' => '<string>',
'height' => '<string>',
'heightImageDesktop' => '<string>',
'heightImageMobile' => '<string>',
'heightImageTablet' => '<string>',
'htmlContent' => '<string>',
'idTarget2Sell' => '<string>',
'image' => [
'altText' => '<string>',
'baseColor' => 123,
'colorDepth' => 123,
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'fileName' => '<string>',
'height' => 123,
'keywords' => [
'<string>'
],
'name' => '<string>',
'path' => '<string>',
'shared' => true,
'siteId' => 123,
'source' => '<string>',
'sourceUrl' => '<string>',
'tags' => [
'<string>'
],
'width' => 123
],
'imageDesktop' => [
'altText' => '<string>',
'baseColor' => 123,
'colorDepth' => 123,
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'fileName' => '<string>',
'height' => 123,
'keywords' => [
'<string>'
],
'name' => '<string>',
'path' => '<string>',
'shared' => true,
'siteId' => 123,
'source' => '<string>',
'sourceUrl' => '<string>',
'tags' => [
'<string>'
],
'width' => 123
],
'imageMobile' => [
'altText' => '<string>',
'baseColor' => 123,
'colorDepth' => 123,
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'fileName' => '<string>',
'height' => 123,
'keywords' => [
'<string>'
],
'name' => '<string>',
'path' => '<string>',
'shared' => true,
'siteId' => 123,
'source' => '<string>',
'sourceUrl' => '<string>',
'tags' => [
'<string>'
],
'width' => 123
],
'imageTablet' => [
'altText' => '<string>',
'baseColor' => 123,
'colorDepth' => 123,
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'fileName' => '<string>',
'height' => 123,
'keywords' => [
'<string>'
],
'name' => '<string>',
'path' => '<string>',
'shared' => true,
'siteId' => 123,
'source' => '<string>',
'sourceUrl' => '<string>',
'tags' => [
'<string>'
],
'width' => 123
],
'name' => '<string>',
'redirectURL' => '<string>',
'shiftContent' => true,
'shouldScrollTo' => true,
'targetBlank' => true,
'template' => true,
'textColor' => '<string>',
'textContent' => '<string>',
'width' => '<string>',
'widthImageDesktop' => '<string>',
'widthImageMobile' => '<string>',
'widthImageTablet' => '<string>'
],
'tags' => [
'<string>'
],
'targetingSegmentId' => 123,
'trackingTools' => [
[
'adobeOmnitureObject' => '<string>',
'comScoreCustomerId' => '<string>',
'comScoreDomain' => '<string>',
'contentSquareUrl' => '<string>',
'customIntegrations' => [
'<string>'
],
'customVariable' => 123,
'eulerianUserCentricParameter' => '<string>',
'reportingScript' => '<string>',
'universalAnalyticsDimension' => 123
]
],
'variationId' => 123,
'variationIds' => [
123
],
'visitExpositionFrequency' => 123,
'visitorExpositionFrequency' => 123,
'visitorExpositionFrequencyMax' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kameleoon.com/personalizations"
payload := strings.NewReader("{\n \"baseURL\": \"<string>\",\n \"name\": \"<string>\",\n \"siteId\": 123,\n \"attributionWindow\": 123,\n \"cappingPerVisitorConvertGoal\": true,\n \"cappingPerVisitorExposedVisits\": true,\n \"cappingPerVisitorExpositions\": true,\n \"cappingPerVisitorGoalId\": 123,\n \"category\": \"<string>\",\n \"collectingDataEnabled\": true,\n \"cssCode\": \"<string>\",\n \"customExpositionRate\": 123,\n \"description\": \"<string>\",\n \"exposedVisitsSameVisitorMax\": 123,\n \"expositionFrequencyDelay\": 123,\n \"format\": \"<string>\",\n \"globalCappingGoalId\": 123,\n \"globalCappingNumberVisitors\": true,\n \"globalScript\": \"<string>\",\n \"goals\": [\n 123\n ],\n \"imageInPage\": {\n \"domElementSelector\": \"<string>\",\n \"height\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"image\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"mainPageUrl\": \"<string>\",\n \"redirectURL\": \"<string>\",\n \"width\": \"<string>\"\n },\n \"isArchived\": true,\n \"javaScriptCode\": \"<string>\",\n \"location\": \"<string>\",\n \"mainGoalId\": 123,\n \"market\": \"<string>\",\n \"maxNumberVisitorsExposed\": 123,\n \"metaReadOnly\": \"<string>\",\n \"multiExpositionFrequencyDelay\": 123,\n \"popIn\": {\n \"backgroundColor\": \"<string>\",\n \"closeWithClickOnOverlay\": true,\n \"customPositionAxisX\": \"<string>\",\n \"customPositionAxisY\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"height\": \"<string>\",\n \"heightImageDesktop\": \"<string>\",\n \"heightImageMobile\": \"<string>\",\n \"heightImageTablet\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"idTarget2Sell\": \"<string>\",\n \"image\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageDesktop\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageMobile\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageTablet\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"name\": \"<string>\",\n \"redirectURL\": \"<string>\",\n \"targetBlank\": true,\n \"template\": true,\n \"textColor\": \"<string>\",\n \"textContent\": \"<string>\",\n \"width\": \"<string>\",\n \"widthImageDesktop\": \"<string>\",\n \"widthImageMobile\": \"<string>\",\n \"widthImageTablet\": \"<string>\",\n \"withOverlay\": true\n },\n \"stickyBlock\": {\n \"backgroundColor\": \"<string>\",\n \"customPositionAxisX\": \"<string>\",\n \"customPositionAxisY\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"height\": \"<string>\",\n \"heightImageDesktop\": \"<string>\",\n \"heightImageMobile\": \"<string>\",\n \"heightImageTablet\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"idTarget2Sell\": \"<string>\",\n \"image\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageDesktop\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageMobile\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageTablet\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"name\": \"<string>\",\n \"redirectURL\": \"<string>\",\n \"shiftContent\": true,\n \"shouldScrollTo\": true,\n \"targetBlank\": true,\n \"template\": true,\n \"textColor\": \"<string>\",\n \"textContent\": \"<string>\",\n \"width\": \"<string>\",\n \"widthImageDesktop\": \"<string>\",\n \"widthImageMobile\": \"<string>\",\n \"widthImageTablet\": \"<string>\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"targetingSegmentId\": 123,\n \"trackingTools\": [\n {\n \"adobeOmnitureObject\": \"<string>\",\n \"comScoreCustomerId\": \"<string>\",\n \"comScoreDomain\": \"<string>\",\n \"contentSquareUrl\": \"<string>\",\n \"customIntegrations\": [\n \"<string>\"\n ],\n \"customVariable\": 123,\n \"eulerianUserCentricParameter\": \"<string>\",\n \"reportingScript\": \"<string>\",\n \"universalAnalyticsDimension\": 123\n }\n ],\n \"variationId\": 123,\n \"variationIds\": [\n 123\n ],\n \"visitExpositionFrequency\": 123,\n \"visitorExpositionFrequency\": 123,\n \"visitorExpositionFrequencyMax\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kameleoon.com/personalizations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"baseURL\": \"<string>\",\n \"name\": \"<string>\",\n \"siteId\": 123,\n \"attributionWindow\": 123,\n \"cappingPerVisitorConvertGoal\": true,\n \"cappingPerVisitorExposedVisits\": true,\n \"cappingPerVisitorExpositions\": true,\n \"cappingPerVisitorGoalId\": 123,\n \"category\": \"<string>\",\n \"collectingDataEnabled\": true,\n \"cssCode\": \"<string>\",\n \"customExpositionRate\": 123,\n \"description\": \"<string>\",\n \"exposedVisitsSameVisitorMax\": 123,\n \"expositionFrequencyDelay\": 123,\n \"format\": \"<string>\",\n \"globalCappingGoalId\": 123,\n \"globalCappingNumberVisitors\": true,\n \"globalScript\": \"<string>\",\n \"goals\": [\n 123\n ],\n \"imageInPage\": {\n \"domElementSelector\": \"<string>\",\n \"height\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"image\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"mainPageUrl\": \"<string>\",\n \"redirectURL\": \"<string>\",\n \"width\": \"<string>\"\n },\n \"isArchived\": true,\n \"javaScriptCode\": \"<string>\",\n \"location\": \"<string>\",\n \"mainGoalId\": 123,\n \"market\": \"<string>\",\n \"maxNumberVisitorsExposed\": 123,\n \"metaReadOnly\": \"<string>\",\n \"multiExpositionFrequencyDelay\": 123,\n \"popIn\": {\n \"backgroundColor\": \"<string>\",\n \"closeWithClickOnOverlay\": true,\n \"customPositionAxisX\": \"<string>\",\n \"customPositionAxisY\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"height\": \"<string>\",\n \"heightImageDesktop\": \"<string>\",\n \"heightImageMobile\": \"<string>\",\n \"heightImageTablet\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"idTarget2Sell\": \"<string>\",\n \"image\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageDesktop\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageMobile\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageTablet\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"name\": \"<string>\",\n \"redirectURL\": \"<string>\",\n \"targetBlank\": true,\n \"template\": true,\n \"textColor\": \"<string>\",\n \"textContent\": \"<string>\",\n \"width\": \"<string>\",\n \"widthImageDesktop\": \"<string>\",\n \"widthImageMobile\": \"<string>\",\n \"widthImageTablet\": \"<string>\",\n \"withOverlay\": true\n },\n \"stickyBlock\": {\n \"backgroundColor\": \"<string>\",\n \"customPositionAxisX\": \"<string>\",\n \"customPositionAxisY\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"height\": \"<string>\",\n \"heightImageDesktop\": \"<string>\",\n \"heightImageMobile\": \"<string>\",\n \"heightImageTablet\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"idTarget2Sell\": \"<string>\",\n \"image\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageDesktop\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageMobile\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageTablet\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"name\": \"<string>\",\n \"redirectURL\": \"<string>\",\n \"shiftContent\": true,\n \"shouldScrollTo\": true,\n \"targetBlank\": true,\n \"template\": true,\n \"textColor\": \"<string>\",\n \"textContent\": \"<string>\",\n \"width\": \"<string>\",\n \"widthImageDesktop\": \"<string>\",\n \"widthImageMobile\": \"<string>\",\n \"widthImageTablet\": \"<string>\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"targetingSegmentId\": 123,\n \"trackingTools\": [\n {\n \"adobeOmnitureObject\": \"<string>\",\n \"comScoreCustomerId\": \"<string>\",\n \"comScoreDomain\": \"<string>\",\n \"contentSquareUrl\": \"<string>\",\n \"customIntegrations\": [\n \"<string>\"\n ],\n \"customVariable\": 123,\n \"eulerianUserCentricParameter\": \"<string>\",\n \"reportingScript\": \"<string>\",\n \"universalAnalyticsDimension\": 123\n }\n ],\n \"variationId\": 123,\n \"variationIds\": [\n 123\n ],\n \"visitExpositionFrequency\": 123,\n \"visitorExpositionFrequency\": 123,\n \"visitorExpositionFrequencyMax\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kameleoon.com/personalizations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"baseURL\": \"<string>\",\n \"name\": \"<string>\",\n \"siteId\": 123,\n \"attributionWindow\": 123,\n \"cappingPerVisitorConvertGoal\": true,\n \"cappingPerVisitorExposedVisits\": true,\n \"cappingPerVisitorExpositions\": true,\n \"cappingPerVisitorGoalId\": 123,\n \"category\": \"<string>\",\n \"collectingDataEnabled\": true,\n \"cssCode\": \"<string>\",\n \"customExpositionRate\": 123,\n \"description\": \"<string>\",\n \"exposedVisitsSameVisitorMax\": 123,\n \"expositionFrequencyDelay\": 123,\n \"format\": \"<string>\",\n \"globalCappingGoalId\": 123,\n \"globalCappingNumberVisitors\": true,\n \"globalScript\": \"<string>\",\n \"goals\": [\n 123\n ],\n \"imageInPage\": {\n \"domElementSelector\": \"<string>\",\n \"height\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"image\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"mainPageUrl\": \"<string>\",\n \"redirectURL\": \"<string>\",\n \"width\": \"<string>\"\n },\n \"isArchived\": true,\n \"javaScriptCode\": \"<string>\",\n \"location\": \"<string>\",\n \"mainGoalId\": 123,\n \"market\": \"<string>\",\n \"maxNumberVisitorsExposed\": 123,\n \"metaReadOnly\": \"<string>\",\n \"multiExpositionFrequencyDelay\": 123,\n \"popIn\": {\n \"backgroundColor\": \"<string>\",\n \"closeWithClickOnOverlay\": true,\n \"customPositionAxisX\": \"<string>\",\n \"customPositionAxisY\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"height\": \"<string>\",\n \"heightImageDesktop\": \"<string>\",\n \"heightImageMobile\": \"<string>\",\n \"heightImageTablet\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"idTarget2Sell\": \"<string>\",\n \"image\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageDesktop\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageMobile\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageTablet\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"name\": \"<string>\",\n \"redirectURL\": \"<string>\",\n \"targetBlank\": true,\n \"template\": true,\n \"textColor\": \"<string>\",\n \"textContent\": \"<string>\",\n \"width\": \"<string>\",\n \"widthImageDesktop\": \"<string>\",\n \"widthImageMobile\": \"<string>\",\n \"widthImageTablet\": \"<string>\",\n \"withOverlay\": true\n },\n \"stickyBlock\": {\n \"backgroundColor\": \"<string>\",\n \"customPositionAxisX\": \"<string>\",\n \"customPositionAxisY\": \"<string>\",\n \"fontSize\": \"<string>\",\n \"height\": \"<string>\",\n \"heightImageDesktop\": \"<string>\",\n \"heightImageMobile\": \"<string>\",\n \"heightImageTablet\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"idTarget2Sell\": \"<string>\",\n \"image\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageDesktop\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageMobile\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"imageTablet\": {\n \"altText\": \"<string>\",\n \"baseColor\": 123,\n \"colorDepth\": 123,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"fileName\": \"<string>\",\n \"height\": 123,\n \"keywords\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"path\": \"<string>\",\n \"shared\": true,\n \"siteId\": 123,\n \"source\": \"<string>\",\n \"sourceUrl\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"width\": 123\n },\n \"name\": \"<string>\",\n \"redirectURL\": \"<string>\",\n \"shiftContent\": true,\n \"shouldScrollTo\": true,\n \"targetBlank\": true,\n \"template\": true,\n \"textColor\": \"<string>\",\n \"textContent\": \"<string>\",\n \"width\": \"<string>\",\n \"widthImageDesktop\": \"<string>\",\n \"widthImageMobile\": \"<string>\",\n \"widthImageTablet\": \"<string>\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"targetingSegmentId\": 123,\n \"trackingTools\": [\n {\n \"adobeOmnitureObject\": \"<string>\",\n \"comScoreCustomerId\": \"<string>\",\n \"comScoreDomain\": \"<string>\",\n \"contentSquareUrl\": \"<string>\",\n \"customIntegrations\": [\n \"<string>\"\n ],\n \"customVariable\": 123,\n \"eulerianUserCentricParameter\": \"<string>\",\n \"reportingScript\": \"<string>\",\n \"universalAnalyticsDimension\": 123\n }\n ],\n \"variationId\": 123,\n \"variationIds\": [\n 123\n ],\n \"visitExpositionFrequency\": 123,\n \"visitorExpositionFrequency\": 123,\n \"visitorExpositionFrequencyMax\": 123\n}"
response = http.request(request)
puts response.read_body{
"baseURL": "<string>",
"name": "<string>",
"siteId": 123,
"attributionWindow": 123,
"cappingPerVisitorConvertGoal": true,
"cappingPerVisitorExposedVisits": true,
"cappingPerVisitorExpositions": true,
"cappingPerVisitorGoalId": 123,
"category": "<string>",
"collectingDataEnabled": true,
"createdBy": 123,
"cssCode": "<string>",
"customExpositionRate": 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>",
"exposedVisitsSameVisitorMax": 123,
"expositionFrequencyDelay": 123,
"format": "<string>",
"globalCappingGoalId": 123,
"globalCappingNumberVisitors": true,
"globalScript": "<string>",
"goals": [
123
],
"id": 123,
"imageInPage": {
"domElementSelector": "<string>",
"height": "<string>",
"htmlContent": "<string>",
"image": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"mainPageUrl": "<string>",
"redirectURL": "<string>",
"width": "<string>"
},
"isArchived": true,
"javaScriptCode": "<string>",
"location": "<string>",
"mainGoalId": 123,
"market": "<string>",
"maxNumberVisitorsExposed": 123,
"metaReadOnly": "<string>",
"multiExpositionFrequencyDelay": 123,
"popIn": {
"backgroundColor": "<string>",
"closeWithClickOnOverlay": true,
"customPositionAxisX": "<string>",
"customPositionAxisY": "<string>",
"fontSize": "<string>",
"height": "<string>",
"heightImageDesktop": "<string>",
"heightImageMobile": "<string>",
"heightImageTablet": "<string>",
"htmlContent": "<string>",
"idTarget2Sell": "<string>",
"image": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageDesktop": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageMobile": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageTablet": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"name": "<string>",
"redirectURL": "<string>",
"targetBlank": true,
"template": true,
"textColor": "<string>",
"textContent": "<string>",
"width": "<string>",
"widthImageDesktop": "<string>",
"widthImageMobile": "<string>",
"widthImageTablet": "<string>",
"withOverlay": true
},
"priority": 123,
"status": "<string>",
"stickyBlock": {
"backgroundColor": "<string>",
"customPositionAxisX": "<string>",
"customPositionAxisY": "<string>",
"fontSize": "<string>",
"height": "<string>",
"heightImageDesktop": "<string>",
"heightImageMobile": "<string>",
"heightImageTablet": "<string>",
"htmlContent": "<string>",
"idTarget2Sell": "<string>",
"image": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageDesktop": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageMobile": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"imageTablet": {
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
},
"name": "<string>",
"redirectURL": "<string>",
"shiftContent": true,
"shouldScrollTo": true,
"targetBlank": true,
"template": true,
"textColor": "<string>",
"textContent": "<string>",
"width": "<string>",
"widthImageDesktop": "<string>",
"widthImageMobile": "<string>",
"widthImageTablet": "<string>"
},
"tags": [
"<string>"
],
"targetingRule": {
"siteId": 123,
"id": 123,
"segmentId": 123,
"targetingConfigurationParam": "<string>",
"triggerId": 123
},
"targetingRuleId": 123,
"targetingSegmentId": 123,
"trackingTools": [
{
"adobeOmnitureObject": "<string>",
"comScoreCustomerId": "<string>",
"comScoreDomain": "<string>",
"contentSquareUrl": "<string>",
"customIntegrations": [
"<string>"
],
"customVariable": 123,
"eulerianUserCentricParameter": "<string>",
"reportingScript": "<string>",
"universalAnalyticsDimension": 123
}
],
"variationId": 123,
"variationIds": [
123
],
"visitExpositionFrequency": 123,
"visitorExpositionFrequency": 123,
"visitorExpositionFrequencyMax": 123,
"widget": {
"siteId": 123,
"config": "<string>",
"cssCode": "<string>",
"dateActivated": "2023-11-07T05:31:56Z",
"dateCreated": "2023-11-07T05:31:56Z",
"dateModified": "2023-11-07T05:31:56Z",
"description": "<string>",
"htmlCode": "<string>",
"id": 123,
"isCustomTemplate": true,
"name": "<string>",
"tags": [
"<string>"
],
"templateCssCode": "<string>",
"templateHtmlCode": "<string>",
"templateJavaScriptCode": "<string>",
"themeId": 123,
"url": "<string>",
"useCustomData": true,
"widgetEditorTemplate": "<string>"
}
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
URL of the website to load in editor and preview mode
Name of the personalization
Site Id of the project the personalization belongs to
If true, cease exposing the same visitor when the goal is reached
If true, cease exposing the same visitor when the number of visits exceeds this limit
If true, cease exposing the same visitor when total exposures exceed this limit.
Cease exposing the same visitor when the goal with this Id is reached
CSS code to be integrated into the source code of the page
Percentage of the segment exposed to a personalization
Description of the personalization
Cease exposing the same visitor when the number of visits exceed this limit
Frequency of exposure for different visitors
Threshold goal for the total number of exposed visitors
Option to allow capping visitors for a configuration
Visitors configuration for the capped number of exposed visitors
NUMBER_VISITORS, NUMBER_VISITORS_CONVERT_GOAL, NUMBER_VISITORS_NOT_CONVERT_GOAL JavaScript code that will be applied only to the selected personalization and executed in the end of the Global custom script
Selected goals
Settings of an image in page
Show child attributes
Show child attributes
Indicates if the personalization is archived
JavaScript code to add in the page
Id of the main goal
Limit of the total number of exposed visitors
Personalization in READ_ONLY mode for sub-personalization
Minimum delay between each exposure
Personalization configuration
CUSTOM, HTML_IN_PAGE, IMAGE_IN_PAGE, INFOBULLE_ABOVE, NEWS_LETTER, NONE, POPIN, STICKY_BLOCK, TEMPLATE, VARIATION Pop-In settings
Show child attributes
Show child attributes
Sticky block settings
Show child attributes
Show child attributes
List of tags
Targeting Rule defines the conditions for displaying content to specific user groups based on segments and triggers
Show child attributes
Show child attributes
Selected targeting segment
List of tracking tools
Show child attributes
Show child attributes
Type of personalization
AUTOPROMO, BUILDER, CLASSIC, IA, PERSO_RULE Variation Id of the personalization
List of variation ids for this personalization. Includes variations from other personalizations (variation.personalizationId != this ID). Variations with personalizationId can only be deleted via 'Delete variation' operation.
Frequency of exposure during a unique visit
Frequency of exposure for a unique visitor
Cease exposing to this visitor once their exposure exceeds this limit.
Show child attributes
Show child attributes
Response
Created
URL of the website to load in editor and preview mode
Name of the personalization
Site Id of the project the personalization belongs to
If true, cease exposing the same visitor when the goal is reached
If true, cease exposing the same visitor when the number of visits exceeds this limit
If true, cease exposing the same visitor when total exposures exceed this limit.
Cease exposing the same visitor when the goal with this Id is reached
Kameleoon’s behavior in determining whether a visitor is targeted or not.
ALL_CONDITIONS, CUMULATIVE_WEIGHT Account Id of the creator of this personalization
CSS code to be integrated into the source code of the page
Percentage of the segment exposed to a personalization
Date of the latest data collection
Date when personalization was created
Date when personalization was ceased
Date and time when the personalization was last modified
Date when personalization was started
Timestamp of the last update
Description of the personalization
Cease exposing the same visitor when the number of visits exceed this limit
Frequency of exposure for different visitors
Threshold goal for the total number of exposed visitors
Option to allow capping visitors for a configuration
Visitors configuration for the capped number of exposed visitors
NUMBER_VISITORS, NUMBER_VISITORS_CONVERT_GOAL, NUMBER_VISITORS_NOT_CONVERT_GOAL JavaScript code that will be applied only to the selected personalization and executed in the end of the Global custom script
Selected goals
Unique Id of the personalization
Settings of an image in page
Show child attributes
Show child attributes
Indicates if the personalization is archived
JavaScript code to add in the page
Id of the main goal
Limit of the total number of exposed visitors
Personalization in READ_ONLY mode for sub-personalization
Minimum delay between each exposure
Personalization configuration
CUSTOM, HTML_IN_PAGE, IMAGE_IN_PAGE, INFOBULLE_ABOVE, NEWS_LETTER, NONE, POPIN, STICKY_BLOCK, TEMPLATE, VARIATION Pop-In settings
Show child attributes
Show child attributes
Priority of the personalization
Status of the personalization
Sticky block settings
Show child attributes
Show child attributes
List of tags
Targeting Rule defines the conditions for displaying content to specific user groups based on segments and triggers
Show child attributes
Show child attributes
Deprecated. Use TargetingRule instead.
Selected targeting segment
List of tracking tools
Show child attributes
Show child attributes
Type of personalization
AUTOPROMO, BUILDER, CLASSIC, IA, PERSO_RULE Variation Id of the personalization
List of variation ids for this personalization. Includes variations from other personalizations (variation.personalizationId != this ID). Variations with personalizationId can only be deleted via 'Delete variation' operation.
Frequency of exposure during a unique visit
Frequency of exposure for a unique visitor
Cease exposing to this visitor once their exposure exceeds this limit.
Show child attributes
Show child attributes
Was this page helpful?