curl --request POST \
--url https://api.kameleoon.com/key-moments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Key Moment",
"siteId": 8372,
"audienceTracking": true,
"conditionDataList": [
{
"id": 123,
"logicalOperator": "AND",
"parentId": 123,
"targetingCondition": {
"targetingType": "PAGE_URL",
"weight": 1,
"count": 123,
"include": true,
"matchType": "EQUAL",
"unitOfTime": "SECOND"
}
}
],
"conditionDataTree": {
"targetingType": "<string>",
"logicalOperator": "AND"
},
"conditionsData": {
"firstLevel": [
{
"conditions": [
{
"targetingType": "PAGE_URL",
"weight": 1,
"count": 123,
"include": true,
"matchType": "EQUAL",
"unitOfTime": "SECOND"
}
],
"orOperators": [
true
]
}
],
"firstLevelOrOperators": [
true
]
},
"description": "The key moment is for new A/B tests",
"isFavorite": true
}
'{
"name": "My Key Moment",
"siteId": 8372,
"audienceTracking": true,
"audienceTrackingEditable": true,
"conditionDataList": [
{
"id": 123,
"isConditionBlock": true,
"logicalOperator": "AND",
"parentId": 123,
"targetingCondition": {
"targetingType": "PAGE_URL",
"weight": 1,
"count": 123,
"include": true,
"matchType": "EQUAL",
"unitOfTime": "SECOND",
"htmlDescription": "<string>",
"id": 123
}
}
],
"conditionDataTree": {
"targetingType": "<string>",
"conditionData": [
"<unknown>"
],
"isConditionBlock": true,
"logicalOperator": "AND"
},
"conditionsData": {
"firstLevel": [
{
"conditions": [
{
"targetingType": "PAGE_URL",
"weight": 1,
"count": 123,
"include": true,
"matchType": "EQUAL",
"unitOfTime": "SECOND",
"htmlDescription": "<string>",
"id": 123
}
],
"orOperators": [
true
]
}
],
"firstLevelOrOperators": [
true
]
},
"createdBy": 123,
"dateCreated": "2023-11-07T05:31:56Z",
"dateModified": "2023-11-07T05:31:56Z",
"description": "The key moment is for new A/B tests",
"id": 123,
"isFavorite": true
}Create a new key moment with the given parameters. Please note that keyMoment has now been renamed to Triggers in the Kameleoon app.
curl --request POST \
--url https://api.kameleoon.com/key-moments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Key Moment",
"siteId": 8372,
"audienceTracking": true,
"conditionDataList": [
{
"id": 123,
"logicalOperator": "AND",
"parentId": 123,
"targetingCondition": {
"targetingType": "PAGE_URL",
"weight": 1,
"count": 123,
"include": true,
"matchType": "EQUAL",
"unitOfTime": "SECOND"
}
}
],
"conditionDataTree": {
"targetingType": "<string>",
"logicalOperator": "AND"
},
"conditionsData": {
"firstLevel": [
{
"conditions": [
{
"targetingType": "PAGE_URL",
"weight": 1,
"count": 123,
"include": true,
"matchType": "EQUAL",
"unitOfTime": "SECOND"
}
],
"orOperators": [
true
]
}
],
"firstLevelOrOperators": [
true
]
},
"description": "The key moment is for new A/B tests",
"isFavorite": true
}
'{
"name": "My Key Moment",
"siteId": 8372,
"audienceTracking": true,
"audienceTrackingEditable": true,
"conditionDataList": [
{
"id": 123,
"isConditionBlock": true,
"logicalOperator": "AND",
"parentId": 123,
"targetingCondition": {
"targetingType": "PAGE_URL",
"weight": 1,
"count": 123,
"include": true,
"matchType": "EQUAL",
"unitOfTime": "SECOND",
"htmlDescription": "<string>",
"id": 123
}
}
],
"conditionDataTree": {
"targetingType": "<string>",
"conditionData": [
"<unknown>"
],
"isConditionBlock": true,
"logicalOperator": "AND"
},
"conditionsData": {
"firstLevel": [
{
"conditions": [
{
"targetingType": "PAGE_URL",
"weight": 1,
"count": 123,
"include": true,
"matchType": "EQUAL",
"unitOfTime": "SECOND",
"htmlDescription": "<string>",
"id": 123
}
],
"orOperators": [
true
]
}
],
"firstLevelOrOperators": [
true
]
},
"createdBy": 123,
"dateCreated": "2023-11-07T05:31:56Z",
"dateModified": "2023-11-07T05:31:56Z",
"description": "The key moment is for new A/B tests",
"id": 123,
"isFavorite": true
}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.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Name of the key moment
"My Key Moment"
Unique Id of the site where the key moment was, or will be created.
8372
Indicates if the key moment is used for tracking audience
Conditions upon which visitors will be included in the key moment in list form
Show child attributes
Conditions by which visitors will be segmented in tree form
Show child attributes
Conditions according to which visitors will be segmented
Show child attributes
Description of the key moment
"The key moment is for new A/B tests"
Indicates whether the key moment is a favorite
Created
Name of the key moment
"My Key Moment"
Unique Id of the site where the key moment was, or will be created.
8372
Indicates if the key moment is used for tracking audience
Indicates if audienceTracking can be enabled or disabled. In some cases, audienceTracking cannot be disabled. E.g. When a key moment has predictive conditions, audience will be tracked by default.
Conditions upon which visitors will be included in the key moment in list form
Show child attributes
Conditions by which visitors will be segmented in tree form
Show child attributes
Conditions according to which visitors will be segmented
Show child attributes
Account Id of the key moment creator
Date the key moment was created
Date the key moment was modified
Description of the key moment
"The key moment is for new A/B tests"
Unique Id of the key moment
Indicates whether the key moment is a favorite
Was this page helpful?