For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update Experience

Updates an existing experience. This is a full PUT replacement — the entire experience configuration is replaced with the provided data.

All required fields must be included in every request. Any optional fields omitted will be reset to their defaults.

All nested entities (variations, key metrics, page targeting, audience) must include their id field from the original GET response. All fields are nested inside a single experience object in the request body.

Update experience

put

Updates an existing experience by ID. This is a full PUT replacement — the entire experience configuration is replaced with the provided data.

All required fields must be included in every request. Any optional fields omitted will be reset to their defaults.

Required Fields (inside experience)

  • id (UUID) — ID of the experience to update

  • name (string) — Name of the experience

  • type (string) — One of: "content/advanced", "content/onsiteEdits", "content/url", "content/theme", "content/template"

  • experienceAnalysis — Analysis configuration (includes analyticsViewType)

  • variations — Array of variation objects. Each variation must include its id.

  • experienceKeyMetrics — Array of key metric objects. Include id to preserve an existing metric; omit it to add a new one (an id is generated automatically). To attach a custom event as a key metric, set customEventId to an id from the custom events API — the per-experience custom-metric link is created automatically.

Optional Fields (inside experience)

  • description (string) — Description of the experience

  • currency — Currency display settings

  • previewPath (string) — URL path for previewing

  • audience — Audience targeting rules (must include id if provided)

    • excludeCurrency — Currency/geo-based visitor targeting. When exclude is true, only visitors matching the given currency (ISO 4217 code), are included in the experience; everyone else is excluded. Set currency to null (with exclude: false) to disable.

  • experiencePageTargeting — Array of page targeting rules (each must include id)

Important Notes

  • The experience must exist and belong to your organization

  • Updating a running experience may affect active visitors

  • Variation weights must sum to 100

  • Variations, page targeting, and audience filters must include their id field. Key metrics are the exception: omit id to add a new one, since a new metric has no existing id to reference.

  • Custom events already attached to the experience (experienceCustomMetrics) are kept on every update, whether or not they are key metrics. Removing a key metric does not detach its custom event.

Rate Limit: 50 requests per 30s window, refilling 25 tokens every 30s.

Authorizations
intelligems-access-tokenstringRequired

Intelligems external API access token.

Path parameters
experienceIdstringOptional
Body
Responses
200

OK

