Skip to content

API reference

API: Experiments

Markdown version

MethodPathWhat it doesScope
GET/v1/mkt/experiments/:idA test with its results (intervals, always-valid p-values, guardrails), its winner and its logmarketing:read
PATCH/v1/mkt/experiments/:idChange a draft test's name, hypothesis, variants, goal or guardrails (a person; fixed once it starts)marketing:write
POST/v1/mkt/experiments/:id/beginStart showing a drafted test on your site (checked against overlapping tests and your policies)marketing:write
POST/v1/mkt/experiments/:id/code-flagAdd a code flag to a draft page test (a person): each variant also writes its key into a hidden flag element your site's code can read (web app only)marketing:write
GET/v1/mkt/experiments/:id/skillA skill (SKILL.md, or a .zip skill bundle) a coding agent follows to build this test's variants into your site's code as a feature flag read from the tagmarketing:read
POST/v1/mkt/experiments/:id/stopStop a test now: everyone sees the original again (no approval of its own)marketing:write
POST/v1/mkt/experiments/:id/winnerShow a variant to everyone as the winner (a person's approval; checked by your policies; refused if it harmed a guardrail)marketing:write
POST/v1/mkt/experiments/:id/winner/declineTurn down a proposed winner (the test keeps its current state)marketing:write
POST/v1/mkt/experiments/:id/winner/withdrawWithdraw an applied winner: everyone sees the original page again (never waits for approval)marketing:write
GET/v1/mkt/experiments/copy-plansCopy experiment plans handed over from content, newest first: waiting for setup, or the draft test each becamemarketing:read
GET/v1/mkt/experiments/copy-plans/:idA copy experiment plan: its versions, hypotheses, people needed per version, and the test it becamemarketing:read
POST/v1/mkt/experiments/copy-plans/:id/setupChoose where a copy plan runs (a person): a page and the element each version replaces, or an email template; it becomes a draft test you start (web app only)marketing:write
GET/v1/mkt/experiments/ideasTest ideas with the numbers behind each: busy pages that convert poorly, pages losing search clicks, winners to try elsewheremarketing:read
GET/v1/mkt/experiments/landing-testsLanding page tests, newest first (at most 50)marketing:read
POST/v1/mkt/experiments/landing-testsTest landing page variants: each is a content piece (your text or generated from the brief) a person approves before the test can startmarketing:write
GET/v1/mkt/experiments/landing-tests/:idA landing page test's variants: their pieces, approval, CMS drafts and what happens to each after the testmarketing:read
POST/v1/mkt/experiments/landing-tests/:id/beginStart a landing page test once every variant is approved: CMS drafts made (never published), then the test starts through your policiesmarketing:write
POST/v1/mkt/experiments/landing-tests/:id/product-copyApply a product page test's winner to the Shopify product: its approved title, description or both (read first, checked after, once) (web app only)marketing:write
GET/v1/mkt/experiments/landing-tests/productsYour connected Shopify stores and their products (up to 50, by title), for a product page testmarketing:read
GET/v1/mkt/experiments/outsideTests from your connected experimentation tool, most recently changed first (at most 100): what the tool reported and our own check of itmarketing:read
PUT/v1/mkt/experiments/outside/accounts/:id/productSay which Optimizely product an account is: Web Experimentation (pages) or Feature Experimentation (flags and their A/B rules)marketing:write
POST/v1/mkt/experiments/outside/accounts/:id/refreshRead a connected experimentation tool's tests and results now (read only; filed, nothing acts on it)marketing:write
GET/v1/mkt/experiments/personalizationPersonalization rules (by source, campaign, landing page or search keyword) and their statusmarketing:read
POST/v1/mkt/experiments/personalizationDraft a personalization rule: what a page says to visitors from a source, campaign or search keywordmarketing:write
POST/v1/mkt/experiments/personalization/:id/offTurn a personalization rule off (never waits for approval)marketing:write
POST/v1/mkt/experiments/personalization/:id/publishShow a personalization rule on your site (a person's approval; checked by your policies)marketing:write
POST/v1/mkt/experiments/planHow many visitors and days a test needs to detect a lift, from the baseline rate and daily trafficmarketing:read
GET/v1/mkt/experiments/proposalsProposals to try a finished test's winner on another channel (web, email, push), with what the test measuredmarketing:read
POST/v1/mkt/experiments/proposals/draftsDraft a test from a proposal (an email subject test or a page test); a person starts itmarketing:write
GET/v1/mkt/experiments/settingsExperiment settings: the automatic stop on a harmed guardrail, tests at once, confidence and how long visitor data is keptmarketing:read
PUT/v1/mkt/experiments/settingsChange experiment settings (owners)settings:write
GET/v1/mkt/experiments/testsTests, newest first, with the program's win rate, running count, overlapping tests and tests without visitorsmarketing:read
POST/v1/mkt/experiments/testsDraft a test: variants (the first is the original), the goal, guardrails and an optional sample-size planmarketing:write

Examples

GET /v1/mkt/experiments/$ID

A test with its results (intervals, always-valid p-values, guardrails), its winner and its log

curl -s "https://api.scheeleworks.com/v1/mkt/experiments/$ID" \
  -H "Authorization: Bearer $MA_API_KEY"
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/${id}`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}` },
});
const data = await res.json();

