Skip to main content
PATCH
/
templates
/
{templateId}
Partially update template
curl --request PATCH \
  --url https://api.kameleoon.com/templates/{templateId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "config": "<string>",
  "description": "<string>",
  "isCustomTemplate": true,
  "name": "<string>",
  "siteId": 123,
  "status": "DRAFT",
  "tags": [
    "<string>"
  ],
  "templateCssCode": "<string>",
  "templateHtmlCode": "<string>",
  "templateJavaScriptCode": "<string>",
  "themeId": 123,
  "type": "TEMPLATE",
  "uiCssCode": "<string>",
  "uiHtmlCode": "<string>",
  "url": "<string>",
  "useCustomData": true,
  "widgetEditorTemplate": "<string>"
}
'
{
  "siteId": 123,
  "config": "<string>",
  "cssCode": "<string>",
  "dateActivated": "2023-11-07T05:31:56Z",
  "dateCreated": "2023-11-07T05:31:56Z",
  "dateModified": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "htmlCode": "<string>",
  "id": 123,
  "isCustomTemplate": true,
  "name": "<string>",
  "status": "DRAFT",
  "tags": [
    "<string>"
  ],
  "templateCssCode": "<string>",
  "templateHtmlCode": "<string>",
  "templateJavaScriptCode": "<string>",
  "themeId": 123,
  "type": "TEMPLATE",
  "url": "<string>",
  "useCustomData": true,
  "widgetEditorTemplate": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Path Parameters

templateId
integer<int64>
required

The Id of the template object

Body

application/json
config
string

The widget editor configuration field is connected to the translation locales field in JSON format

description
string

Description of the template

isCustomTemplate
boolean

Iindicates if a custom template is being used

name
string

Name of the template

siteId
integer<int64>

Site Id of the project this widget belongs to

status
enum<string>

Template status

Available options:
DRAFT,
ACTIVE,
PAUSED
surveyDataConfig
object

Configuration settings for survey data collection.

tags
string[]

Tags that belong to this template

Tags that belong to this template

templateCssCode
string

CSS code that belongs to this template

templateHtmlCode
string

HTML code that belongs to this template

templateJavaScriptCode
string

JavaScript code that belongs to this template

themeId
integer<int64>

Id of the theme linked to the widget.

type
enum<string>

Type of template

Available options:
TEMPLATE,
EDITOR
uiCssCode
string

UI CSS code that belongs to this template

uiHtmlCode
string

UI HTML code belongs to this template

url
string

Url belonging to this template

useCustomData
boolean

Indicates if custom data is being used

widgetEditorTemplate
string

Widget editor code that belongs to this template

Response

OK

siteId
integer<int64>
required

Web Id of the studio template.

config
string

Widget editor configuration field linked to the translation locales field in JSON format.

cssCode
string

CSS that belongs to this template.

dateActivated
string<date-time>
read-only

Date when the widget was activated.

dateCreated
string<date-time>
read-only

Date when this widget was created

dateModified
string<date-time>
read-only

Date when this widget was modified

description
string

Description of the template.

htmlCode
string

UI text that belongs to this template.

id
integer<int64>
read-only

Unique Id of the template

isCustomTemplate
boolean

Indicates if this is a custom template.

name
string

Name of the template.

status
enum<string>

Template status.

Available options:
DRAFT,
ACTIVE,
PAUSED
tags
string[]

Tags that belong to this template.

Tags that belong to this template.

templateCssCode
string

CSS code that belongs to this template.

templateHtmlCode
string

HTML code that belongs to this template.

templateJavaScriptCode
string

JavaScript code that belongs to this template.

themeId
integer<int64>

Id of the theme linked to the widget.

type
enum<string>

Type of template.

Available options:
TEMPLATE,
EDITOR
url
string

Url associated with this template.

useCustomData
boolean

Indicates if custom data is being used.

widgetEditorTemplate
string

Widget editor code that belongs to this template.