Create Experience
The following experience types are supported by the Intelligems Experiments API:
content/advanced— Advanced content test (custom CSS/JS injection)content/onsiteEdits— Onsite edits (visual editor changes)content/url— URL redirectscontent/theme— Theme redirectscontent/template— Template redirectspersonalization— Personalization rulespersonalization/offer— Offer test (structured discount campaigns configured via theofferfield on each variation)
The following test types are not currently supported via this API:
Checkout Blocks
Post-Purchase Upsells
Pricing
Shipping
Campaigns
The type field also lists checkoutBlock and postPurchase, but requests made with an API key can't use them and are rejected. Create those experiences in the Intelligems app.
All fields (experience metadata, variations, audience, page targeting, and key metrics) are nested inside a single experience object in the request body.
Creates a new experience.
The experience will be created in a draft state and must be activated separately before it will be served to visitors.
Required Fields
name- A unique name for the experiencetype- The type of test (content, redirect, etc.)variations- At least one variation must be provided
Optional Fields
audience— Audience targeting rulesexcludeCurrency— Currency/geo-based visitor targeting. Whenexcludeistrue, only visitors matching the givencurrency(ISO 4217 code) are included in the experience; everyone else is excluded. Setcurrencytonull(withexclude: false) to disable.
Rate Limit: 50 requests per 30s window, refilling 25 tokens every 30s.
Intelligems external API access token.
OK
Too Many Requests
curl --location 'https://api.intelligems.io/v25-10-beta/experiences' \
--header 'content-type: application/json' \
--header 'intelligems-access-token: YOUR_API_KEY' \
--data '{
"experience": {
"name": "URL Redirect Test - Test to New-Test",
"description": "Testing redirect from /test to /new-test",
"type": "content/url",
"currency": {
"code": "USD",
"symbol": "$",
"country": "US",
"suffix": ""
},
"experienceAnalysis": {
"analyticsViewType": "none"
},
"variations": [
{
"name": "Control - No Redirect",
"percentage": 50,
"isControl": true,
"order": 1,
"redirects": []
},
{
"name": "Variant - Redirect to New-Test",
"percentage": 50,
"isControl": false,
"order": 2,
"redirects": [
{
"group": 1,
"originUrl": "/test",
"destinationUrl": "/new-test",
"filter": "matchesExactly",
"redirectType": "fullReplacement",
"redirectOnce": false,
"skip": false,
"isThemeTest": false,
"isTemplateTest": false,
"queryParams": []
}
]
}
]
}
}'{
"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?