PATCH /v1/mkt/experiments/$ID

Change a draft test's name, hypothesis, variants, goal or guardrails (a person; fixed once it starts)

curl -s -X PATCH "https://api.scheeleworks.com/v1/mkt/experiments/$ID" \
  -H "Authorization: Bearer $MA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/${id}`, {
  method: "PATCH",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

POST /v1/mkt/experiments/$ID/begin

Start showing a drafted test on your site (checked against overlapping tests and your policies)

curl -s -X POST "https://api.scheeleworks.com/v1/mkt/experiments/$ID/begin" \
  -H "Authorization: Bearer $MA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/${id}/begin`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

GET /v1/mkt/experiments/$ID/skill

A skill (SKILL.md, or a .zip skill bundle) a coding agent follows to build this test's variants into your site's code as a feature flag read from the tag

curl -s "https://api.scheeleworks.com/v1/mkt/experiments/$ID/skill" \
  -H "Authorization: Bearer $MA_API_KEY"
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/${id}/skill`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}` },
});
const data = await res.json();

POST /v1/mkt/experiments/$ID/stop

Stop a test now: everyone sees the original again (no approval of its own)

curl -s -X POST "https://api.scheeleworks.com/v1/mkt/experiments/$ID/stop" \
  -H "Authorization: Bearer $MA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/${id}/stop`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

POST /v1/mkt/experiments/$ID/winner

Show a variant to everyone as the winner (a person's approval; checked by your policies; refused if it harmed a guardrail)

curl -s -X POST "https://api.scheeleworks.com/v1/mkt/experiments/$ID/winner" \
  -H "Authorization: Bearer $MA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/${id}/winner`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

POST /v1/mkt/experiments/$ID/winner/decline

Turn down a proposed winner (the test keeps its current state)

curl -s -X POST "https://api.scheeleworks.com/v1/mkt/experiments/$ID/winner/decline" \
  -H "Authorization: Bearer $MA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/${id}/winner/decline`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

POST /v1/mkt/experiments/$ID/winner/withdraw

Withdraw an applied winner: everyone sees the original page again (never waits for approval)

curl -s -X POST "https://api.scheeleworks.com/v1/mkt/experiments/$ID/winner/withdraw" \
  -H "Authorization: Bearer $MA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/${id}/winner/withdraw`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

GET /v1/mkt/experiments/copy-plans

Copy experiment plans handed over from content, newest first: waiting for setup, or the draft test each became

curl -s "https://api.scheeleworks.com/v1/mkt/experiments/copy-plans" \
  -H "Authorization: Bearer $MA_API_KEY"
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/copy-plans`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}` },
});
const data = await res.json();

GET /v1/mkt/experiments/copy-plans/$ID

A copy experiment plan: its versions, hypotheses, people needed per version, and the test it became

curl -s "https://api.scheeleworks.com/v1/mkt/experiments/copy-plans/$ID" \
  -H "Authorization: Bearer $MA_API_KEY"
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/copy-plans/${id}`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}` },
});
const data = await res.json();

GET /v1/mkt/experiments/ideas

Test ideas with the numbers behind each: busy pages that convert poorly, pages losing search clicks, winners to try elsewhere

curl -s "https://api.scheeleworks.com/v1/mkt/experiments/ideas" \
  -H "Authorization: Bearer $MA_API_KEY"
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/ideas`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}` },
});
const data = await res.json();

GET /v1/mkt/experiments/landing-tests

Landing page tests, newest first (at most 50)

curl -s "https://api.scheeleworks.com/v1/mkt/experiments/landing-tests" \
  -H "Authorization: Bearer $MA_API_KEY"
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/landing-tests`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}` },
});
const data = await res.json();

POST /v1/mkt/experiments/landing-tests

Test landing page variants: each is a content piece (your text or generated from the brief) a person approves before the test can start

curl -s -X POST "https://api.scheeleworks.com/v1/mkt/experiments/landing-tests" \
  -H "Authorization: Bearer $MA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/landing-tests`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

GET /v1/mkt/experiments/landing-tests/$ID

A landing page test's variants: their pieces, approval, CMS drafts and what happens to each after the test

curl -s "https://api.scheeleworks.com/v1/mkt/experiments/landing-tests/$ID" \
  -H "Authorization: Bearer $MA_API_KEY"
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/landing-tests/${id}`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}` },
});
const data = await res.json();

POST /v1/mkt/experiments/landing-tests/$ID/begin

Start a landing page test once every variant is approved: CMS drafts made (never published), then the test starts through your policies

curl -s -X POST "https://api.scheeleworks.com/v1/mkt/experiments/landing-tests/$ID/begin" \
  -H "Authorization: Bearer $MA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/landing-tests/${id}/begin`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

