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
1. Link and Launch
Endpoint:
PATCH https://api.kameleoon.com/experiments/{experimentId}?action=ACTIVATE
Name | Type | Description |
---|---|---|
targetingSegmentId | String | Segment ID to link. |
goals | Array | Goal IDs to link. |
deviations | Object | Traffic allocation between control and variations. |
mainGoalId | String | Main goal ID. |
status | String | Experiment 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:
This completes the process: you’ve created, configured, and launched an experiment using the Automation API.