curl --request POST \
--url https://api.usertour.io/v2/projects/{projectId}/themes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"isDefault": true,
"settings": {
"announcement": {
"bubbleWidth": 550,
"modalWidth": 550
},
"avatar": {
"size": 105,
"url": "<string>",
"name": "<string>"
},
"backdrop": {
"color": "<string>",
"highlight": {
"color": "<string>",
"opacity": 50,
"radius": 50,
"spread": 50
},
"opacity": 50
},
"banner": {
"animationDuration": 5000,
"backgroundColor": {
"background": "<string>"
},
"padding": 50,
"textColor": {
"color": "<string>"
}
},
"border": {
"borderColor": "<string>",
"borderRadius": 1,
"borderWidth": 25,
"borderWidthEnabled": true
},
"brandColor": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"bubble": {
"placement": {
"positionOffsetX": 0,
"positionOffsetY": 0
},
"width": 550
},
"buttons": {
"borderRadius": 50,
"height": 50.5,
"minWidth": 250,
"primary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 10,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": true
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
},
"px": 50,
"secondary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 10,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": true
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
}
},
"checklist": {
"checkmarkColor": "<string>",
"placement": {
"positionOffsetX": 500,
"positionOffsetY": 500
},
"width": 550,
"zIndex": 123
},
"checklistLauncher": {
"borderRadius": 50,
"color": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"counter": {
"background": "<string>",
"color": "<string>"
},
"fontWeight": 100,
"height": 105,
"placement": {
"positionOffsetX": 500,
"positionOffsetY": 500
}
},
"customCss": "<string>",
"focusHighlight": {
"color": "<string>",
"opacity": 50
},
"font": {
"customFontFamily": "<string>",
"fontFamily": "<string>",
"fontSize": 30,
"fontWeightBold": 100,
"fontWeightNormal": 100,
"h1FontSize": 55,
"h2FontSize": 55,
"lineHeight": 30,
"linkColor": "<string>"
},
"launcherBeacon": {
"color": "<string>",
"size": 50.5
},
"launcherButtons": {
"borderRadius": 50,
"height": 100.5,
"primary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 50,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": true
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
},
"px": 50,
"width": 100.5
},
"launcherIcon": {
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"opacity": 50,
"size": 100.5
},
"mainColor": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"modal": {
"padding": 50,
"width": 550
},
"progress": {
"chainRoundedHeight": 5.5,
"chainSquaredHeight": 5.5,
"color": "<string>",
"dotsHeight": 5.5,
"enabled": true,
"height": 5,
"narrowHeight": 5.5,
"numberedHeight": 50.5
},
"resourceCenter": {
"headerBackground": {
"color": "<string>",
"gradientFrom": "<string>",
"gradientTo": "<string>",
"imageUrl": "<string>"
},
"largeWidth": 1050,
"maxHeight": 1050,
"normalWidth": 550,
"offsetX": 500,
"offsetY": 500,
"transitionDuration": 5000,
"zIndex": 123,
"dividerLines": true,
"logoUrl": "<string>"
},
"resourceCenterLauncherButton": {
"borderRadius": 50,
"color": {
"active": "<string>",
"background": "<string>",
"foreground": "<string>",
"hover": "<string>"
},
"height": 105,
"imageHeight": 105,
"iconUrl": "<string>"
},
"resourceCenterUnreadBadge": {
"backgroundColor": "<string>",
"textColor": "<string>"
},
"survey": {
"color": "<string>"
},
"tooltip": {
"missingTargetTolerance": 5,
"notchSize": 52.5,
"width": 550
},
"xbutton": {
"color": "<string>"
}
},
"variations": [
{
"name": "<string>",
"conditions": [
{
"type": "group",
"conditions": "<array>"
}
],
"id": "<string>",
"settings": {
"announcement": {
"bubbleWidth": 550,
"modalWidth": 550
},
"avatar": {
"size": 105,
"url": "<string>",
"name": "<string>"
},
"backdrop": {
"color": "<string>",
"highlight": {
"color": "<string>",
"opacity": 50,
"radius": 50,
"spread": 50
},
"opacity": 50
},
"banner": {
"animationDuration": 5000,
"backgroundColor": {
"background": "<string>"
},
"padding": 50,
"textColor": {
"color": "<string>"
}
},
"border": {
"borderColor": "<string>",
"borderRadius": 1,
"borderWidth": 25,
"borderWidthEnabled": true
},
"brandColor": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"bubble": {
"placement": {
"positionOffsetX": 0,
"positionOffsetY": 0
},
"width": 550
},
"buttons": {
"borderRadius": 50,
"height": 50.5,
"minWidth": 250,
"primary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 10,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": true
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
},
"px": 50,
"secondary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 10,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": true
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
}
},
"checklist": {
"checkmarkColor": "<string>",
"placement": {
"positionOffsetX": 500,
"positionOffsetY": 500
},
"width": 550,
"zIndex": 123
},
"checklistLauncher": {
"borderRadius": 50,
"color": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"counter": {
"background": "<string>",
"color": "<string>"
},
"fontWeight": 100,
"height": 105,
"placement": {
"positionOffsetX": 500,
"positionOffsetY": 500
}
},
"customCss": "<string>",
"focusHighlight": {
"color": "<string>",
"opacity": 50
},
"font": {
"customFontFamily": "<string>",
"fontFamily": "<string>",
"fontSize": 30,
"fontWeightBold": 100,
"fontWeightNormal": 100,
"h1FontSize": 55,
"h2FontSize": 55,
"lineHeight": 30,
"linkColor": "<string>"
},
"launcherBeacon": {
"color": "<string>",
"size": 50.5
},
"launcherButtons": {
"borderRadius": 50,
"height": 100.5,
"primary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 50,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": true
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
},
"px": 50,
"width": 100.5
},
"launcherIcon": {
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"opacity": 50,
"size": 100.5
},
"mainColor": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"modal": {
"padding": 50,
"width": 550
},
"progress": {
"chainRoundedHeight": 5.5,
"chainSquaredHeight": 5.5,
"color": "<string>",
"dotsHeight": 5.5,
"enabled": true,
"height": 5,
"narrowHeight": 5.5,
"numberedHeight": 50.5
},
"resourceCenter": {
"headerBackground": {
"color": "<string>",
"gradientFrom": "<string>",
"gradientTo": "<string>",
"imageUrl": "<string>"
},
"largeWidth": 1050,
"maxHeight": 1050,
"normalWidth": 550,
"offsetX": 500,
"offsetY": 500,
"transitionDuration": 5000,
"zIndex": 123,
"dividerLines": true,
"logoUrl": "<string>"
},
"resourceCenterLauncherButton": {
"borderRadius": 50,
"color": {
"active": "<string>",
"background": "<string>",
"foreground": "<string>",
"hover": "<string>"
},
"height": 105,
"imageHeight": 105,
"iconUrl": "<string>"
},
"resourceCenterUnreadBadge": {
"backgroundColor": "<string>",
"textColor": "<string>"
},
"survey": {
"color": "<string>"
},
"tooltip": {
"missingTargetTolerance": 5,
"notchSize": 52.5,
"width": 550
},
"xbutton": {
"color": "<string>"
}
}
}
]
}
'import requests
url = "https://api.usertour.io/v2/projects/{projectId}/themes"
payload = {
"name": "<string>",
"isDefault": True,
"settings": {
"announcement": {
"bubbleWidth": 550,
"modalWidth": 550
},
"avatar": {
"size": 105,
"url": "<string>",
"name": "<string>"
},
"backdrop": {
"color": "<string>",
"highlight": {
"color": "<string>",
"opacity": 50,
"radius": 50,
"spread": 50
},
"opacity": 50
},
"banner": {
"animationDuration": 5000,
"backgroundColor": { "background": "<string>" },
"padding": 50,
"textColor": { "color": "<string>" }
},
"border": {
"borderColor": "<string>",
"borderRadius": 1,
"borderWidth": 25,
"borderWidthEnabled": True
},
"brandColor": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"bubble": {
"placement": {
"positionOffsetX": 0,
"positionOffsetY": 0
},
"width": 550
},
"buttons": {
"borderRadius": 50,
"height": 50.5,
"minWidth": 250,
"primary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 10,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": True
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
},
"px": 50,
"secondary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 10,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": True
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
}
},
"checklist": {
"checkmarkColor": "<string>",
"placement": {
"positionOffsetX": 500,
"positionOffsetY": 500
},
"width": 550,
"zIndex": 123
},
"checklistLauncher": {
"borderRadius": 50,
"color": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"counter": {
"background": "<string>",
"color": "<string>"
},
"fontWeight": 100,
"height": 105,
"placement": {
"positionOffsetX": 500,
"positionOffsetY": 500
}
},
"customCss": "<string>",
"focusHighlight": {
"color": "<string>",
"opacity": 50
},
"font": {
"customFontFamily": "<string>",
"fontFamily": "<string>",
"fontSize": 30,
"fontWeightBold": 100,
"fontWeightNormal": 100,
"h1FontSize": 55,
"h2FontSize": 55,
"lineHeight": 30,
"linkColor": "<string>"
},
"launcherBeacon": {
"color": "<string>",
"size": 50.5
},
"launcherButtons": {
"borderRadius": 50,
"height": 100.5,
"primary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 50,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": True
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
},
"px": 50,
"width": 100.5
},
"launcherIcon": {
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"opacity": 50,
"size": 100.5
},
"mainColor": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"modal": {
"padding": 50,
"width": 550
},
"progress": {
"chainRoundedHeight": 5.5,
"chainSquaredHeight": 5.5,
"color": "<string>",
"dotsHeight": 5.5,
"enabled": True,
"height": 5,
"narrowHeight": 5.5,
"numberedHeight": 50.5
},
"resourceCenter": {
"headerBackground": {
"color": "<string>",
"gradientFrom": "<string>",
"gradientTo": "<string>",
"imageUrl": "<string>"
},
"largeWidth": 1050,
"maxHeight": 1050,
"normalWidth": 550,
"offsetX": 500,
"offsetY": 500,
"transitionDuration": 5000,
"zIndex": 123,
"dividerLines": True,
"logoUrl": "<string>"
},
"resourceCenterLauncherButton": {
"borderRadius": 50,
"color": {
"active": "<string>",
"background": "<string>",
"foreground": "<string>",
"hover": "<string>"
},
"height": 105,
"imageHeight": 105,
"iconUrl": "<string>"
},
"resourceCenterUnreadBadge": {
"backgroundColor": "<string>",
"textColor": "<string>"
},
"survey": { "color": "<string>" },
"tooltip": {
"missingTargetTolerance": 5,
"notchSize": 52.5,
"width": 550
},
"xbutton": { "color": "<string>" }
},
"variations": [
{
"name": "<string>",
"conditions": [
{
"type": "group",
"conditions": "<array>"
}
],
"id": "<string>",
"settings": {
"announcement": {
"bubbleWidth": 550,
"modalWidth": 550
},
"avatar": {
"size": 105,
"url": "<string>",
"name": "<string>"
},
"backdrop": {
"color": "<string>",
"highlight": {
"color": "<string>",
"opacity": 50,
"radius": 50,
"spread": 50
},
"opacity": 50
},
"banner": {
"animationDuration": 5000,
"backgroundColor": { "background": "<string>" },
"padding": 50,
"textColor": { "color": "<string>" }
},
"border": {
"borderColor": "<string>",
"borderRadius": 1,
"borderWidth": 25,
"borderWidthEnabled": True
},
"brandColor": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"bubble": {
"placement": {
"positionOffsetX": 0,
"positionOffsetY": 0
},
"width": 550
},
"buttons": {
"borderRadius": 50,
"height": 50.5,
"minWidth": 250,
"primary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 10,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": True
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
},
"px": 50,
"secondary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 10,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": True
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
}
},
"checklist": {
"checkmarkColor": "<string>",
"placement": {
"positionOffsetX": 500,
"positionOffsetY": 500
},
"width": 550,
"zIndex": 123
},
"checklistLauncher": {
"borderRadius": 50,
"color": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"counter": {
"background": "<string>",
"color": "<string>"
},
"fontWeight": 100,
"height": 105,
"placement": {
"positionOffsetX": 500,
"positionOffsetY": 500
}
},
"customCss": "<string>",
"focusHighlight": {
"color": "<string>",
"opacity": 50
},
"font": {
"customFontFamily": "<string>",
"fontFamily": "<string>",
"fontSize": 30,
"fontWeightBold": 100,
"fontWeightNormal": 100,
"h1FontSize": 55,
"h2FontSize": 55,
"lineHeight": 30,
"linkColor": "<string>"
},
"launcherBeacon": {
"color": "<string>",
"size": 50.5
},
"launcherButtons": {
"borderRadius": 50,
"height": 100.5,
"primary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 50,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": True
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
},
"px": 50,
"width": 100.5
},
"launcherIcon": {
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"opacity": 50,
"size": 100.5
},
"mainColor": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"modal": {
"padding": 50,
"width": 550
},
"progress": {
"chainRoundedHeight": 5.5,
"chainSquaredHeight": 5.5,
"color": "<string>",
"dotsHeight": 5.5,
"enabled": True,
"height": 5,
"narrowHeight": 5.5,
"numberedHeight": 50.5
},
"resourceCenter": {
"headerBackground": {
"color": "<string>",
"gradientFrom": "<string>",
"gradientTo": "<string>",
"imageUrl": "<string>"
},
"largeWidth": 1050,
"maxHeight": 1050,
"normalWidth": 550,
"offsetX": 500,
"offsetY": 500,
"transitionDuration": 5000,
"zIndex": 123,
"dividerLines": True,
"logoUrl": "<string>"
},
"resourceCenterLauncherButton": {
"borderRadius": 50,
"color": {
"active": "<string>",
"background": "<string>",
"foreground": "<string>",
"hover": "<string>"
},
"height": 105,
"imageHeight": 105,
"iconUrl": "<string>"
},
"resourceCenterUnreadBadge": {
"backgroundColor": "<string>",
"textColor": "<string>"
},
"survey": { "color": "<string>" },
"tooltip": {
"missingTargetTolerance": 5,
"notchSize": 52.5,
"width": 550
},
"xbutton": { "color": "<string>" }
}
}
]
}
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({
name: '<string>',
isDefault: true,
settings: {
announcement: {bubbleWidth: 550, modalWidth: 550},
avatar: {size: 105, url: '<string>', name: '<string>'},
backdrop: {
color: '<string>',
highlight: {color: '<string>', opacity: 50, radius: 50, spread: 50},
opacity: 50
},
banner: {
animationDuration: 5000,
backgroundColor: {background: '<string>'},
padding: 50,
textColor: {color: '<string>'}
},
border: {
borderColor: '<string>',
borderRadius: 1,
borderWidth: 25,
borderWidthEnabled: true
},
brandColor: {
active: '<string>',
background: '<string>',
color: '<string>',
hover: '<string>'
},
bubble: {placement: {positionOffsetX: 0, positionOffsetY: 0}, width: 550},
buttons: {
borderRadius: 50,
height: 50.5,
minWidth: 250,
primary: {
backgroundColor: {active: '<string>', background: '<string>', hover: '<string>'},
border: {
borderWidth: 10,
color: {active: '<string>', color: '<string>', hover: '<string>'},
enabled: true
},
fontWeight: 100,
textColor: {active: '<string>', color: '<string>', hover: '<string>'}
},
px: 50,
secondary: {
backgroundColor: {active: '<string>', background: '<string>', hover: '<string>'},
border: {
borderWidth: 10,
color: {active: '<string>', color: '<string>', hover: '<string>'},
enabled: true
},
fontWeight: 100,
textColor: {active: '<string>', color: '<string>', hover: '<string>'}
}
},
checklist: {
checkmarkColor: '<string>',
placement: {positionOffsetX: 500, positionOffsetY: 500},
width: 550,
zIndex: 123
},
checklistLauncher: {
borderRadius: 50,
color: {
active: '<string>',
background: '<string>',
color: '<string>',
hover: '<string>'
},
counter: {background: '<string>', color: '<string>'},
fontWeight: 100,
height: 105,
placement: {positionOffsetX: 500, positionOffsetY: 500}
},
customCss: '<string>',
focusHighlight: {color: '<string>', opacity: 50},
font: {
customFontFamily: '<string>',
fontFamily: '<string>',
fontSize: 30,
fontWeightBold: 100,
fontWeightNormal: 100,
h1FontSize: 55,
h2FontSize: 55,
lineHeight: 30,
linkColor: '<string>'
},
launcherBeacon: {color: '<string>', size: 50.5},
launcherButtons: {
borderRadius: 50,
height: 100.5,
primary: {
backgroundColor: {active: '<string>', background: '<string>', hover: '<string>'},
border: {
borderWidth: 50,
color: {active: '<string>', color: '<string>', hover: '<string>'},
enabled: true
},
fontWeight: 100,
textColor: {active: '<string>', color: '<string>', hover: '<string>'}
},
px: 50,
width: 100.5
},
launcherIcon: {
color: {active: '<string>', color: '<string>', hover: '<string>'},
opacity: 50,
size: 100.5
},
mainColor: {
active: '<string>',
background: '<string>',
color: '<string>',
hover: '<string>'
},
modal: {padding: 50, width: 550},
progress: {
chainRoundedHeight: 5.5,
chainSquaredHeight: 5.5,
color: '<string>',
dotsHeight: 5.5,
enabled: true,
height: 5,
narrowHeight: 5.5,
numberedHeight: 50.5
},
resourceCenter: {
headerBackground: {
color: '<string>',
gradientFrom: '<string>',
gradientTo: '<string>',
imageUrl: '<string>'
},
largeWidth: 1050,
maxHeight: 1050,
normalWidth: 550,
offsetX: 500,
offsetY: 500,
transitionDuration: 5000,
zIndex: 123,
dividerLines: true,
logoUrl: '<string>'
},
resourceCenterLauncherButton: {
borderRadius: 50,
color: {
active: '<string>',
background: '<string>',
foreground: '<string>',
hover: '<string>'
},
height: 105,
imageHeight: 105,
iconUrl: '<string>'
},
resourceCenterUnreadBadge: {backgroundColor: '<string>', textColor: '<string>'},
survey: {color: '<string>'},
tooltip: {missingTargetTolerance: 5, notchSize: 52.5, width: 550},
xbutton: {color: '<string>'}
},
variations: [
{
name: '<string>',
conditions: [{type: 'group', conditions: '<array>'}],
id: '<string>',
settings: {
announcement: {bubbleWidth: 550, modalWidth: 550},
avatar: {size: 105, url: '<string>', name: '<string>'},
backdrop: {
color: '<string>',
highlight: {color: '<string>', opacity: 50, radius: 50, spread: 50},
opacity: 50
},
banner: {
animationDuration: 5000,
backgroundColor: {background: '<string>'},
padding: 50,
textColor: {color: '<string>'}
},
border: {
borderColor: '<string>',
borderRadius: 1,
borderWidth: 25,
borderWidthEnabled: true
},
brandColor: {
active: '<string>',
background: '<string>',
color: '<string>',
hover: '<string>'
},
bubble: {placement: {positionOffsetX: 0, positionOffsetY: 0}, width: 550},
buttons: {
borderRadius: 50,
height: 50.5,
minWidth: 250,
primary: {
backgroundColor: {active: '<string>', background: '<string>', hover: '<string>'},
border: {
borderWidth: 10,
color: {active: '<string>', color: '<string>', hover: '<string>'},
enabled: true
},
fontWeight: 100,
textColor: {active: '<string>', color: '<string>', hover: '<string>'}
},
px: 50,
secondary: {
backgroundColor: {active: '<string>', background: '<string>', hover: '<string>'},
border: {
borderWidth: 10,
color: {active: '<string>', color: '<string>', hover: '<string>'},
enabled: true
},
fontWeight: 100,
textColor: {active: '<string>', color: '<string>', hover: '<string>'}
}
},
checklist: {
checkmarkColor: '<string>',
placement: {positionOffsetX: 500, positionOffsetY: 500},
width: 550,
zIndex: 123
},
checklistLauncher: {
borderRadius: 50,
color: {
active: '<string>',
background: '<string>',
color: '<string>',
hover: '<string>'
},
counter: {background: '<string>', color: '<string>'},
fontWeight: 100,
height: 105,
placement: {positionOffsetX: 500, positionOffsetY: 500}
},
customCss: '<string>',
focusHighlight: {color: '<string>', opacity: 50},
font: {
customFontFamily: '<string>',
fontFamily: '<string>',
fontSize: 30,
fontWeightBold: 100,
fontWeightNormal: 100,
h1FontSize: 55,
h2FontSize: 55,
lineHeight: 30,
linkColor: '<string>'
},
launcherBeacon: {color: '<string>', size: 50.5},
launcherButtons: {
borderRadius: 50,
height: 100.5,
primary: {
backgroundColor: {active: '<string>', background: '<string>', hover: '<string>'},
border: {
borderWidth: 50,
color: {active: '<string>', color: '<string>', hover: '<string>'},
enabled: true
},
fontWeight: 100,
textColor: {active: '<string>', color: '<string>', hover: '<string>'}
},
px: 50,
width: 100.5
},
launcherIcon: {
color: {active: '<string>', color: '<string>', hover: '<string>'},
opacity: 50,
size: 100.5
},
mainColor: {
active: '<string>',
background: '<string>',
color: '<string>',
hover: '<string>'
},
modal: {padding: 50, width: 550},
progress: {
chainRoundedHeight: 5.5,
chainSquaredHeight: 5.5,
color: '<string>',
dotsHeight: 5.5,
enabled: true,
height: 5,
narrowHeight: 5.5,
numberedHeight: 50.5
},
resourceCenter: {
headerBackground: {
color: '<string>',
gradientFrom: '<string>',
gradientTo: '<string>',
imageUrl: '<string>'
},
largeWidth: 1050,
maxHeight: 1050,
normalWidth: 550,
offsetX: 500,
offsetY: 500,
transitionDuration: 5000,
zIndex: 123,
dividerLines: true,
logoUrl: '<string>'
},
resourceCenterLauncherButton: {
borderRadius: 50,
color: {
active: '<string>',
background: '<string>',
foreground: '<string>',
hover: '<string>'
},
height: 105,
imageHeight: 105,
iconUrl: '<string>'
},
resourceCenterUnreadBadge: {backgroundColor: '<string>', textColor: '<string>'},
survey: {color: '<string>'},
tooltip: {missingTargetTolerance: 5, notchSize: 52.5, width: 550},
xbutton: {color: '<string>'}
}
}
]
})
};
fetch('https://api.usertour.io/v2/projects/{projectId}/themes', 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.usertour.io/v2/projects/{projectId}/themes",
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([
'name' => '<string>',
'isDefault' => true,
'settings' => [
'announcement' => [
'bubbleWidth' => 550,
'modalWidth' => 550
],
'avatar' => [
'size' => 105,
'url' => '<string>',
'name' => '<string>'
],
'backdrop' => [
'color' => '<string>',
'highlight' => [
'color' => '<string>',
'opacity' => 50,
'radius' => 50,
'spread' => 50
],
'opacity' => 50
],
'banner' => [
'animationDuration' => 5000,
'backgroundColor' => [
'background' => '<string>'
],
'padding' => 50,
'textColor' => [
'color' => '<string>'
]
],
'border' => [
'borderColor' => '<string>',
'borderRadius' => 1,
'borderWidth' => 25,
'borderWidthEnabled' => true
],
'brandColor' => [
'active' => '<string>',
'background' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'bubble' => [
'placement' => [
'positionOffsetX' => 0,
'positionOffsetY' => 0
],
'width' => 550
],
'buttons' => [
'borderRadius' => 50,
'height' => 50.5,
'minWidth' => 250,
'primary' => [
'backgroundColor' => [
'active' => '<string>',
'background' => '<string>',
'hover' => '<string>'
],
'border' => [
'borderWidth' => 10,
'color' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'enabled' => true
],
'fontWeight' => 100,
'textColor' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
]
],
'px' => 50,
'secondary' => [
'backgroundColor' => [
'active' => '<string>',
'background' => '<string>',
'hover' => '<string>'
],
'border' => [
'borderWidth' => 10,
'color' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'enabled' => true
],
'fontWeight' => 100,
'textColor' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
]
]
],
'checklist' => [
'checkmarkColor' => '<string>',
'placement' => [
'positionOffsetX' => 500,
'positionOffsetY' => 500
],
'width' => 550,
'zIndex' => 123
],
'checklistLauncher' => [
'borderRadius' => 50,
'color' => [
'active' => '<string>',
'background' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'counter' => [
'background' => '<string>',
'color' => '<string>'
],
'fontWeight' => 100,
'height' => 105,
'placement' => [
'positionOffsetX' => 500,
'positionOffsetY' => 500
]
],
'customCss' => '<string>',
'focusHighlight' => [
'color' => '<string>',
'opacity' => 50
],
'font' => [
'customFontFamily' => '<string>',
'fontFamily' => '<string>',
'fontSize' => 30,
'fontWeightBold' => 100,
'fontWeightNormal' => 100,
'h1FontSize' => 55,
'h2FontSize' => 55,
'lineHeight' => 30,
'linkColor' => '<string>'
],
'launcherBeacon' => [
'color' => '<string>',
'size' => 50.5
],
'launcherButtons' => [
'borderRadius' => 50,
'height' => 100.5,
'primary' => [
'backgroundColor' => [
'active' => '<string>',
'background' => '<string>',
'hover' => '<string>'
],
'border' => [
'borderWidth' => 50,
'color' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'enabled' => true
],
'fontWeight' => 100,
'textColor' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
]
],
'px' => 50,
'width' => 100.5
],
'launcherIcon' => [
'color' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'opacity' => 50,
'size' => 100.5
],
'mainColor' => [
'active' => '<string>',
'background' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'modal' => [
'padding' => 50,
'width' => 550
],
'progress' => [
'chainRoundedHeight' => 5.5,
'chainSquaredHeight' => 5.5,
'color' => '<string>',
'dotsHeight' => 5.5,
'enabled' => true,
'height' => 5,
'narrowHeight' => 5.5,
'numberedHeight' => 50.5
],
'resourceCenter' => [
'headerBackground' => [
'color' => '<string>',
'gradientFrom' => '<string>',
'gradientTo' => '<string>',
'imageUrl' => '<string>'
],
'largeWidth' => 1050,
'maxHeight' => 1050,
'normalWidth' => 550,
'offsetX' => 500,
'offsetY' => 500,
'transitionDuration' => 5000,
'zIndex' => 123,
'dividerLines' => true,
'logoUrl' => '<string>'
],
'resourceCenterLauncherButton' => [
'borderRadius' => 50,
'color' => [
'active' => '<string>',
'background' => '<string>',
'foreground' => '<string>',
'hover' => '<string>'
],
'height' => 105,
'imageHeight' => 105,
'iconUrl' => '<string>'
],
'resourceCenterUnreadBadge' => [
'backgroundColor' => '<string>',
'textColor' => '<string>'
],
'survey' => [
'color' => '<string>'
],
'tooltip' => [
'missingTargetTolerance' => 5,
'notchSize' => 52.5,
'width' => 550
],
'xbutton' => [
'color' => '<string>'
]
],
'variations' => [
[
'name' => '<string>',
'conditions' => [
[
'type' => 'group',
'conditions' => '<array>'
]
],
'id' => '<string>',
'settings' => [
'announcement' => [
'bubbleWidth' => 550,
'modalWidth' => 550
],
'avatar' => [
'size' => 105,
'url' => '<string>',
'name' => '<string>'
],
'backdrop' => [
'color' => '<string>',
'highlight' => [
'color' => '<string>',
'opacity' => 50,
'radius' => 50,
'spread' => 50
],
'opacity' => 50
],
'banner' => [
'animationDuration' => 5000,
'backgroundColor' => [
'background' => '<string>'
],
'padding' => 50,
'textColor' => [
'color' => '<string>'
]
],
'border' => [
'borderColor' => '<string>',
'borderRadius' => 1,
'borderWidth' => 25,
'borderWidthEnabled' => true
],
'brandColor' => [
'active' => '<string>',
'background' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'bubble' => [
'placement' => [
'positionOffsetX' => 0,
'positionOffsetY' => 0
],
'width' => 550
],
'buttons' => [
'borderRadius' => 50,
'height' => 50.5,
'minWidth' => 250,
'primary' => [
'backgroundColor' => [
'active' => '<string>',
'background' => '<string>',
'hover' => '<string>'
],
'border' => [
'borderWidth' => 10,
'color' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'enabled' => true
],
'fontWeight' => 100,
'textColor' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
]
],
'px' => 50,
'secondary' => [
'backgroundColor' => [
'active' => '<string>',
'background' => '<string>',
'hover' => '<string>'
],
'border' => [
'borderWidth' => 10,
'color' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'enabled' => true
],
'fontWeight' => 100,
'textColor' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
]
]
],
'checklist' => [
'checkmarkColor' => '<string>',
'placement' => [
'positionOffsetX' => 500,
'positionOffsetY' => 500
],
'width' => 550,
'zIndex' => 123
],
'checklistLauncher' => [
'borderRadius' => 50,
'color' => [
'active' => '<string>',
'background' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'counter' => [
'background' => '<string>',
'color' => '<string>'
],
'fontWeight' => 100,
'height' => 105,
'placement' => [
'positionOffsetX' => 500,
'positionOffsetY' => 500
]
],
'customCss' => '<string>',
'focusHighlight' => [
'color' => '<string>',
'opacity' => 50
],
'font' => [
'customFontFamily' => '<string>',
'fontFamily' => '<string>',
'fontSize' => 30,
'fontWeightBold' => 100,
'fontWeightNormal' => 100,
'h1FontSize' => 55,
'h2FontSize' => 55,
'lineHeight' => 30,
'linkColor' => '<string>'
],
'launcherBeacon' => [
'color' => '<string>',
'size' => 50.5
],
'launcherButtons' => [
'borderRadius' => 50,
'height' => 100.5,
'primary' => [
'backgroundColor' => [
'active' => '<string>',
'background' => '<string>',
'hover' => '<string>'
],
'border' => [
'borderWidth' => 50,
'color' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'enabled' => true
],
'fontWeight' => 100,
'textColor' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
]
],
'px' => 50,
'width' => 100.5
],
'launcherIcon' => [
'color' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'opacity' => 50,
'size' => 100.5
],
'mainColor' => [
'active' => '<string>',
'background' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'modal' => [
'padding' => 50,
'width' => 550
],
'progress' => [
'chainRoundedHeight' => 5.5,
'chainSquaredHeight' => 5.5,
'color' => '<string>',
'dotsHeight' => 5.5,
'enabled' => true,
'height' => 5,
'narrowHeight' => 5.5,
'numberedHeight' => 50.5
],
'resourceCenter' => [
'headerBackground' => [
'color' => '<string>',
'gradientFrom' => '<string>',
'gradientTo' => '<string>',
'imageUrl' => '<string>'
],
'largeWidth' => 1050,
'maxHeight' => 1050,
'normalWidth' => 550,
'offsetX' => 500,
'offsetY' => 500,
'transitionDuration' => 5000,
'zIndex' => 123,
'dividerLines' => true,
'logoUrl' => '<string>'
],
'resourceCenterLauncherButton' => [
'borderRadius' => 50,
'color' => [
'active' => '<string>',
'background' => '<string>',
'foreground' => '<string>',
'hover' => '<string>'
],
'height' => 105,
'imageHeight' => 105,
'iconUrl' => '<string>'
],
'resourceCenterUnreadBadge' => [
'backgroundColor' => '<string>',
'textColor' => '<string>'
],
'survey' => [
'color' => '<string>'
],
'tooltip' => [
'missingTargetTolerance' => 5,
'notchSize' => 52.5,
'width' => 550
],
'xbutton' => [
'color' => '<string>'
]
]
]
]
]),
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.usertour.io/v2/projects/{projectId}/themes"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"isDefault\": true,\n \"settings\": {\n \"announcement\": {\n \"bubbleWidth\": 550,\n \"modalWidth\": 550\n },\n \"avatar\": {\n \"size\": 105,\n \"url\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"backdrop\": {\n \"color\": \"<string>\",\n \"highlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50,\n \"radius\": 50,\n \"spread\": 50\n },\n \"opacity\": 50\n },\n \"banner\": {\n \"animationDuration\": 5000,\n \"backgroundColor\": {\n \"background\": \"<string>\"\n },\n \"padding\": 50,\n \"textColor\": {\n \"color\": \"<string>\"\n }\n },\n \"border\": {\n \"borderColor\": \"<string>\",\n \"borderRadius\": 1,\n \"borderWidth\": 25,\n \"borderWidthEnabled\": true\n },\n \"brandColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"bubble\": {\n \"placement\": {\n \"positionOffsetX\": 0,\n \"positionOffsetY\": 0\n },\n \"width\": 550\n },\n \"buttons\": {\n \"borderRadius\": 50,\n \"height\": 50.5,\n \"minWidth\": 250,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"secondary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n }\n },\n \"checklist\": {\n \"checkmarkColor\": \"<string>\",\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n },\n \"width\": 550,\n \"zIndex\": 123\n },\n \"checklistLauncher\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"counter\": {\n \"background\": \"<string>\",\n \"color\": \"<string>\"\n },\n \"fontWeight\": 100,\n \"height\": 105,\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n }\n },\n \"customCss\": \"<string>\",\n \"focusHighlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50\n },\n \"font\": {\n \"customFontFamily\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": 30,\n \"fontWeightBold\": 100,\n \"fontWeightNormal\": 100,\n \"h1FontSize\": 55,\n \"h2FontSize\": 55,\n \"lineHeight\": 30,\n \"linkColor\": \"<string>\"\n },\n \"launcherBeacon\": {\n \"color\": \"<string>\",\n \"size\": 50.5\n },\n \"launcherButtons\": {\n \"borderRadius\": 50,\n \"height\": 100.5,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"width\": 100.5\n },\n \"launcherIcon\": {\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"opacity\": 50,\n \"size\": 100.5\n },\n \"mainColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"modal\": {\n \"padding\": 50,\n \"width\": 550\n },\n \"progress\": {\n \"chainRoundedHeight\": 5.5,\n \"chainSquaredHeight\": 5.5,\n \"color\": \"<string>\",\n \"dotsHeight\": 5.5,\n \"enabled\": true,\n \"height\": 5,\n \"narrowHeight\": 5.5,\n \"numberedHeight\": 50.5\n },\n \"resourceCenter\": {\n \"headerBackground\": {\n \"color\": \"<string>\",\n \"gradientFrom\": \"<string>\",\n \"gradientTo\": \"<string>\",\n \"imageUrl\": \"<string>\"\n },\n \"largeWidth\": 1050,\n \"maxHeight\": 1050,\n \"normalWidth\": 550,\n \"offsetX\": 500,\n \"offsetY\": 500,\n \"transitionDuration\": 5000,\n \"zIndex\": 123,\n \"dividerLines\": true,\n \"logoUrl\": \"<string>\"\n },\n \"resourceCenterLauncherButton\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"foreground\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"height\": 105,\n \"imageHeight\": 105,\n \"iconUrl\": \"<string>\"\n },\n \"resourceCenterUnreadBadge\": {\n \"backgroundColor\": \"<string>\",\n \"textColor\": \"<string>\"\n },\n \"survey\": {\n \"color\": \"<string>\"\n },\n \"tooltip\": {\n \"missingTargetTolerance\": 5,\n \"notchSize\": 52.5,\n \"width\": 550\n },\n \"xbutton\": {\n \"color\": \"<string>\"\n }\n },\n \"variations\": [\n {\n \"name\": \"<string>\",\n \"conditions\": [\n {\n \"type\": \"group\",\n \"conditions\": \"<array>\"\n }\n ],\n \"id\": \"<string>\",\n \"settings\": {\n \"announcement\": {\n \"bubbleWidth\": 550,\n \"modalWidth\": 550\n },\n \"avatar\": {\n \"size\": 105,\n \"url\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"backdrop\": {\n \"color\": \"<string>\",\n \"highlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50,\n \"radius\": 50,\n \"spread\": 50\n },\n \"opacity\": 50\n },\n \"banner\": {\n \"animationDuration\": 5000,\n \"backgroundColor\": {\n \"background\": \"<string>\"\n },\n \"padding\": 50,\n \"textColor\": {\n \"color\": \"<string>\"\n }\n },\n \"border\": {\n \"borderColor\": \"<string>\",\n \"borderRadius\": 1,\n \"borderWidth\": 25,\n \"borderWidthEnabled\": true\n },\n \"brandColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"bubble\": {\n \"placement\": {\n \"positionOffsetX\": 0,\n \"positionOffsetY\": 0\n },\n \"width\": 550\n },\n \"buttons\": {\n \"borderRadius\": 50,\n \"height\": 50.5,\n \"minWidth\": 250,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"secondary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n }\n },\n \"checklist\": {\n \"checkmarkColor\": \"<string>\",\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n },\n \"width\": 550,\n \"zIndex\": 123\n },\n \"checklistLauncher\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"counter\": {\n \"background\": \"<string>\",\n \"color\": \"<string>\"\n },\n \"fontWeight\": 100,\n \"height\": 105,\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n }\n },\n \"customCss\": \"<string>\",\n \"focusHighlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50\n },\n \"font\": {\n \"customFontFamily\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": 30,\n \"fontWeightBold\": 100,\n \"fontWeightNormal\": 100,\n \"h1FontSize\": 55,\n \"h2FontSize\": 55,\n \"lineHeight\": 30,\n \"linkColor\": \"<string>\"\n },\n \"launcherBeacon\": {\n \"color\": \"<string>\",\n \"size\": 50.5\n },\n \"launcherButtons\": {\n \"borderRadius\": 50,\n \"height\": 100.5,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"width\": 100.5\n },\n \"launcherIcon\": {\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"opacity\": 50,\n \"size\": 100.5\n },\n \"mainColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"modal\": {\n \"padding\": 50,\n \"width\": 550\n },\n \"progress\": {\n \"chainRoundedHeight\": 5.5,\n \"chainSquaredHeight\": 5.5,\n \"color\": \"<string>\",\n \"dotsHeight\": 5.5,\n \"enabled\": true,\n \"height\": 5,\n \"narrowHeight\": 5.5,\n \"numberedHeight\": 50.5\n },\n \"resourceCenter\": {\n \"headerBackground\": {\n \"color\": \"<string>\",\n \"gradientFrom\": \"<string>\",\n \"gradientTo\": \"<string>\",\n \"imageUrl\": \"<string>\"\n },\n \"largeWidth\": 1050,\n \"maxHeight\": 1050,\n \"normalWidth\": 550,\n \"offsetX\": 500,\n \"offsetY\": 500,\n \"transitionDuration\": 5000,\n \"zIndex\": 123,\n \"dividerLines\": true,\n \"logoUrl\": \"<string>\"\n },\n \"resourceCenterLauncherButton\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"foreground\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"height\": 105,\n \"imageHeight\": 105,\n \"iconUrl\": \"<string>\"\n },\n \"resourceCenterUnreadBadge\": {\n \"backgroundColor\": \"<string>\",\n \"textColor\": \"<string>\"\n },\n \"survey\": {\n \"color\": \"<string>\"\n },\n \"tooltip\": {\n \"missingTargetTolerance\": 5,\n \"notchSize\": 52.5,\n \"width\": 550\n },\n \"xbutton\": {\n \"color\": \"<string>\"\n }\n }\n }\n ]\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.usertour.io/v2/projects/{projectId}/themes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"isDefault\": true,\n \"settings\": {\n \"announcement\": {\n \"bubbleWidth\": 550,\n \"modalWidth\": 550\n },\n \"avatar\": {\n \"size\": 105,\n \"url\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"backdrop\": {\n \"color\": \"<string>\",\n \"highlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50,\n \"radius\": 50,\n \"spread\": 50\n },\n \"opacity\": 50\n },\n \"banner\": {\n \"animationDuration\": 5000,\n \"backgroundColor\": {\n \"background\": \"<string>\"\n },\n \"padding\": 50,\n \"textColor\": {\n \"color\": \"<string>\"\n }\n },\n \"border\": {\n \"borderColor\": \"<string>\",\n \"borderRadius\": 1,\n \"borderWidth\": 25,\n \"borderWidthEnabled\": true\n },\n \"brandColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"bubble\": {\n \"placement\": {\n \"positionOffsetX\": 0,\n \"positionOffsetY\": 0\n },\n \"width\": 550\n },\n \"buttons\": {\n \"borderRadius\": 50,\n \"height\": 50.5,\n \"minWidth\": 250,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"secondary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n }\n },\n \"checklist\": {\n \"checkmarkColor\": \"<string>\",\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n },\n \"width\": 550,\n \"zIndex\": 123\n },\n \"checklistLauncher\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"counter\": {\n \"background\": \"<string>\",\n \"color\": \"<string>\"\n },\n \"fontWeight\": 100,\n \"height\": 105,\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n }\n },\n \"customCss\": \"<string>\",\n \"focusHighlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50\n },\n \"font\": {\n \"customFontFamily\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": 30,\n \"fontWeightBold\": 100,\n \"fontWeightNormal\": 100,\n \"h1FontSize\": 55,\n \"h2FontSize\": 55,\n \"lineHeight\": 30,\n \"linkColor\": \"<string>\"\n },\n \"launcherBeacon\": {\n \"color\": \"<string>\",\n \"size\": 50.5\n },\n \"launcherButtons\": {\n \"borderRadius\": 50,\n \"height\": 100.5,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"width\": 100.5\n },\n \"launcherIcon\": {\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"opacity\": 50,\n \"size\": 100.5\n },\n \"mainColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"modal\": {\n \"padding\": 50,\n \"width\": 550\n },\n \"progress\": {\n \"chainRoundedHeight\": 5.5,\n \"chainSquaredHeight\": 5.5,\n \"color\": \"<string>\",\n \"dotsHeight\": 5.5,\n \"enabled\": true,\n \"height\": 5,\n \"narrowHeight\": 5.5,\n \"numberedHeight\": 50.5\n },\n \"resourceCenter\": {\n \"headerBackground\": {\n \"color\": \"<string>\",\n \"gradientFrom\": \"<string>\",\n \"gradientTo\": \"<string>\",\n \"imageUrl\": \"<string>\"\n },\n \"largeWidth\": 1050,\n \"maxHeight\": 1050,\n \"normalWidth\": 550,\n \"offsetX\": 500,\n \"offsetY\": 500,\n \"transitionDuration\": 5000,\n \"zIndex\": 123,\n \"dividerLines\": true,\n \"logoUrl\": \"<string>\"\n },\n \"resourceCenterLauncherButton\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"foreground\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"height\": 105,\n \"imageHeight\": 105,\n \"iconUrl\": \"<string>\"\n },\n \"resourceCenterUnreadBadge\": {\n \"backgroundColor\": \"<string>\",\n \"textColor\": \"<string>\"\n },\n \"survey\": {\n \"color\": \"<string>\"\n },\n \"tooltip\": {\n \"missingTargetTolerance\": 5,\n \"notchSize\": 52.5,\n \"width\": 550\n },\n \"xbutton\": {\n \"color\": \"<string>\"\n }\n },\n \"variations\": [\n {\n \"name\": \"<string>\",\n \"conditions\": [\n {\n \"type\": \"group\",\n \"conditions\": \"<array>\"\n }\n ],\n \"id\": \"<string>\",\n \"settings\": {\n \"announcement\": {\n \"bubbleWidth\": 550,\n \"modalWidth\": 550\n },\n \"avatar\": {\n \"size\": 105,\n \"url\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"backdrop\": {\n \"color\": \"<string>\",\n \"highlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50,\n \"radius\": 50,\n \"spread\": 50\n },\n \"opacity\": 50\n },\n \"banner\": {\n \"animationDuration\": 5000,\n \"backgroundColor\": {\n \"background\": \"<string>\"\n },\n \"padding\": 50,\n \"textColor\": {\n \"color\": \"<string>\"\n }\n },\n \"border\": {\n \"borderColor\": \"<string>\",\n \"borderRadius\": 1,\n \"borderWidth\": 25,\n \"borderWidthEnabled\": true\n },\n \"brandColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"bubble\": {\n \"placement\": {\n \"positionOffsetX\": 0,\n \"positionOffsetY\": 0\n },\n \"width\": 550\n },\n \"buttons\": {\n \"borderRadius\": 50,\n \"height\": 50.5,\n \"minWidth\": 250,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"secondary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n }\n },\n \"checklist\": {\n \"checkmarkColor\": \"<string>\",\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n },\n \"width\": 550,\n \"zIndex\": 123\n },\n \"checklistLauncher\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"counter\": {\n \"background\": \"<string>\",\n \"color\": \"<string>\"\n },\n \"fontWeight\": 100,\n \"height\": 105,\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n }\n },\n \"customCss\": \"<string>\",\n \"focusHighlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50\n },\n \"font\": {\n \"customFontFamily\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": 30,\n \"fontWeightBold\": 100,\n \"fontWeightNormal\": 100,\n \"h1FontSize\": 55,\n \"h2FontSize\": 55,\n \"lineHeight\": 30,\n \"linkColor\": \"<string>\"\n },\n \"launcherBeacon\": {\n \"color\": \"<string>\",\n \"size\": 50.5\n },\n \"launcherButtons\": {\n \"borderRadius\": 50,\n \"height\": 100.5,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"width\": 100.5\n },\n \"launcherIcon\": {\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"opacity\": 50,\n \"size\": 100.5\n },\n \"mainColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"modal\": {\n \"padding\": 50,\n \"width\": 550\n },\n \"progress\": {\n \"chainRoundedHeight\": 5.5,\n \"chainSquaredHeight\": 5.5,\n \"color\": \"<string>\",\n \"dotsHeight\": 5.5,\n \"enabled\": true,\n \"height\": 5,\n \"narrowHeight\": 5.5,\n \"numberedHeight\": 50.5\n },\n \"resourceCenter\": {\n \"headerBackground\": {\n \"color\": \"<string>\",\n \"gradientFrom\": \"<string>\",\n \"gradientTo\": \"<string>\",\n \"imageUrl\": \"<string>\"\n },\n \"largeWidth\": 1050,\n \"maxHeight\": 1050,\n \"normalWidth\": 550,\n \"offsetX\": 500,\n \"offsetY\": 500,\n \"transitionDuration\": 5000,\n \"zIndex\": 123,\n \"dividerLines\": true,\n \"logoUrl\": \"<string>\"\n },\n \"resourceCenterLauncherButton\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"foreground\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"height\": 105,\n \"imageHeight\": 105,\n \"iconUrl\": \"<string>\"\n },\n \"resourceCenterUnreadBadge\": {\n \"backgroundColor\": \"<string>\",\n \"textColor\": \"<string>\"\n },\n \"survey\": {\n \"color\": \"<string>\"\n },\n \"tooltip\": {\n \"missingTargetTolerance\": 5,\n \"notchSize\": 52.5,\n \"width\": 550\n },\n \"xbutton\": {\n \"color\": \"<string>\"\n }\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usertour.io/v2/projects/{projectId}/themes")
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 \"name\": \"<string>\",\n \"isDefault\": true,\n \"settings\": {\n \"announcement\": {\n \"bubbleWidth\": 550,\n \"modalWidth\": 550\n },\n \"avatar\": {\n \"size\": 105,\n \"url\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"backdrop\": {\n \"color\": \"<string>\",\n \"highlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50,\n \"radius\": 50,\n \"spread\": 50\n },\n \"opacity\": 50\n },\n \"banner\": {\n \"animationDuration\": 5000,\n \"backgroundColor\": {\n \"background\": \"<string>\"\n },\n \"padding\": 50,\n \"textColor\": {\n \"color\": \"<string>\"\n }\n },\n \"border\": {\n \"borderColor\": \"<string>\",\n \"borderRadius\": 1,\n \"borderWidth\": 25,\n \"borderWidthEnabled\": true\n },\n \"brandColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"bubble\": {\n \"placement\": {\n \"positionOffsetX\": 0,\n \"positionOffsetY\": 0\n },\n \"width\": 550\n },\n \"buttons\": {\n \"borderRadius\": 50,\n \"height\": 50.5,\n \"minWidth\": 250,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"secondary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n }\n },\n \"checklist\": {\n \"checkmarkColor\": \"<string>\",\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n },\n \"width\": 550,\n \"zIndex\": 123\n },\n \"checklistLauncher\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"counter\": {\n \"background\": \"<string>\",\n \"color\": \"<string>\"\n },\n \"fontWeight\": 100,\n \"height\": 105,\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n }\n },\n \"customCss\": \"<string>\",\n \"focusHighlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50\n },\n \"font\": {\n \"customFontFamily\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": 30,\n \"fontWeightBold\": 100,\n \"fontWeightNormal\": 100,\n \"h1FontSize\": 55,\n \"h2FontSize\": 55,\n \"lineHeight\": 30,\n \"linkColor\": \"<string>\"\n },\n \"launcherBeacon\": {\n \"color\": \"<string>\",\n \"size\": 50.5\n },\n \"launcherButtons\": {\n \"borderRadius\": 50,\n \"height\": 100.5,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"width\": 100.5\n },\n \"launcherIcon\": {\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"opacity\": 50,\n \"size\": 100.5\n },\n \"mainColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"modal\": {\n \"padding\": 50,\n \"width\": 550\n },\n \"progress\": {\n \"chainRoundedHeight\": 5.5,\n \"chainSquaredHeight\": 5.5,\n \"color\": \"<string>\",\n \"dotsHeight\": 5.5,\n \"enabled\": true,\n \"height\": 5,\n \"narrowHeight\": 5.5,\n \"numberedHeight\": 50.5\n },\n \"resourceCenter\": {\n \"headerBackground\": {\n \"color\": \"<string>\",\n \"gradientFrom\": \"<string>\",\n \"gradientTo\": \"<string>\",\n \"imageUrl\": \"<string>\"\n },\n \"largeWidth\": 1050,\n \"maxHeight\": 1050,\n \"normalWidth\": 550,\n \"offsetX\": 500,\n \"offsetY\": 500,\n \"transitionDuration\": 5000,\n \"zIndex\": 123,\n \"dividerLines\": true,\n \"logoUrl\": \"<string>\"\n },\n \"resourceCenterLauncherButton\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"foreground\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"height\": 105,\n \"imageHeight\": 105,\n \"iconUrl\": \"<string>\"\n },\n \"resourceCenterUnreadBadge\": {\n \"backgroundColor\": \"<string>\",\n \"textColor\": \"<string>\"\n },\n \"survey\": {\n \"color\": \"<string>\"\n },\n \"tooltip\": {\n \"missingTargetTolerance\": 5,\n \"notchSize\": 52.5,\n \"width\": 550\n },\n \"xbutton\": {\n \"color\": \"<string>\"\n }\n },\n \"variations\": [\n {\n \"name\": \"<string>\",\n \"conditions\": [\n {\n \"type\": \"group\",\n \"conditions\": \"<array>\"\n }\n ],\n \"id\": \"<string>\",\n \"settings\": {\n \"announcement\": {\n \"bubbleWidth\": 550,\n \"modalWidth\": 550\n },\n \"avatar\": {\n \"size\": 105,\n \"url\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"backdrop\": {\n \"color\": \"<string>\",\n \"highlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50,\n \"radius\": 50,\n \"spread\": 50\n },\n \"opacity\": 50\n },\n \"banner\": {\n \"animationDuration\": 5000,\n \"backgroundColor\": {\n \"background\": \"<string>\"\n },\n \"padding\": 50,\n \"textColor\": {\n \"color\": \"<string>\"\n }\n },\n \"border\": {\n \"borderColor\": \"<string>\",\n \"borderRadius\": 1,\n \"borderWidth\": 25,\n \"borderWidthEnabled\": true\n },\n \"brandColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"bubble\": {\n \"placement\": {\n \"positionOffsetX\": 0,\n \"positionOffsetY\": 0\n },\n \"width\": 550\n },\n \"buttons\": {\n \"borderRadius\": 50,\n \"height\": 50.5,\n \"minWidth\": 250,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"secondary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n }\n },\n \"checklist\": {\n \"checkmarkColor\": \"<string>\",\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n },\n \"width\": 550,\n \"zIndex\": 123\n },\n \"checklistLauncher\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"counter\": {\n \"background\": \"<string>\",\n \"color\": \"<string>\"\n },\n \"fontWeight\": 100,\n \"height\": 105,\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n }\n },\n \"customCss\": \"<string>\",\n \"focusHighlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50\n },\n \"font\": {\n \"customFontFamily\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": 30,\n \"fontWeightBold\": 100,\n \"fontWeightNormal\": 100,\n \"h1FontSize\": 55,\n \"h2FontSize\": 55,\n \"lineHeight\": 30,\n \"linkColor\": \"<string>\"\n },\n \"launcherBeacon\": {\n \"color\": \"<string>\",\n \"size\": 50.5\n },\n \"launcherButtons\": {\n \"borderRadius\": 50,\n \"height\": 100.5,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"width\": 100.5\n },\n \"launcherIcon\": {\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"opacity\": 50,\n \"size\": 100.5\n },\n \"mainColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"modal\": {\n \"padding\": 50,\n \"width\": 550\n },\n \"progress\": {\n \"chainRoundedHeight\": 5.5,\n \"chainSquaredHeight\": 5.5,\n \"color\": \"<string>\",\n \"dotsHeight\": 5.5,\n \"enabled\": true,\n \"height\": 5,\n \"narrowHeight\": 5.5,\n \"numberedHeight\": 50.5\n },\n \"resourceCenter\": {\n \"headerBackground\": {\n \"color\": \"<string>\",\n \"gradientFrom\": \"<string>\",\n \"gradientTo\": \"<string>\",\n \"imageUrl\": \"<string>\"\n },\n \"largeWidth\": 1050,\n \"maxHeight\": 1050,\n \"normalWidth\": 550,\n \"offsetX\": 500,\n \"offsetY\": 500,\n \"transitionDuration\": 5000,\n \"zIndex\": 123,\n \"dividerLines\": true,\n \"logoUrl\": \"<string>\"\n },\n \"resourceCenterLauncherButton\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"foreground\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"height\": 105,\n \"imageHeight\": 105,\n \"iconUrl\": \"<string>\"\n },\n \"resourceCenterUnreadBadge\": {\n \"backgroundColor\": \"<string>\",\n \"textColor\": \"<string>\"\n },\n \"survey\": {\n \"color\": \"<string>\"\n },\n \"tooltip\": {\n \"missingTargetTolerance\": 5,\n \"notchSize\": 52.5,\n \"width\": 550\n },\n \"xbutton\": {\n \"color\": \"<string>\"\n }\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "theme",
"name": "<string>",
"isDefault": true,
"isSystem": true,
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"variationCount": 0,
"settings": {},
"resolvedSettings": {},
"variations": [
{
"id": "<string>",
"name": "<string>",
"conditions": [
{
"type": "group",
"conditions": "<array>"
}
],
"settings": {}
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}Create a theme
curl --request POST \
--url https://api.usertour.io/v2/projects/{projectId}/themes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"isDefault": true,
"settings": {
"announcement": {
"bubbleWidth": 550,
"modalWidth": 550
},
"avatar": {
"size": 105,
"url": "<string>",
"name": "<string>"
},
"backdrop": {
"color": "<string>",
"highlight": {
"color": "<string>",
"opacity": 50,
"radius": 50,
"spread": 50
},
"opacity": 50
},
"banner": {
"animationDuration": 5000,
"backgroundColor": {
"background": "<string>"
},
"padding": 50,
"textColor": {
"color": "<string>"
}
},
"border": {
"borderColor": "<string>",
"borderRadius": 1,
"borderWidth": 25,
"borderWidthEnabled": true
},
"brandColor": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"bubble": {
"placement": {
"positionOffsetX": 0,
"positionOffsetY": 0
},
"width": 550
},
"buttons": {
"borderRadius": 50,
"height": 50.5,
"minWidth": 250,
"primary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 10,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": true
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
},
"px": 50,
"secondary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 10,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": true
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
}
},
"checklist": {
"checkmarkColor": "<string>",
"placement": {
"positionOffsetX": 500,
"positionOffsetY": 500
},
"width": 550,
"zIndex": 123
},
"checklistLauncher": {
"borderRadius": 50,
"color": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"counter": {
"background": "<string>",
"color": "<string>"
},
"fontWeight": 100,
"height": 105,
"placement": {
"positionOffsetX": 500,
"positionOffsetY": 500
}
},
"customCss": "<string>",
"focusHighlight": {
"color": "<string>",
"opacity": 50
},
"font": {
"customFontFamily": "<string>",
"fontFamily": "<string>",
"fontSize": 30,
"fontWeightBold": 100,
"fontWeightNormal": 100,
"h1FontSize": 55,
"h2FontSize": 55,
"lineHeight": 30,
"linkColor": "<string>"
},
"launcherBeacon": {
"color": "<string>",
"size": 50.5
},
"launcherButtons": {
"borderRadius": 50,
"height": 100.5,
"primary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 50,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": true
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
},
"px": 50,
"width": 100.5
},
"launcherIcon": {
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"opacity": 50,
"size": 100.5
},
"mainColor": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"modal": {
"padding": 50,
"width": 550
},
"progress": {
"chainRoundedHeight": 5.5,
"chainSquaredHeight": 5.5,
"color": "<string>",
"dotsHeight": 5.5,
"enabled": true,
"height": 5,
"narrowHeight": 5.5,
"numberedHeight": 50.5
},
"resourceCenter": {
"headerBackground": {
"color": "<string>",
"gradientFrom": "<string>",
"gradientTo": "<string>",
"imageUrl": "<string>"
},
"largeWidth": 1050,
"maxHeight": 1050,
"normalWidth": 550,
"offsetX": 500,
"offsetY": 500,
"transitionDuration": 5000,
"zIndex": 123,
"dividerLines": true,
"logoUrl": "<string>"
},
"resourceCenterLauncherButton": {
"borderRadius": 50,
"color": {
"active": "<string>",
"background": "<string>",
"foreground": "<string>",
"hover": "<string>"
},
"height": 105,
"imageHeight": 105,
"iconUrl": "<string>"
},
"resourceCenterUnreadBadge": {
"backgroundColor": "<string>",
"textColor": "<string>"
},
"survey": {
"color": "<string>"
},
"tooltip": {
"missingTargetTolerance": 5,
"notchSize": 52.5,
"width": 550
},
"xbutton": {
"color": "<string>"
}
},
"variations": [
{
"name": "<string>",
"conditions": [
{
"type": "group",
"conditions": "<array>"
}
],
"id": "<string>",
"settings": {
"announcement": {
"bubbleWidth": 550,
"modalWidth": 550
},
"avatar": {
"size": 105,
"url": "<string>",
"name": "<string>"
},
"backdrop": {
"color": "<string>",
"highlight": {
"color": "<string>",
"opacity": 50,
"radius": 50,
"spread": 50
},
"opacity": 50
},
"banner": {
"animationDuration": 5000,
"backgroundColor": {
"background": "<string>"
},
"padding": 50,
"textColor": {
"color": "<string>"
}
},
"border": {
"borderColor": "<string>",
"borderRadius": 1,
"borderWidth": 25,
"borderWidthEnabled": true
},
"brandColor": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"bubble": {
"placement": {
"positionOffsetX": 0,
"positionOffsetY": 0
},
"width": 550
},
"buttons": {
"borderRadius": 50,
"height": 50.5,
"minWidth": 250,
"primary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 10,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": true
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
},
"px": 50,
"secondary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 10,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": true
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
}
},
"checklist": {
"checkmarkColor": "<string>",
"placement": {
"positionOffsetX": 500,
"positionOffsetY": 500
},
"width": 550,
"zIndex": 123
},
"checklistLauncher": {
"borderRadius": 50,
"color": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"counter": {
"background": "<string>",
"color": "<string>"
},
"fontWeight": 100,
"height": 105,
"placement": {
"positionOffsetX": 500,
"positionOffsetY": 500
}
},
"customCss": "<string>",
"focusHighlight": {
"color": "<string>",
"opacity": 50
},
"font": {
"customFontFamily": "<string>",
"fontFamily": "<string>",
"fontSize": 30,
"fontWeightBold": 100,
"fontWeightNormal": 100,
"h1FontSize": 55,
"h2FontSize": 55,
"lineHeight": 30,
"linkColor": "<string>"
},
"launcherBeacon": {
"color": "<string>",
"size": 50.5
},
"launcherButtons": {
"borderRadius": 50,
"height": 100.5,
"primary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 50,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": true
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
},
"px": 50,
"width": 100.5
},
"launcherIcon": {
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"opacity": 50,
"size": 100.5
},
"mainColor": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"modal": {
"padding": 50,
"width": 550
},
"progress": {
"chainRoundedHeight": 5.5,
"chainSquaredHeight": 5.5,
"color": "<string>",
"dotsHeight": 5.5,
"enabled": true,
"height": 5,
"narrowHeight": 5.5,
"numberedHeight": 50.5
},
"resourceCenter": {
"headerBackground": {
"color": "<string>",
"gradientFrom": "<string>",
"gradientTo": "<string>",
"imageUrl": "<string>"
},
"largeWidth": 1050,
"maxHeight": 1050,
"normalWidth": 550,
"offsetX": 500,
"offsetY": 500,
"transitionDuration": 5000,
"zIndex": 123,
"dividerLines": true,
"logoUrl": "<string>"
},
"resourceCenterLauncherButton": {
"borderRadius": 50,
"color": {
"active": "<string>",
"background": "<string>",
"foreground": "<string>",
"hover": "<string>"
},
"height": 105,
"imageHeight": 105,
"iconUrl": "<string>"
},
"resourceCenterUnreadBadge": {
"backgroundColor": "<string>",
"textColor": "<string>"
},
"survey": {
"color": "<string>"
},
"tooltip": {
"missingTargetTolerance": 5,
"notchSize": 52.5,
"width": 550
},
"xbutton": {
"color": "<string>"
}
}
}
]
}
'import requests
url = "https://api.usertour.io/v2/projects/{projectId}/themes"
payload = {
"name": "<string>",
"isDefault": True,
"settings": {
"announcement": {
"bubbleWidth": 550,
"modalWidth": 550
},
"avatar": {
"size": 105,
"url": "<string>",
"name": "<string>"
},
"backdrop": {
"color": "<string>",
"highlight": {
"color": "<string>",
"opacity": 50,
"radius": 50,
"spread": 50
},
"opacity": 50
},
"banner": {
"animationDuration": 5000,
"backgroundColor": { "background": "<string>" },
"padding": 50,
"textColor": { "color": "<string>" }
},
"border": {
"borderColor": "<string>",
"borderRadius": 1,
"borderWidth": 25,
"borderWidthEnabled": True
},
"brandColor": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"bubble": {
"placement": {
"positionOffsetX": 0,
"positionOffsetY": 0
},
"width": 550
},
"buttons": {
"borderRadius": 50,
"height": 50.5,
"minWidth": 250,
"primary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 10,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": True
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
},
"px": 50,
"secondary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 10,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": True
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
}
},
"checklist": {
"checkmarkColor": "<string>",
"placement": {
"positionOffsetX": 500,
"positionOffsetY": 500
},
"width": 550,
"zIndex": 123
},
"checklistLauncher": {
"borderRadius": 50,
"color": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"counter": {
"background": "<string>",
"color": "<string>"
},
"fontWeight": 100,
"height": 105,
"placement": {
"positionOffsetX": 500,
"positionOffsetY": 500
}
},
"customCss": "<string>",
"focusHighlight": {
"color": "<string>",
"opacity": 50
},
"font": {
"customFontFamily": "<string>",
"fontFamily": "<string>",
"fontSize": 30,
"fontWeightBold": 100,
"fontWeightNormal": 100,
"h1FontSize": 55,
"h2FontSize": 55,
"lineHeight": 30,
"linkColor": "<string>"
},
"launcherBeacon": {
"color": "<string>",
"size": 50.5
},
"launcherButtons": {
"borderRadius": 50,
"height": 100.5,
"primary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 50,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": True
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
},
"px": 50,
"width": 100.5
},
"launcherIcon": {
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"opacity": 50,
"size": 100.5
},
"mainColor": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"modal": {
"padding": 50,
"width": 550
},
"progress": {
"chainRoundedHeight": 5.5,
"chainSquaredHeight": 5.5,
"color": "<string>",
"dotsHeight": 5.5,
"enabled": True,
"height": 5,
"narrowHeight": 5.5,
"numberedHeight": 50.5
},
"resourceCenter": {
"headerBackground": {
"color": "<string>",
"gradientFrom": "<string>",
"gradientTo": "<string>",
"imageUrl": "<string>"
},
"largeWidth": 1050,
"maxHeight": 1050,
"normalWidth": 550,
"offsetX": 500,
"offsetY": 500,
"transitionDuration": 5000,
"zIndex": 123,
"dividerLines": True,
"logoUrl": "<string>"
},
"resourceCenterLauncherButton": {
"borderRadius": 50,
"color": {
"active": "<string>",
"background": "<string>",
"foreground": "<string>",
"hover": "<string>"
},
"height": 105,
"imageHeight": 105,
"iconUrl": "<string>"
},
"resourceCenterUnreadBadge": {
"backgroundColor": "<string>",
"textColor": "<string>"
},
"survey": { "color": "<string>" },
"tooltip": {
"missingTargetTolerance": 5,
"notchSize": 52.5,
"width": 550
},
"xbutton": { "color": "<string>" }
},
"variations": [
{
"name": "<string>",
"conditions": [
{
"type": "group",
"conditions": "<array>"
}
],
"id": "<string>",
"settings": {
"announcement": {
"bubbleWidth": 550,
"modalWidth": 550
},
"avatar": {
"size": 105,
"url": "<string>",
"name": "<string>"
},
"backdrop": {
"color": "<string>",
"highlight": {
"color": "<string>",
"opacity": 50,
"radius": 50,
"spread": 50
},
"opacity": 50
},
"banner": {
"animationDuration": 5000,
"backgroundColor": { "background": "<string>" },
"padding": 50,
"textColor": { "color": "<string>" }
},
"border": {
"borderColor": "<string>",
"borderRadius": 1,
"borderWidth": 25,
"borderWidthEnabled": True
},
"brandColor": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"bubble": {
"placement": {
"positionOffsetX": 0,
"positionOffsetY": 0
},
"width": 550
},
"buttons": {
"borderRadius": 50,
"height": 50.5,
"minWidth": 250,
"primary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 10,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": True
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
},
"px": 50,
"secondary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 10,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": True
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
}
},
"checklist": {
"checkmarkColor": "<string>",
"placement": {
"positionOffsetX": 500,
"positionOffsetY": 500
},
"width": 550,
"zIndex": 123
},
"checklistLauncher": {
"borderRadius": 50,
"color": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"counter": {
"background": "<string>",
"color": "<string>"
},
"fontWeight": 100,
"height": 105,
"placement": {
"positionOffsetX": 500,
"positionOffsetY": 500
}
},
"customCss": "<string>",
"focusHighlight": {
"color": "<string>",
"opacity": 50
},
"font": {
"customFontFamily": "<string>",
"fontFamily": "<string>",
"fontSize": 30,
"fontWeightBold": 100,
"fontWeightNormal": 100,
"h1FontSize": 55,
"h2FontSize": 55,
"lineHeight": 30,
"linkColor": "<string>"
},
"launcherBeacon": {
"color": "<string>",
"size": 50.5
},
"launcherButtons": {
"borderRadius": 50,
"height": 100.5,
"primary": {
"backgroundColor": {
"active": "<string>",
"background": "<string>",
"hover": "<string>"
},
"border": {
"borderWidth": 50,
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"enabled": True
},
"fontWeight": 100,
"textColor": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
}
},
"px": 50,
"width": 100.5
},
"launcherIcon": {
"color": {
"active": "<string>",
"color": "<string>",
"hover": "<string>"
},
"opacity": 50,
"size": 100.5
},
"mainColor": {
"active": "<string>",
"background": "<string>",
"color": "<string>",
"hover": "<string>"
},
"modal": {
"padding": 50,
"width": 550
},
"progress": {
"chainRoundedHeight": 5.5,
"chainSquaredHeight": 5.5,
"color": "<string>",
"dotsHeight": 5.5,
"enabled": True,
"height": 5,
"narrowHeight": 5.5,
"numberedHeight": 50.5
},
"resourceCenter": {
"headerBackground": {
"color": "<string>",
"gradientFrom": "<string>",
"gradientTo": "<string>",
"imageUrl": "<string>"
},
"largeWidth": 1050,
"maxHeight": 1050,
"normalWidth": 550,
"offsetX": 500,
"offsetY": 500,
"transitionDuration": 5000,
"zIndex": 123,
"dividerLines": True,
"logoUrl": "<string>"
},
"resourceCenterLauncherButton": {
"borderRadius": 50,
"color": {
"active": "<string>",
"background": "<string>",
"foreground": "<string>",
"hover": "<string>"
},
"height": 105,
"imageHeight": 105,
"iconUrl": "<string>"
},
"resourceCenterUnreadBadge": {
"backgroundColor": "<string>",
"textColor": "<string>"
},
"survey": { "color": "<string>" },
"tooltip": {
"missingTargetTolerance": 5,
"notchSize": 52.5,
"width": 550
},
"xbutton": { "color": "<string>" }
}
}
]
}
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({
name: '<string>',
isDefault: true,
settings: {
announcement: {bubbleWidth: 550, modalWidth: 550},
avatar: {size: 105, url: '<string>', name: '<string>'},
backdrop: {
color: '<string>',
highlight: {color: '<string>', opacity: 50, radius: 50, spread: 50},
opacity: 50
},
banner: {
animationDuration: 5000,
backgroundColor: {background: '<string>'},
padding: 50,
textColor: {color: '<string>'}
},
border: {
borderColor: '<string>',
borderRadius: 1,
borderWidth: 25,
borderWidthEnabled: true
},
brandColor: {
active: '<string>',
background: '<string>',
color: '<string>',
hover: '<string>'
},
bubble: {placement: {positionOffsetX: 0, positionOffsetY: 0}, width: 550},
buttons: {
borderRadius: 50,
height: 50.5,
minWidth: 250,
primary: {
backgroundColor: {active: '<string>', background: '<string>', hover: '<string>'},
border: {
borderWidth: 10,
color: {active: '<string>', color: '<string>', hover: '<string>'},
enabled: true
},
fontWeight: 100,
textColor: {active: '<string>', color: '<string>', hover: '<string>'}
},
px: 50,
secondary: {
backgroundColor: {active: '<string>', background: '<string>', hover: '<string>'},
border: {
borderWidth: 10,
color: {active: '<string>', color: '<string>', hover: '<string>'},
enabled: true
},
fontWeight: 100,
textColor: {active: '<string>', color: '<string>', hover: '<string>'}
}
},
checklist: {
checkmarkColor: '<string>',
placement: {positionOffsetX: 500, positionOffsetY: 500},
width: 550,
zIndex: 123
},
checklistLauncher: {
borderRadius: 50,
color: {
active: '<string>',
background: '<string>',
color: '<string>',
hover: '<string>'
},
counter: {background: '<string>', color: '<string>'},
fontWeight: 100,
height: 105,
placement: {positionOffsetX: 500, positionOffsetY: 500}
},
customCss: '<string>',
focusHighlight: {color: '<string>', opacity: 50},
font: {
customFontFamily: '<string>',
fontFamily: '<string>',
fontSize: 30,
fontWeightBold: 100,
fontWeightNormal: 100,
h1FontSize: 55,
h2FontSize: 55,
lineHeight: 30,
linkColor: '<string>'
},
launcherBeacon: {color: '<string>', size: 50.5},
launcherButtons: {
borderRadius: 50,
height: 100.5,
primary: {
backgroundColor: {active: '<string>', background: '<string>', hover: '<string>'},
border: {
borderWidth: 50,
color: {active: '<string>', color: '<string>', hover: '<string>'},
enabled: true
},
fontWeight: 100,
textColor: {active: '<string>', color: '<string>', hover: '<string>'}
},
px: 50,
width: 100.5
},
launcherIcon: {
color: {active: '<string>', color: '<string>', hover: '<string>'},
opacity: 50,
size: 100.5
},
mainColor: {
active: '<string>',
background: '<string>',
color: '<string>',
hover: '<string>'
},
modal: {padding: 50, width: 550},
progress: {
chainRoundedHeight: 5.5,
chainSquaredHeight: 5.5,
color: '<string>',
dotsHeight: 5.5,
enabled: true,
height: 5,
narrowHeight: 5.5,
numberedHeight: 50.5
},
resourceCenter: {
headerBackground: {
color: '<string>',
gradientFrom: '<string>',
gradientTo: '<string>',
imageUrl: '<string>'
},
largeWidth: 1050,
maxHeight: 1050,
normalWidth: 550,
offsetX: 500,
offsetY: 500,
transitionDuration: 5000,
zIndex: 123,
dividerLines: true,
logoUrl: '<string>'
},
resourceCenterLauncherButton: {
borderRadius: 50,
color: {
active: '<string>',
background: '<string>',
foreground: '<string>',
hover: '<string>'
},
height: 105,
imageHeight: 105,
iconUrl: '<string>'
},
resourceCenterUnreadBadge: {backgroundColor: '<string>', textColor: '<string>'},
survey: {color: '<string>'},
tooltip: {missingTargetTolerance: 5, notchSize: 52.5, width: 550},
xbutton: {color: '<string>'}
},
variations: [
{
name: '<string>',
conditions: [{type: 'group', conditions: '<array>'}],
id: '<string>',
settings: {
announcement: {bubbleWidth: 550, modalWidth: 550},
avatar: {size: 105, url: '<string>', name: '<string>'},
backdrop: {
color: '<string>',
highlight: {color: '<string>', opacity: 50, radius: 50, spread: 50},
opacity: 50
},
banner: {
animationDuration: 5000,
backgroundColor: {background: '<string>'},
padding: 50,
textColor: {color: '<string>'}
},
border: {
borderColor: '<string>',
borderRadius: 1,
borderWidth: 25,
borderWidthEnabled: true
},
brandColor: {
active: '<string>',
background: '<string>',
color: '<string>',
hover: '<string>'
},
bubble: {placement: {positionOffsetX: 0, positionOffsetY: 0}, width: 550},
buttons: {
borderRadius: 50,
height: 50.5,
minWidth: 250,
primary: {
backgroundColor: {active: '<string>', background: '<string>', hover: '<string>'},
border: {
borderWidth: 10,
color: {active: '<string>', color: '<string>', hover: '<string>'},
enabled: true
},
fontWeight: 100,
textColor: {active: '<string>', color: '<string>', hover: '<string>'}
},
px: 50,
secondary: {
backgroundColor: {active: '<string>', background: '<string>', hover: '<string>'},
border: {
borderWidth: 10,
color: {active: '<string>', color: '<string>', hover: '<string>'},
enabled: true
},
fontWeight: 100,
textColor: {active: '<string>', color: '<string>', hover: '<string>'}
}
},
checklist: {
checkmarkColor: '<string>',
placement: {positionOffsetX: 500, positionOffsetY: 500},
width: 550,
zIndex: 123
},
checklistLauncher: {
borderRadius: 50,
color: {
active: '<string>',
background: '<string>',
color: '<string>',
hover: '<string>'
},
counter: {background: '<string>', color: '<string>'},
fontWeight: 100,
height: 105,
placement: {positionOffsetX: 500, positionOffsetY: 500}
},
customCss: '<string>',
focusHighlight: {color: '<string>', opacity: 50},
font: {
customFontFamily: '<string>',
fontFamily: '<string>',
fontSize: 30,
fontWeightBold: 100,
fontWeightNormal: 100,
h1FontSize: 55,
h2FontSize: 55,
lineHeight: 30,
linkColor: '<string>'
},
launcherBeacon: {color: '<string>', size: 50.5},
launcherButtons: {
borderRadius: 50,
height: 100.5,
primary: {
backgroundColor: {active: '<string>', background: '<string>', hover: '<string>'},
border: {
borderWidth: 50,
color: {active: '<string>', color: '<string>', hover: '<string>'},
enabled: true
},
fontWeight: 100,
textColor: {active: '<string>', color: '<string>', hover: '<string>'}
},
px: 50,
width: 100.5
},
launcherIcon: {
color: {active: '<string>', color: '<string>', hover: '<string>'},
opacity: 50,
size: 100.5
},
mainColor: {
active: '<string>',
background: '<string>',
color: '<string>',
hover: '<string>'
},
modal: {padding: 50, width: 550},
progress: {
chainRoundedHeight: 5.5,
chainSquaredHeight: 5.5,
color: '<string>',
dotsHeight: 5.5,
enabled: true,
height: 5,
narrowHeight: 5.5,
numberedHeight: 50.5
},
resourceCenter: {
headerBackground: {
color: '<string>',
gradientFrom: '<string>',
gradientTo: '<string>',
imageUrl: '<string>'
},
largeWidth: 1050,
maxHeight: 1050,
normalWidth: 550,
offsetX: 500,
offsetY: 500,
transitionDuration: 5000,
zIndex: 123,
dividerLines: true,
logoUrl: '<string>'
},
resourceCenterLauncherButton: {
borderRadius: 50,
color: {
active: '<string>',
background: '<string>',
foreground: '<string>',
hover: '<string>'
},
height: 105,
imageHeight: 105,
iconUrl: '<string>'
},
resourceCenterUnreadBadge: {backgroundColor: '<string>', textColor: '<string>'},
survey: {color: '<string>'},
tooltip: {missingTargetTolerance: 5, notchSize: 52.5, width: 550},
xbutton: {color: '<string>'}
}
}
]
})
};
fetch('https://api.usertour.io/v2/projects/{projectId}/themes', 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.usertour.io/v2/projects/{projectId}/themes",
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([
'name' => '<string>',
'isDefault' => true,
'settings' => [
'announcement' => [
'bubbleWidth' => 550,
'modalWidth' => 550
],
'avatar' => [
'size' => 105,
'url' => '<string>',
'name' => '<string>'
],
'backdrop' => [
'color' => '<string>',
'highlight' => [
'color' => '<string>',
'opacity' => 50,
'radius' => 50,
'spread' => 50
],
'opacity' => 50
],
'banner' => [
'animationDuration' => 5000,
'backgroundColor' => [
'background' => '<string>'
],
'padding' => 50,
'textColor' => [
'color' => '<string>'
]
],
'border' => [
'borderColor' => '<string>',
'borderRadius' => 1,
'borderWidth' => 25,
'borderWidthEnabled' => true
],
'brandColor' => [
'active' => '<string>',
'background' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'bubble' => [
'placement' => [
'positionOffsetX' => 0,
'positionOffsetY' => 0
],
'width' => 550
],
'buttons' => [
'borderRadius' => 50,
'height' => 50.5,
'minWidth' => 250,
'primary' => [
'backgroundColor' => [
'active' => '<string>',
'background' => '<string>',
'hover' => '<string>'
],
'border' => [
'borderWidth' => 10,
'color' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'enabled' => true
],
'fontWeight' => 100,
'textColor' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
]
],
'px' => 50,
'secondary' => [
'backgroundColor' => [
'active' => '<string>',
'background' => '<string>',
'hover' => '<string>'
],
'border' => [
'borderWidth' => 10,
'color' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'enabled' => true
],
'fontWeight' => 100,
'textColor' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
]
]
],
'checklist' => [
'checkmarkColor' => '<string>',
'placement' => [
'positionOffsetX' => 500,
'positionOffsetY' => 500
],
'width' => 550,
'zIndex' => 123
],
'checklistLauncher' => [
'borderRadius' => 50,
'color' => [
'active' => '<string>',
'background' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'counter' => [
'background' => '<string>',
'color' => '<string>'
],
'fontWeight' => 100,
'height' => 105,
'placement' => [
'positionOffsetX' => 500,
'positionOffsetY' => 500
]
],
'customCss' => '<string>',
'focusHighlight' => [
'color' => '<string>',
'opacity' => 50
],
'font' => [
'customFontFamily' => '<string>',
'fontFamily' => '<string>',
'fontSize' => 30,
'fontWeightBold' => 100,
'fontWeightNormal' => 100,
'h1FontSize' => 55,
'h2FontSize' => 55,
'lineHeight' => 30,
'linkColor' => '<string>'
],
'launcherBeacon' => [
'color' => '<string>',
'size' => 50.5
],
'launcherButtons' => [
'borderRadius' => 50,
'height' => 100.5,
'primary' => [
'backgroundColor' => [
'active' => '<string>',
'background' => '<string>',
'hover' => '<string>'
],
'border' => [
'borderWidth' => 50,
'color' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'enabled' => true
],
'fontWeight' => 100,
'textColor' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
]
],
'px' => 50,
'width' => 100.5
],
'launcherIcon' => [
'color' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'opacity' => 50,
'size' => 100.5
],
'mainColor' => [
'active' => '<string>',
'background' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'modal' => [
'padding' => 50,
'width' => 550
],
'progress' => [
'chainRoundedHeight' => 5.5,
'chainSquaredHeight' => 5.5,
'color' => '<string>',
'dotsHeight' => 5.5,
'enabled' => true,
'height' => 5,
'narrowHeight' => 5.5,
'numberedHeight' => 50.5
],
'resourceCenter' => [
'headerBackground' => [
'color' => '<string>',
'gradientFrom' => '<string>',
'gradientTo' => '<string>',
'imageUrl' => '<string>'
],
'largeWidth' => 1050,
'maxHeight' => 1050,
'normalWidth' => 550,
'offsetX' => 500,
'offsetY' => 500,
'transitionDuration' => 5000,
'zIndex' => 123,
'dividerLines' => true,
'logoUrl' => '<string>'
],
'resourceCenterLauncherButton' => [
'borderRadius' => 50,
'color' => [
'active' => '<string>',
'background' => '<string>',
'foreground' => '<string>',
'hover' => '<string>'
],
'height' => 105,
'imageHeight' => 105,
'iconUrl' => '<string>'
],
'resourceCenterUnreadBadge' => [
'backgroundColor' => '<string>',
'textColor' => '<string>'
],
'survey' => [
'color' => '<string>'
],
'tooltip' => [
'missingTargetTolerance' => 5,
'notchSize' => 52.5,
'width' => 550
],
'xbutton' => [
'color' => '<string>'
]
],
'variations' => [
[
'name' => '<string>',
'conditions' => [
[
'type' => 'group',
'conditions' => '<array>'
]
],
'id' => '<string>',
'settings' => [
'announcement' => [
'bubbleWidth' => 550,
'modalWidth' => 550
],
'avatar' => [
'size' => 105,
'url' => '<string>',
'name' => '<string>'
],
'backdrop' => [
'color' => '<string>',
'highlight' => [
'color' => '<string>',
'opacity' => 50,
'radius' => 50,
'spread' => 50
],
'opacity' => 50
],
'banner' => [
'animationDuration' => 5000,
'backgroundColor' => [
'background' => '<string>'
],
'padding' => 50,
'textColor' => [
'color' => '<string>'
]
],
'border' => [
'borderColor' => '<string>',
'borderRadius' => 1,
'borderWidth' => 25,
'borderWidthEnabled' => true
],
'brandColor' => [
'active' => '<string>',
'background' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'bubble' => [
'placement' => [
'positionOffsetX' => 0,
'positionOffsetY' => 0
],
'width' => 550
],
'buttons' => [
'borderRadius' => 50,
'height' => 50.5,
'minWidth' => 250,
'primary' => [
'backgroundColor' => [
'active' => '<string>',
'background' => '<string>',
'hover' => '<string>'
],
'border' => [
'borderWidth' => 10,
'color' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'enabled' => true
],
'fontWeight' => 100,
'textColor' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
]
],
'px' => 50,
'secondary' => [
'backgroundColor' => [
'active' => '<string>',
'background' => '<string>',
'hover' => '<string>'
],
'border' => [
'borderWidth' => 10,
'color' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'enabled' => true
],
'fontWeight' => 100,
'textColor' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
]
]
],
'checklist' => [
'checkmarkColor' => '<string>',
'placement' => [
'positionOffsetX' => 500,
'positionOffsetY' => 500
],
'width' => 550,
'zIndex' => 123
],
'checklistLauncher' => [
'borderRadius' => 50,
'color' => [
'active' => '<string>',
'background' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'counter' => [
'background' => '<string>',
'color' => '<string>'
],
'fontWeight' => 100,
'height' => 105,
'placement' => [
'positionOffsetX' => 500,
'positionOffsetY' => 500
]
],
'customCss' => '<string>',
'focusHighlight' => [
'color' => '<string>',
'opacity' => 50
],
'font' => [
'customFontFamily' => '<string>',
'fontFamily' => '<string>',
'fontSize' => 30,
'fontWeightBold' => 100,
'fontWeightNormal' => 100,
'h1FontSize' => 55,
'h2FontSize' => 55,
'lineHeight' => 30,
'linkColor' => '<string>'
],
'launcherBeacon' => [
'color' => '<string>',
'size' => 50.5
],
'launcherButtons' => [
'borderRadius' => 50,
'height' => 100.5,
'primary' => [
'backgroundColor' => [
'active' => '<string>',
'background' => '<string>',
'hover' => '<string>'
],
'border' => [
'borderWidth' => 50,
'color' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'enabled' => true
],
'fontWeight' => 100,
'textColor' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
]
],
'px' => 50,
'width' => 100.5
],
'launcherIcon' => [
'color' => [
'active' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'opacity' => 50,
'size' => 100.5
],
'mainColor' => [
'active' => '<string>',
'background' => '<string>',
'color' => '<string>',
'hover' => '<string>'
],
'modal' => [
'padding' => 50,
'width' => 550
],
'progress' => [
'chainRoundedHeight' => 5.5,
'chainSquaredHeight' => 5.5,
'color' => '<string>',
'dotsHeight' => 5.5,
'enabled' => true,
'height' => 5,
'narrowHeight' => 5.5,
'numberedHeight' => 50.5
],
'resourceCenter' => [
'headerBackground' => [
'color' => '<string>',
'gradientFrom' => '<string>',
'gradientTo' => '<string>',
'imageUrl' => '<string>'
],
'largeWidth' => 1050,
'maxHeight' => 1050,
'normalWidth' => 550,
'offsetX' => 500,
'offsetY' => 500,
'transitionDuration' => 5000,
'zIndex' => 123,
'dividerLines' => true,
'logoUrl' => '<string>'
],
'resourceCenterLauncherButton' => [
'borderRadius' => 50,
'color' => [
'active' => '<string>',
'background' => '<string>',
'foreground' => '<string>',
'hover' => '<string>'
],
'height' => 105,
'imageHeight' => 105,
'iconUrl' => '<string>'
],
'resourceCenterUnreadBadge' => [
'backgroundColor' => '<string>',
'textColor' => '<string>'
],
'survey' => [
'color' => '<string>'
],
'tooltip' => [
'missingTargetTolerance' => 5,
'notchSize' => 52.5,
'width' => 550
],
'xbutton' => [
'color' => '<string>'
]
]
]
]
]),
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.usertour.io/v2/projects/{projectId}/themes"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"isDefault\": true,\n \"settings\": {\n \"announcement\": {\n \"bubbleWidth\": 550,\n \"modalWidth\": 550\n },\n \"avatar\": {\n \"size\": 105,\n \"url\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"backdrop\": {\n \"color\": \"<string>\",\n \"highlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50,\n \"radius\": 50,\n \"spread\": 50\n },\n \"opacity\": 50\n },\n \"banner\": {\n \"animationDuration\": 5000,\n \"backgroundColor\": {\n \"background\": \"<string>\"\n },\n \"padding\": 50,\n \"textColor\": {\n \"color\": \"<string>\"\n }\n },\n \"border\": {\n \"borderColor\": \"<string>\",\n \"borderRadius\": 1,\n \"borderWidth\": 25,\n \"borderWidthEnabled\": true\n },\n \"brandColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"bubble\": {\n \"placement\": {\n \"positionOffsetX\": 0,\n \"positionOffsetY\": 0\n },\n \"width\": 550\n },\n \"buttons\": {\n \"borderRadius\": 50,\n \"height\": 50.5,\n \"minWidth\": 250,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"secondary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n }\n },\n \"checklist\": {\n \"checkmarkColor\": \"<string>\",\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n },\n \"width\": 550,\n \"zIndex\": 123\n },\n \"checklistLauncher\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"counter\": {\n \"background\": \"<string>\",\n \"color\": \"<string>\"\n },\n \"fontWeight\": 100,\n \"height\": 105,\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n }\n },\n \"customCss\": \"<string>\",\n \"focusHighlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50\n },\n \"font\": {\n \"customFontFamily\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": 30,\n \"fontWeightBold\": 100,\n \"fontWeightNormal\": 100,\n \"h1FontSize\": 55,\n \"h2FontSize\": 55,\n \"lineHeight\": 30,\n \"linkColor\": \"<string>\"\n },\n \"launcherBeacon\": {\n \"color\": \"<string>\",\n \"size\": 50.5\n },\n \"launcherButtons\": {\n \"borderRadius\": 50,\n \"height\": 100.5,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"width\": 100.5\n },\n \"launcherIcon\": {\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"opacity\": 50,\n \"size\": 100.5\n },\n \"mainColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"modal\": {\n \"padding\": 50,\n \"width\": 550\n },\n \"progress\": {\n \"chainRoundedHeight\": 5.5,\n \"chainSquaredHeight\": 5.5,\n \"color\": \"<string>\",\n \"dotsHeight\": 5.5,\n \"enabled\": true,\n \"height\": 5,\n \"narrowHeight\": 5.5,\n \"numberedHeight\": 50.5\n },\n \"resourceCenter\": {\n \"headerBackground\": {\n \"color\": \"<string>\",\n \"gradientFrom\": \"<string>\",\n \"gradientTo\": \"<string>\",\n \"imageUrl\": \"<string>\"\n },\n \"largeWidth\": 1050,\n \"maxHeight\": 1050,\n \"normalWidth\": 550,\n \"offsetX\": 500,\n \"offsetY\": 500,\n \"transitionDuration\": 5000,\n \"zIndex\": 123,\n \"dividerLines\": true,\n \"logoUrl\": \"<string>\"\n },\n \"resourceCenterLauncherButton\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"foreground\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"height\": 105,\n \"imageHeight\": 105,\n \"iconUrl\": \"<string>\"\n },\n \"resourceCenterUnreadBadge\": {\n \"backgroundColor\": \"<string>\",\n \"textColor\": \"<string>\"\n },\n \"survey\": {\n \"color\": \"<string>\"\n },\n \"tooltip\": {\n \"missingTargetTolerance\": 5,\n \"notchSize\": 52.5,\n \"width\": 550\n },\n \"xbutton\": {\n \"color\": \"<string>\"\n }\n },\n \"variations\": [\n {\n \"name\": \"<string>\",\n \"conditions\": [\n {\n \"type\": \"group\",\n \"conditions\": \"<array>\"\n }\n ],\n \"id\": \"<string>\",\n \"settings\": {\n \"announcement\": {\n \"bubbleWidth\": 550,\n \"modalWidth\": 550\n },\n \"avatar\": {\n \"size\": 105,\n \"url\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"backdrop\": {\n \"color\": \"<string>\",\n \"highlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50,\n \"radius\": 50,\n \"spread\": 50\n },\n \"opacity\": 50\n },\n \"banner\": {\n \"animationDuration\": 5000,\n \"backgroundColor\": {\n \"background\": \"<string>\"\n },\n \"padding\": 50,\n \"textColor\": {\n \"color\": \"<string>\"\n }\n },\n \"border\": {\n \"borderColor\": \"<string>\",\n \"borderRadius\": 1,\n \"borderWidth\": 25,\n \"borderWidthEnabled\": true\n },\n \"brandColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"bubble\": {\n \"placement\": {\n \"positionOffsetX\": 0,\n \"positionOffsetY\": 0\n },\n \"width\": 550\n },\n \"buttons\": {\n \"borderRadius\": 50,\n \"height\": 50.5,\n \"minWidth\": 250,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"secondary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n }\n },\n \"checklist\": {\n \"checkmarkColor\": \"<string>\",\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n },\n \"width\": 550,\n \"zIndex\": 123\n },\n \"checklistLauncher\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"counter\": {\n \"background\": \"<string>\",\n \"color\": \"<string>\"\n },\n \"fontWeight\": 100,\n \"height\": 105,\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n }\n },\n \"customCss\": \"<string>\",\n \"focusHighlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50\n },\n \"font\": {\n \"customFontFamily\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": 30,\n \"fontWeightBold\": 100,\n \"fontWeightNormal\": 100,\n \"h1FontSize\": 55,\n \"h2FontSize\": 55,\n \"lineHeight\": 30,\n \"linkColor\": \"<string>\"\n },\n \"launcherBeacon\": {\n \"color\": \"<string>\",\n \"size\": 50.5\n },\n \"launcherButtons\": {\n \"borderRadius\": 50,\n \"height\": 100.5,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"width\": 100.5\n },\n \"launcherIcon\": {\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"opacity\": 50,\n \"size\": 100.5\n },\n \"mainColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"modal\": {\n \"padding\": 50,\n \"width\": 550\n },\n \"progress\": {\n \"chainRoundedHeight\": 5.5,\n \"chainSquaredHeight\": 5.5,\n \"color\": \"<string>\",\n \"dotsHeight\": 5.5,\n \"enabled\": true,\n \"height\": 5,\n \"narrowHeight\": 5.5,\n \"numberedHeight\": 50.5\n },\n \"resourceCenter\": {\n \"headerBackground\": {\n \"color\": \"<string>\",\n \"gradientFrom\": \"<string>\",\n \"gradientTo\": \"<string>\",\n \"imageUrl\": \"<string>\"\n },\n \"largeWidth\": 1050,\n \"maxHeight\": 1050,\n \"normalWidth\": 550,\n \"offsetX\": 500,\n \"offsetY\": 500,\n \"transitionDuration\": 5000,\n \"zIndex\": 123,\n \"dividerLines\": true,\n \"logoUrl\": \"<string>\"\n },\n \"resourceCenterLauncherButton\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"foreground\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"height\": 105,\n \"imageHeight\": 105,\n \"iconUrl\": \"<string>\"\n },\n \"resourceCenterUnreadBadge\": {\n \"backgroundColor\": \"<string>\",\n \"textColor\": \"<string>\"\n },\n \"survey\": {\n \"color\": \"<string>\"\n },\n \"tooltip\": {\n \"missingTargetTolerance\": 5,\n \"notchSize\": 52.5,\n \"width\": 550\n },\n \"xbutton\": {\n \"color\": \"<string>\"\n }\n }\n }\n ]\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.usertour.io/v2/projects/{projectId}/themes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"isDefault\": true,\n \"settings\": {\n \"announcement\": {\n \"bubbleWidth\": 550,\n \"modalWidth\": 550\n },\n \"avatar\": {\n \"size\": 105,\n \"url\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"backdrop\": {\n \"color\": \"<string>\",\n \"highlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50,\n \"radius\": 50,\n \"spread\": 50\n },\n \"opacity\": 50\n },\n \"banner\": {\n \"animationDuration\": 5000,\n \"backgroundColor\": {\n \"background\": \"<string>\"\n },\n \"padding\": 50,\n \"textColor\": {\n \"color\": \"<string>\"\n }\n },\n \"border\": {\n \"borderColor\": \"<string>\",\n \"borderRadius\": 1,\n \"borderWidth\": 25,\n \"borderWidthEnabled\": true\n },\n \"brandColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"bubble\": {\n \"placement\": {\n \"positionOffsetX\": 0,\n \"positionOffsetY\": 0\n },\n \"width\": 550\n },\n \"buttons\": {\n \"borderRadius\": 50,\n \"height\": 50.5,\n \"minWidth\": 250,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"secondary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n }\n },\n \"checklist\": {\n \"checkmarkColor\": \"<string>\",\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n },\n \"width\": 550,\n \"zIndex\": 123\n },\n \"checklistLauncher\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"counter\": {\n \"background\": \"<string>\",\n \"color\": \"<string>\"\n },\n \"fontWeight\": 100,\n \"height\": 105,\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n }\n },\n \"customCss\": \"<string>\",\n \"focusHighlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50\n },\n \"font\": {\n \"customFontFamily\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": 30,\n \"fontWeightBold\": 100,\n \"fontWeightNormal\": 100,\n \"h1FontSize\": 55,\n \"h2FontSize\": 55,\n \"lineHeight\": 30,\n \"linkColor\": \"<string>\"\n },\n \"launcherBeacon\": {\n \"color\": \"<string>\",\n \"size\": 50.5\n },\n \"launcherButtons\": {\n \"borderRadius\": 50,\n \"height\": 100.5,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"width\": 100.5\n },\n \"launcherIcon\": {\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"opacity\": 50,\n \"size\": 100.5\n },\n \"mainColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"modal\": {\n \"padding\": 50,\n \"width\": 550\n },\n \"progress\": {\n \"chainRoundedHeight\": 5.5,\n \"chainSquaredHeight\": 5.5,\n \"color\": \"<string>\",\n \"dotsHeight\": 5.5,\n \"enabled\": true,\n \"height\": 5,\n \"narrowHeight\": 5.5,\n \"numberedHeight\": 50.5\n },\n \"resourceCenter\": {\n \"headerBackground\": {\n \"color\": \"<string>\",\n \"gradientFrom\": \"<string>\",\n \"gradientTo\": \"<string>\",\n \"imageUrl\": \"<string>\"\n },\n \"largeWidth\": 1050,\n \"maxHeight\": 1050,\n \"normalWidth\": 550,\n \"offsetX\": 500,\n \"offsetY\": 500,\n \"transitionDuration\": 5000,\n \"zIndex\": 123,\n \"dividerLines\": true,\n \"logoUrl\": \"<string>\"\n },\n \"resourceCenterLauncherButton\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"foreground\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"height\": 105,\n \"imageHeight\": 105,\n \"iconUrl\": \"<string>\"\n },\n \"resourceCenterUnreadBadge\": {\n \"backgroundColor\": \"<string>\",\n \"textColor\": \"<string>\"\n },\n \"survey\": {\n \"color\": \"<string>\"\n },\n \"tooltip\": {\n \"missingTargetTolerance\": 5,\n \"notchSize\": 52.5,\n \"width\": 550\n },\n \"xbutton\": {\n \"color\": \"<string>\"\n }\n },\n \"variations\": [\n {\n \"name\": \"<string>\",\n \"conditions\": [\n {\n \"type\": \"group\",\n \"conditions\": \"<array>\"\n }\n ],\n \"id\": \"<string>\",\n \"settings\": {\n \"announcement\": {\n \"bubbleWidth\": 550,\n \"modalWidth\": 550\n },\n \"avatar\": {\n \"size\": 105,\n \"url\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"backdrop\": {\n \"color\": \"<string>\",\n \"highlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50,\n \"radius\": 50,\n \"spread\": 50\n },\n \"opacity\": 50\n },\n \"banner\": {\n \"animationDuration\": 5000,\n \"backgroundColor\": {\n \"background\": \"<string>\"\n },\n \"padding\": 50,\n \"textColor\": {\n \"color\": \"<string>\"\n }\n },\n \"border\": {\n \"borderColor\": \"<string>\",\n \"borderRadius\": 1,\n \"borderWidth\": 25,\n \"borderWidthEnabled\": true\n },\n \"brandColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"bubble\": {\n \"placement\": {\n \"positionOffsetX\": 0,\n \"positionOffsetY\": 0\n },\n \"width\": 550\n },\n \"buttons\": {\n \"borderRadius\": 50,\n \"height\": 50.5,\n \"minWidth\": 250,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"secondary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n }\n },\n \"checklist\": {\n \"checkmarkColor\": \"<string>\",\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n },\n \"width\": 550,\n \"zIndex\": 123\n },\n \"checklistLauncher\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"counter\": {\n \"background\": \"<string>\",\n \"color\": \"<string>\"\n },\n \"fontWeight\": 100,\n \"height\": 105,\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n }\n },\n \"customCss\": \"<string>\",\n \"focusHighlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50\n },\n \"font\": {\n \"customFontFamily\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": 30,\n \"fontWeightBold\": 100,\n \"fontWeightNormal\": 100,\n \"h1FontSize\": 55,\n \"h2FontSize\": 55,\n \"lineHeight\": 30,\n \"linkColor\": \"<string>\"\n },\n \"launcherBeacon\": {\n \"color\": \"<string>\",\n \"size\": 50.5\n },\n \"launcherButtons\": {\n \"borderRadius\": 50,\n \"height\": 100.5,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"width\": 100.5\n },\n \"launcherIcon\": {\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"opacity\": 50,\n \"size\": 100.5\n },\n \"mainColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"modal\": {\n \"padding\": 50,\n \"width\": 550\n },\n \"progress\": {\n \"chainRoundedHeight\": 5.5,\n \"chainSquaredHeight\": 5.5,\n \"color\": \"<string>\",\n \"dotsHeight\": 5.5,\n \"enabled\": true,\n \"height\": 5,\n \"narrowHeight\": 5.5,\n \"numberedHeight\": 50.5\n },\n \"resourceCenter\": {\n \"headerBackground\": {\n \"color\": \"<string>\",\n \"gradientFrom\": \"<string>\",\n \"gradientTo\": \"<string>\",\n \"imageUrl\": \"<string>\"\n },\n \"largeWidth\": 1050,\n \"maxHeight\": 1050,\n \"normalWidth\": 550,\n \"offsetX\": 500,\n \"offsetY\": 500,\n \"transitionDuration\": 5000,\n \"zIndex\": 123,\n \"dividerLines\": true,\n \"logoUrl\": \"<string>\"\n },\n \"resourceCenterLauncherButton\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"foreground\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"height\": 105,\n \"imageHeight\": 105,\n \"iconUrl\": \"<string>\"\n },\n \"resourceCenterUnreadBadge\": {\n \"backgroundColor\": \"<string>\",\n \"textColor\": \"<string>\"\n },\n \"survey\": {\n \"color\": \"<string>\"\n },\n \"tooltip\": {\n \"missingTargetTolerance\": 5,\n \"notchSize\": 52.5,\n \"width\": 550\n },\n \"xbutton\": {\n \"color\": \"<string>\"\n }\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usertour.io/v2/projects/{projectId}/themes")
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 \"name\": \"<string>\",\n \"isDefault\": true,\n \"settings\": {\n \"announcement\": {\n \"bubbleWidth\": 550,\n \"modalWidth\": 550\n },\n \"avatar\": {\n \"size\": 105,\n \"url\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"backdrop\": {\n \"color\": \"<string>\",\n \"highlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50,\n \"radius\": 50,\n \"spread\": 50\n },\n \"opacity\": 50\n },\n \"banner\": {\n \"animationDuration\": 5000,\n \"backgroundColor\": {\n \"background\": \"<string>\"\n },\n \"padding\": 50,\n \"textColor\": {\n \"color\": \"<string>\"\n }\n },\n \"border\": {\n \"borderColor\": \"<string>\",\n \"borderRadius\": 1,\n \"borderWidth\": 25,\n \"borderWidthEnabled\": true\n },\n \"brandColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"bubble\": {\n \"placement\": {\n \"positionOffsetX\": 0,\n \"positionOffsetY\": 0\n },\n \"width\": 550\n },\n \"buttons\": {\n \"borderRadius\": 50,\n \"height\": 50.5,\n \"minWidth\": 250,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"secondary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n }\n },\n \"checklist\": {\n \"checkmarkColor\": \"<string>\",\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n },\n \"width\": 550,\n \"zIndex\": 123\n },\n \"checklistLauncher\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"counter\": {\n \"background\": \"<string>\",\n \"color\": \"<string>\"\n },\n \"fontWeight\": 100,\n \"height\": 105,\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n }\n },\n \"customCss\": \"<string>\",\n \"focusHighlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50\n },\n \"font\": {\n \"customFontFamily\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": 30,\n \"fontWeightBold\": 100,\n \"fontWeightNormal\": 100,\n \"h1FontSize\": 55,\n \"h2FontSize\": 55,\n \"lineHeight\": 30,\n \"linkColor\": \"<string>\"\n },\n \"launcherBeacon\": {\n \"color\": \"<string>\",\n \"size\": 50.5\n },\n \"launcherButtons\": {\n \"borderRadius\": 50,\n \"height\": 100.5,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"width\": 100.5\n },\n \"launcherIcon\": {\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"opacity\": 50,\n \"size\": 100.5\n },\n \"mainColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"modal\": {\n \"padding\": 50,\n \"width\": 550\n },\n \"progress\": {\n \"chainRoundedHeight\": 5.5,\n \"chainSquaredHeight\": 5.5,\n \"color\": \"<string>\",\n \"dotsHeight\": 5.5,\n \"enabled\": true,\n \"height\": 5,\n \"narrowHeight\": 5.5,\n \"numberedHeight\": 50.5\n },\n \"resourceCenter\": {\n \"headerBackground\": {\n \"color\": \"<string>\",\n \"gradientFrom\": \"<string>\",\n \"gradientTo\": \"<string>\",\n \"imageUrl\": \"<string>\"\n },\n \"largeWidth\": 1050,\n \"maxHeight\": 1050,\n \"normalWidth\": 550,\n \"offsetX\": 500,\n \"offsetY\": 500,\n \"transitionDuration\": 5000,\n \"zIndex\": 123,\n \"dividerLines\": true,\n \"logoUrl\": \"<string>\"\n },\n \"resourceCenterLauncherButton\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"foreground\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"height\": 105,\n \"imageHeight\": 105,\n \"iconUrl\": \"<string>\"\n },\n \"resourceCenterUnreadBadge\": {\n \"backgroundColor\": \"<string>\",\n \"textColor\": \"<string>\"\n },\n \"survey\": {\n \"color\": \"<string>\"\n },\n \"tooltip\": {\n \"missingTargetTolerance\": 5,\n \"notchSize\": 52.5,\n \"width\": 550\n },\n \"xbutton\": {\n \"color\": \"<string>\"\n }\n },\n \"variations\": [\n {\n \"name\": \"<string>\",\n \"conditions\": [\n {\n \"type\": \"group\",\n \"conditions\": \"<array>\"\n }\n ],\n \"id\": \"<string>\",\n \"settings\": {\n \"announcement\": {\n \"bubbleWidth\": 550,\n \"modalWidth\": 550\n },\n \"avatar\": {\n \"size\": 105,\n \"url\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"backdrop\": {\n \"color\": \"<string>\",\n \"highlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50,\n \"radius\": 50,\n \"spread\": 50\n },\n \"opacity\": 50\n },\n \"banner\": {\n \"animationDuration\": 5000,\n \"backgroundColor\": {\n \"background\": \"<string>\"\n },\n \"padding\": 50,\n \"textColor\": {\n \"color\": \"<string>\"\n }\n },\n \"border\": {\n \"borderColor\": \"<string>\",\n \"borderRadius\": 1,\n \"borderWidth\": 25,\n \"borderWidthEnabled\": true\n },\n \"brandColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"bubble\": {\n \"placement\": {\n \"positionOffsetX\": 0,\n \"positionOffsetY\": 0\n },\n \"width\": 550\n },\n \"buttons\": {\n \"borderRadius\": 50,\n \"height\": 50.5,\n \"minWidth\": 250,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"secondary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 10,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n }\n },\n \"checklist\": {\n \"checkmarkColor\": \"<string>\",\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n },\n \"width\": 550,\n \"zIndex\": 123\n },\n \"checklistLauncher\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"counter\": {\n \"background\": \"<string>\",\n \"color\": \"<string>\"\n },\n \"fontWeight\": 100,\n \"height\": 105,\n \"placement\": {\n \"positionOffsetX\": 500,\n \"positionOffsetY\": 500\n }\n },\n \"customCss\": \"<string>\",\n \"focusHighlight\": {\n \"color\": \"<string>\",\n \"opacity\": 50\n },\n \"font\": {\n \"customFontFamily\": \"<string>\",\n \"fontFamily\": \"<string>\",\n \"fontSize\": 30,\n \"fontWeightBold\": 100,\n \"fontWeightNormal\": 100,\n \"h1FontSize\": 55,\n \"h2FontSize\": 55,\n \"lineHeight\": 30,\n \"linkColor\": \"<string>\"\n },\n \"launcherBeacon\": {\n \"color\": \"<string>\",\n \"size\": 50.5\n },\n \"launcherButtons\": {\n \"borderRadius\": 50,\n \"height\": 100.5,\n \"primary\": {\n \"backgroundColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"border\": {\n \"borderWidth\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"enabled\": true\n },\n \"fontWeight\": 100,\n \"textColor\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n }\n },\n \"px\": 50,\n \"width\": 100.5\n },\n \"launcherIcon\": {\n \"color\": {\n \"active\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"opacity\": 50,\n \"size\": 100.5\n },\n \"mainColor\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"color\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"modal\": {\n \"padding\": 50,\n \"width\": 550\n },\n \"progress\": {\n \"chainRoundedHeight\": 5.5,\n \"chainSquaredHeight\": 5.5,\n \"color\": \"<string>\",\n \"dotsHeight\": 5.5,\n \"enabled\": true,\n \"height\": 5,\n \"narrowHeight\": 5.5,\n \"numberedHeight\": 50.5\n },\n \"resourceCenter\": {\n \"headerBackground\": {\n \"color\": \"<string>\",\n \"gradientFrom\": \"<string>\",\n \"gradientTo\": \"<string>\",\n \"imageUrl\": \"<string>\"\n },\n \"largeWidth\": 1050,\n \"maxHeight\": 1050,\n \"normalWidth\": 550,\n \"offsetX\": 500,\n \"offsetY\": 500,\n \"transitionDuration\": 5000,\n \"zIndex\": 123,\n \"dividerLines\": true,\n \"logoUrl\": \"<string>\"\n },\n \"resourceCenterLauncherButton\": {\n \"borderRadius\": 50,\n \"color\": {\n \"active\": \"<string>\",\n \"background\": \"<string>\",\n \"foreground\": \"<string>\",\n \"hover\": \"<string>\"\n },\n \"height\": 105,\n \"imageHeight\": 105,\n \"iconUrl\": \"<string>\"\n },\n \"resourceCenterUnreadBadge\": {\n \"backgroundColor\": \"<string>\",\n \"textColor\": \"<string>\"\n },\n \"survey\": {\n \"color\": \"<string>\"\n },\n \"tooltip\": {\n \"missingTargetTolerance\": 5,\n \"notchSize\": 52.5,\n \"width\": 550\n },\n \"xbutton\": {\n \"color\": \"<string>\"\n }\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "theme",
"name": "<string>",
"isDefault": true,
"isSystem": true,
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"variationCount": 0,
"settings": {},
"resolvedSettings": {},
"variations": [
{
"id": "<string>",
"name": "<string>",
"conditions": [
{
"type": "group",
"conditions": "<array>"
}
],
"settings": {}
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Project ID
Body
Theme name.
1Make this the project default theme.
Partial theme styling merged onto the built-in default styling (a new theme starts from it) (colors, fonts, sizes, …). Send only the fields you change; omitted fields are kept. This is pure INTENT: Auto-capable color fields take a hex or the literal "Auto" (derived at render); read what "Auto" resolves to with expand: ["resolvedSettings"].
Show child attributes
Show child attributes
Conditional variations — FULL replacement of the list when present (a variation you omit is deleted; omit the field entirely to leave variations untouched). Array order is evaluation priority.
Show child attributes
Show child attributes
Response
Theme created
theme Built-in theme: read-only — it cannot be updated or deleted (duplicating it into your own theme is the way to start from it). It CAN be made the project default.
How many conditional variations this theme carries (always present, no expand needed). Check it BEFORE pointing content at another theme: variations do NOT travel with the content, so moving from a theme with variations to one with 0 silently drops the conditional styling (e.g. dark mode) for every user those conditions targeted — nothing errors. Read the variations themselves with expand: ["variations"].
-9007199254740991 <= x <= 9007199254740991Stored style INTENT — the same shape as the create/update settings body (that write schema is the field dictionary); Auto-capable colors read back as the literal "Auto".
Show child attributes
Show child attributes
Read-only render resolution of settings (the shared derivation the SDK runs). Two transformations: every "Auto" is replaced by the concrete derived color, and font.fontFamily is rewritten to the real font stack ("System font" → the system stack, "Custom font" → the customFontFamily value, named fonts gain a sans-serif fallback). Same field set as settings (stored settings are grounded complete at write) — differences between the two are exactly these derivations, so diff against the settings you wrote, not this, to find your edits. Request with expand: ["resolvedSettings"]. Not writable — author intent in settings.
Show child attributes
Show child attributes
Show child attributes
Show child attributes