GET /v1/mkt/experiments/landing-tests/products

Your connected Shopify stores and their products (up to 50, by title), for a product page test

curl -s "https://api.scheeleworks.com/v1/mkt/experiments/landing-tests/products" \
  -H "Authorization: Bearer $MA_API_KEY"
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/landing-tests/products`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}` },
});
const data = await res.json();

GET /v1/mkt/experiments/outside

Tests from your connected experimentation tool, most recently changed first (at most 100): what the tool reported and our own check of it

curl -s "https://api.scheeleworks.com/v1/mkt/experiments/outside" \
  -H "Authorization: Bearer $MA_API_KEY"
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/outside`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}` },
});
const data = await res.json();

PUT /v1/mkt/experiments/outside/accounts/$ID/product

Say which Optimizely product an account is: Web Experimentation (pages) or Feature Experimentation (flags and their A/B rules)

curl -s -X PUT "https://api.scheeleworks.com/v1/mkt/experiments/outside/accounts/$ID/product" \
  -H "Authorization: Bearer $MA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/outside/accounts/${id}/product`, {
  method: "PUT",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

POST /v1/mkt/experiments/outside/accounts/$ID/refresh

Read a connected experimentation tool's tests and results now (read only; filed, nothing acts on it)

curl -s -X POST "https://api.scheeleworks.com/v1/mkt/experiments/outside/accounts/$ID/refresh" \
  -H "Authorization: Bearer $MA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/outside/accounts/${id}/refresh`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

GET /v1/mkt/experiments/personalization

Personalization rules (by source, campaign, landing page or search keyword) and their status

curl -s "https://api.scheeleworks.com/v1/mkt/experiments/personalization" \
  -H "Authorization: Bearer $MA_API_KEY"
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/personalization`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}` },
});
const data = await res.json();

POST /v1/mkt/experiments/personalization

Draft a personalization rule: what a page says to visitors from a source, campaign or search keyword

curl -s -X POST "https://api.scheeleworks.com/v1/mkt/experiments/personalization" \
  -H "Authorization: Bearer $MA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/personalization`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

POST /v1/mkt/experiments/personalization/$ID/off

Turn a personalization rule off (never waits for approval)

curl -s -X POST "https://api.scheeleworks.com/v1/mkt/experiments/personalization/$ID/off" \
  -H "Authorization: Bearer $MA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/personalization/${id}/off`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

POST /v1/mkt/experiments/personalization/$ID/publish

Show a personalization rule on your site (a person's approval; checked by your policies)

curl -s -X POST "https://api.scheeleworks.com/v1/mkt/experiments/personalization/$ID/publish" \
  -H "Authorization: Bearer $MA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/personalization/${id}/publish`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

POST /v1/mkt/experiments/plan

How many visitors and days a test needs to detect a lift, from the baseline rate and daily traffic

curl -s -X POST "https://api.scheeleworks.com/v1/mkt/experiments/plan" \
  -H "Authorization: Bearer $MA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/plan`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

GET /v1/mkt/experiments/proposals

Proposals to try a finished test's winner on another channel (web, email, push), with what the test measured

curl -s "https://api.scheeleworks.com/v1/mkt/experiments/proposals" \
  -H "Authorization: Bearer $MA_API_KEY"
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/proposals`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}` },
});
const data = await res.json();

POST /v1/mkt/experiments/proposals/drafts

Draft a test from a proposal (an email subject test or a page test); a person starts it

curl -s -X POST "https://api.scheeleworks.com/v1/mkt/experiments/proposals/drafts" \
  -H "Authorization: Bearer $MA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/proposals/drafts`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

GET /v1/mkt/experiments/settings

Experiment settings: the automatic stop on a harmed guardrail, tests at once, confidence and how long visitor data is kept

curl -s "https://api.scheeleworks.com/v1/mkt/experiments/settings" \
  -H "Authorization: Bearer $MA_API_KEY"
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/settings`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}` },
});
const data = await res.json();

PUT /v1/mkt/experiments/settings

Change experiment settings (owners)

curl -s -X PUT "https://api.scheeleworks.com/v1/mkt/experiments/settings" \
  -H "Authorization: Bearer $MA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/settings`, {
  method: "PUT",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

GET /v1/mkt/experiments/tests

Tests, newest first, with the program's win rate, running count, overlapping tests and tests without visitors

curl -s "https://api.scheeleworks.com/v1/mkt/experiments/tests" \
  -H "Authorization: Bearer $MA_API_KEY"
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/tests`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}` },
});
const data = await res.json();

POST /v1/mkt/experiments/tests

Draft a test: variants (the first is the original), the goal, guardrails and an optional sample-size plan

curl -s -X POST "https://api.scheeleworks.com/v1/mkt/experiments/tests" \
  -H "Authorization: Bearer $MA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.scheeleworks.com/v1/mkt/experiments/tests`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

Request and response schemas: https://www.scheeleworks.com/openapi.json. All resources: API reference.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.
Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.