application/json
put/v25-10-beta/experiences/{experienceId}
curl --location --request PUT 'https://api.intelligems.io/v25-10-beta/experiences/a1a1a1a1-a1a1-1111-aaaa-aa1111111111' \
--header 'content-type: application/json' \
--header 'intelligems-access-token: YOUR_API_KEY' \
--data '{
  "experience": {
    "id": "a1a1a1a1-a1a1-1111-aaaa-aa1111111111",
    "name": "Theme Test - NEW",
    "type": "content/theme",
    "experienceAnalysis": {
      "analyticsViewType": "none"
    },
    "variations": [
      {
        "id": "11111111-1111-1111-1111-111111111111",
        "name": "Control test-data",
        "percentage": 60,
        "isControl": true,
        "order": 1,
        "redirects": [
          {
            "id": "a1111111-a111-1111-a111-a11111111111",
            "variationId": "11111111-1111-1111-1111-111111111111",
            "group": 1,
            "originUrl": "https://jerica-plus-store.myshopify.com",
            "destinationUrl": "https://jerica-plus-store.myshopify.com/",
            "queryParams": [
              {
                "key": "preview_theme_id",
                "value": "133068324949"
              }
            ],
            "filter": "matchesExactly",
            "redirectType": "fullReplacement",
            "redirectOnce": false,
            "skip": false,
            "isThemeTest": true,
            "isTemplateTest": false
          }
        ]
      },
      {
        "id": "aaaaaaaa-aaaa-1aaa-aaaa-aaaaaaaaaaaa",
        "name": "Variant - debut-vintage-theme",
        "percentage": 40,
        "isControl": false,
        "order": 2,
        "redirects": [
          {
            "id": "1aaaaaaa-1aaa-1aaa-1aaa-1aaaaaaaaaaa",
            "variationId": "aaaaaaaa-aaaa-1aaa-aaaa-aaaaaaaaaaaa",
            "group": 1,
            "originUrl": "https://jerica-plus-store.myshopify.com",
            "destinationUrl": "https://jerica-plus-store.myshopify.com/",
            "queryParams": [
              {
                "key": "preview_theme_id",
                "value": "133068292181"
              }
            ],
            "filter": "matchesExactly",
            "redirectType": "fullReplacement",
            "redirectOnce": false,
            "skip": false,
            "isThemeTest": true,
            "isTemplateTest": false
          }
        ]
      }
    ]
  }
}'
{
  "experience": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "isPreview": true,
    "description": "text",
    "devicePreview": {
      "device": "desktop",
      "path": "/"
    },
    "organizationId": "123e4567-e89b-12d3-a456-426614174000",
    "type": "content/advanced",
    "category": "experiment",
    "status": "pending",
    "testTypes": {
      "hasTestPricing": true,
      "hasTestShipping": true,
      "hasTestCampaign": true,
      "hasTestContent": true,
      "hasTestContentUrl": true,
      "hasTestContentAdvanced": true,
      "hasTestContentOnsite": true,
      "hasTestContentTemplate": true,
      "hasTestContentTheme": true,
      "hasTestOnsiteInjections": true,
      "hasTestCheckoutBlocks": true,
      "hasTestPostPurchase": true,
      "hasTestOnsiteUpsell": true
    },
    "experiencePageTargeting": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "filter": "equals",
        "filterType": "url",
        "value": "text",
        "order": 1,
        "expression": [
          {
            "query": {
              "key": "text",
              "value": "text",
              "filter": "equals",
              "type": "utm"
            },
            "operator": "and"
          }
        ],
        "experienceId": "123e4567-e89b-12d3-a456-426614174000"
      }
    ],
    "experienceProductTargeting": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "experienceId": "123e4567-e89b-12d3-a456-426614174000",
        "target": "productPage",
        "expression": [
          {
            "query": {
              "key": "productId",
              "value": "text",
              "filter": "includes",
              "type": "productId"
            },
            "operator": "and"
          }
        ]
      }
    ],
    "experienceActions": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "experienceId": "123e4567-e89b-12d3-a456-426614174000",
        "action": "start",
        "actionTs": 1,
        "performedBy": "text"
      }
    ],
    "experienceIntegrations": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "createdAtTs": 1,
        "integration": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "name": "Recharge",
          "description": "text",
          "enabled": true,
          "globalSettings": null,
          "apis": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "name": "text",
              "description": "text",
              "accessToken": "text",
              "scopes": [
                "read_experiments"
              ],
              "organization": {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "name": "text"
              }
            }
          ],
          "createdAtTs": 1,
          "lastUpdateTs": 1
        },
        "experienceSettings": null,
        "enabled": false
      }
    ],
    "experienceCustomMetrics": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "experienceId": "123e4567-e89b-12d3-a456-426614174000",
        "order": 1,
        "customEventId": "123e4567-e89b-12d3-a456-426614174000",
        "customEvent": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "identifier": "text",
          "name": "text",
          "description": "text",
          "eventCountLastDay": 1,
          "lastEventTs": 1,
          "error": "text",
          "createdAtTs": 1,
          "lastUpdateTs": 1,
          "archivedAtTs": 1,
          "applyToUrls": [
            {
              "matchBy": "equals",
              "value": "text",
              "error": "text"
            }
          ],
          "experiencesList": [
            "text"
          ],
          "type": "text",
          "settings": {}
        }
      }
    ],
    "experienceKeyMetrics": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "experienceId": "123e4567-e89b-12d3-a456-426614174000",
        "order": 1,
        "isPrimary": false,
        "standardEventId": "conversionRate",
        "experienceCustomMetricId": "123e4567-e89b-12d3-a456-426614174000"
      }
    ],
    "currency": {
      "code": "USD",
      "country": "text",
      "options": null,
      "symbol": "$",
      "suffix": "text"
    },
    "variations": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "experienceId": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "percentage": 1,
        "isControl": false,
        "order": 1,
        "priceChange": "text",
        "priceChangeUnit": "percent",
        "priceRoundingType": "none",
        "priceRoundingAmount": "text",
        "onsiteEdits": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "onsiteEditType": "html",
            "variationId": "123e4567-e89b-12d3-a456-426614174000",
            "find": "text",
            "title": "text",
            "isRegex": false,
            "replace": "",
            "querySelectors": [
              "text"
            ],
            "skip": false,
            "remove": false,
            "groupId": "text",
            "isHtml": false,
            "isImage": false,
            "insertType": "beforebegin",
            "createdAtUrl": "text",
            "createdAtTs": 1,
            "imageSearchUrl": "text",
            "source": "ai"
          }
        ],
        "onsiteInjections": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "variationId": "123e4567-e89b-12d3-a456-426614174000",
          "customCss": "text",
          "customJs": "text",
          "jsInjectionMode": {
            "type": "immediately",
            "timeout": 1
          },
          "source": "ai"
        },
        "offer": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "variationId": "123e4567-e89b-12d3-a456-426614174000",
          "enabled": false,
          "isTest": false,
          "isArchived": false,
          "name": "text",
          "unitType": "dollar",
          "discountType": "dollar",
          "tiers": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "minimumUnits": 1,
              "maximumUnits": 1,
              "unitDiscount": 1,
              "bxgyGetQuantity": 0,
              "discountTitle": "text",
              "giftWithPurchaseTitle": "text",
              "isFreeShipping": false,
              "isGiftWithPurchase": false,
              "giftWithPurchaseProductId": "text",
              "giftWithPurchaseVariantId": "text",
              "giftWithPurchaseVariantIds": [
                "text"
              ],
              "autoAddGiftWithPurchase": false,
              "giftWithPurchaseHandle": "text"
            }
          ],
          "maximumDollarDiscount": 1,
          "discountApplicationType": "tieredDiscount",
          "discountApplicationMethod": "perItem",
          "combinesWithIntelligems": true,
          "combinesWithShopify": true,
          "shouldRejectCodes": true,
          "shippingDiscount": {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "discountType": "percentage",
            "unitDiscount": 1,
            "rateFilter": {
              "type": "text",
              "amount": 1
            },
            "countryFilter": {
              "allow": [
                "text"
              ],
              "exclude": [
                "text"
              ]
            },
            "discountLabel": "text"
          },
          "requireSameItem": false,
          "bxgyGetProductScope": "all",
          "subscriptionApplicationType": "oneTime"
        },
        "offerId": "123e4567-e89b-12d3-a456-426614174000",
        "shippingRateGroups": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "groupType": "flatRate",
            "position": 1,
            "rates": [
              {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "name": "text",
                "amount": 1,
                "rateCode": "text",
                "rateType": "amount",
                "currency": "AED",
                "condition": {
                  "id": "123e4567-e89b-12d3-a456-426614174000",
                  "min": 0,
                  "max": 1,
                  "conditionType": "currency",
                  "unit": "g"
                },
                "description": "text"
              }
            ],
            "variationId": "123e4567-e89b-12d3-a456-426614174000",
            "scopes": [
              {
                "marketId": "text",
                "collectionIds": [
                  "text"
                ],
                "originLocationIds": [
                  "text"
                ]
              }
            ]
          }
        ],
        "excludeProducts": false,
        "includeProducts": false,
        "testExperienceId": "text",
        "functionSyncError": false,
        "redirects": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "group": 1,
            "variationId": "123e4567-e89b-12d3-a456-426614174000",
            "originUrl": "text",
            "destinationUrl": "text",
            "queryParams": [
              {
                "key": "text",
                "value": "text"
              }
            ],
            "skip": true,
            "isThemeTest": true,
            "isTemplateTest": true,
            "templateType": "404",
            "templateSuffixes": [
              "text"
            ],
            "redirectOnce": false,
            "filter": "matchesExactly",
            "find": "text",
            "redirectType": "fullReplacement"
          }
        ],
        "userInterfaces": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "isEnabled": true,
            "isArchived": false,
            "widget": {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "name": "text",
              "enabledSitewide": false,
              "parentId": "123e4567-e89b-12d3-a456-426614174000",
              "widgetType": "messageBoxPopup",
              "config": {
                "desktop": null,
                "mobile": null
              }
            },
            "widgetId": "text",
            "category": "quantityButtons",
            "variationId": "123e4567-e89b-12d3-a456-426614174000",
            "desktopVariables": null,
            "mobileVariables": null,
            "styleOverrides": null
          }
        ],
        "checkoutBlocks": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "variationId": "123e4567-e89b-12d3-a456-426614174000",
            "locationId": "text",
            "blockType": "text",
            "blockTemplate": "badgeList",
            "name": "text",
            "displayConditions": {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "expression": [
                {
                  "query": {
                    "key": "anything",
                    "type": "anything",
                    "filter": "includes",
                    "value": "text"
                  },
                  "operator": "and"
                }
              ]
            },
            "variables": {
              "headerText": "text",
              "items": [
                {
                  "order": 1,
                  "title": "text",
                  "subtitle": "text",
                  "type": "text",
                  "icon": "text",
                  "iconColor": "text",
                  "iconSize": "text",
                  "imageSize": 1,
                  "imageSizeUnit": "pixels",
                  "imageAspectRatio": "text",
                  "image": "text",
                  "mediaSpacing": "text"
                }
              ]
            },
            "styles": {
              "typography": {
                "header": {
                  "fontSize": "text",
                  "fontStyle": "text"
                },
                "itemTitle": {
                  "fontSize": "text",
                  "fontStyle": "text"
                },
                "itemSubtitle": {
                  "fontSize": "text",
                  "fontStyle": "text"
                }
              },
              "backgroundColors": {
                "header": "text",
                "item": "text",
                "block": "text"
              },
              "colors": {
                "headerText": "text",
                "itemTitleText": "text",
                "itemSubtitleText": "text"
              },
              "layout": {
                "headerTextAlign": "text",
                "bodyAlign": "text",
                "itemTextAlign": "text",
                "itemPositionAlign": "text",
                "rowCount": 1,
                "columnCount": 1
              },
              "appearance": {
                "headerBorderThickness": "text",
                "headerBorderStyle": "none",
                "headerCornerRadius": "text",
                "headerPadding": "text",
                "bodySpacing": "text",
                "headingToBodySpacing": "text",
                "blockBorderThickness": "text",
                "blockBorderStyle": "none",
                "blockPadding": "text",
                "blockCornerRadius": "text",
                "itemBorderThickness": "text",
                "itemBorderStyle": "none",
                "itemCornerRadius": "text",
                "itemTextSpacing": "text"
              }
            }
          }
        ],
        "cartTargeting": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "expression": [
              {
                "query": {
                  "key": "anything",
                  "type": "anything",
                  "filter": "includes",
                  "value": "text"
                },
                "operator": "and"
              }
            ]
          }
        ],
        "components": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "variationId": "123e4567-e89b-12d3-a456-426614174000",
            "config": {
              "type": "text",
              "placement": {
                "selector": "text",
                "insertType": "beforebegin",
                "anchorKey": "text",
                "location": "pdp"
              },
              "template": "text",
              "maxProductLimit": 1,
              "excludeOutOfStock": true,
              "excludeItemsInCart": true,
              "excludePdpProduct": true,
              "discount": {
                "discountType": "none",
                "discountValue": 1,
                "compareAtPriceDisplay": "none"
              },
              "rules": [
                {
                  "id": "text",
                  "priority": 1,
                  "action": [
                    {
                      "query": {
                        "key": "shopifyRecommendations",
                        "type": "shopifyRecommendations",
                        "filter": "includes",
                        "value": "text"
                      },
                      "operator": "and"
                    }
                  ],
                  "targeting": {
                    "type": "text",
                    "expression": [
                      {
                        "query": {
                          "key": "anything",
                          "type": "anything",
                          "filter": "includes",
                          "value": "text"
                        },
                        "operator": "and"
                      }
                    ]
                  }
                }
              ],
              "agenticLogicPlacementId": "123e4567-e89b-12d3-a456-426614174000",
              "agenticLogicRuleId": "123e4567-e89b-12d3-a456-426614174000"
            }
          }
        ]
      }
    ],
    "createdAtTs": 1,
    "isDeleted": true,
    "shippingTestMethodDefinitions": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "shippingModel": "text",
        "deliveryProfileId": "text",
        "deliveryLocationGroupId": "text",
        "deliveryZoneId": "text",
        "methodDefinitionId": "text",
        "canonicalMethodId": "text",
        "deleteTargetKind": "canonical_method",
        "deleteTargetRateDefinitionId": "text",
        "deleteTargetFreeCondition": {
          "subject": "text",
          "min": {
            "__typename": "text",
            "amount": "text",
            "currencyCode": "text"
          },
          "max": {
            "__typename": "text",
            "amount": "text",
            "currencyCode": "text"
          }
        }
      }
    ],
    "shippingCarrierProvider": "intelligems",
    "audience": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "experienceId": "123e4567-e89b-12d3-a456-426614174000",
      "enabled": true,
      "excludeCurrency": {
        "exclude": true,
        "currency": "text",
        "country": "text",
        "region": "text",
        "city": "text"
      },
      "wholesale": true,
      "audienceType": "common",
      "elseAction": "experienceInclude",
      "elseVariationId": "123e4567-e89b-12d3-a456-426614174000",
      "elseExcludeFromAnalytics": false,
      "filters": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "priority": 1,
          "action": "experienceInclude",
          "filterType": "utm",
          "expression": [
            {
              "query": {
                "key": "text",
                "value": "text",
                "filter": "equals",
                "type": "utm"
              },
              "operator": "and"
            }
          ],
          "expressionType": "common",
          "variationId": "123e4567-e89b-12d3-a456-426614174000",
          "excludeFromAnalytics": false
        }
      ],
      "evaluationFrequency": 1
    },
    "lastUpdateTs": 1,
    "previewPath": "text",
    "isExternal": false,
    "startedAtTs": 1,
    "pausedAtTs": 1,
    "archivedAtTs": 1,
    "requiresLink": false,
    "linkBaseUrl": "text",
    "endedAtTs": 1,
    "productVariantCount": 0,
    "sourceExperienceId": "123e4567-e89b-12d3-a456-426614174000",
    "sourceAction": "duplicate",
    "experienceAnalysis": {
      "analyticsViewType": "test_orders_only"
    }
  }
}

Last updated

Was this helpful?