Skip to main content

Requirements

  • access token
The Automation API requires an access token. Retrieve the token programmatically by following the instructions in the obtaining an access token section.

Goal

Update the variation (Variation 1) of the created experiment with:
Then change the text to “Updated Text”. See the API reference for code details. The update uses the Partial Update Variation endpoint.
  • variationId and experimentId
Find the IDs by selecting Experiment_1 in the dashboard:
Variation1

Steps

1. Inject the JavaScript code

Endpoint:
Example:

2. Verify the code injection

Check the Code Editor for Variation 1:
Variation1_dashboard
Variation1_code

3. Update the code

Change the text to “Updated Text”:

4. Verify the update

Refresh the editor to confirm the update:
Variation1_button