Skip to main content

Update the Experiment with Goal and Segment, Then Launch

Goal

We’ll now link the goal and segment to Experiment_1 and activate it.

Steps

Endpoint:

PATCH https://api.kameleoon.com/experiments/{experimentId}?action=ACTIVATE
NameTypeDescription
targetingSegmentIdStringSegment ID to link.
goalsArrayGoal IDs to link.
deviationsObjectTraffic allocation between control and variations.
mainGoalIdStringMain goal ID.
statusStringExperiment status (ONLINE, PAUSED, etc.).

Example:

curl -L -X PATCH 'https://api.kameleoon.com/experiments/283505?action=ACTIVATE' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
--data-raw '{
"targetingSegmentId": 298314,
"goals": [361517],
"deviations": {"origin": 0.5, "1053310": 0.5},
"mainGoalId": 361517,
"status": "ONLINE"
}'

2. Verify Launch

Refresh the dashboard. Experiment_1 should now display Online status:

Experiment_activated


This completes the process: you’ve created, configured, and launched an experiment using the Automation API.