MOLTED EMAIL
CLI Reference

molted experiments

Run A/B or holdout experiments on journey steps

CommandDescription
molted experiments createCreate a new experiment
molted experiments listList experiments
molted experiments getGet an experiment by ID
molted experiments startStart an experiment (only from draft)
molted experiments stopStop an experiment (only from running)
molted experiments resultsGet experiment results by variant

Agent context

Experiments compare template variants (or a holdout) on a journey step. Reachable with a Bearer API key (despite older docs implying cookie-only).

An experiment only actually runs when a journey step's stepId matches its journeyStepId exactly (journey-step-processor.ts) -- --journey-step is optional on the API, but an experiment with none attached to a real step never fires. Pass real journey/step UUIDs, e.g. from molted journeys get.

Create an experiment

molted experiments create --name "Subject line test" \
  --journey 3fa2c1e0-8b8e-4c1a-9e5a-6f6e2b6e6a11 \
  --journey-step 7c9c0d3a-2f5b-4a49-9b2e-1d3f9a7c6e02 --type ab \
  --variants '[
    {"id":"v1","name":"Control","weight":50,"templateVersionId":"tv_1","isControl":true,"isHoldout":false},
    {"id":"v2","name":"Casual","weight":50,"templateVersionId":"tv_2","isControl":false,"isHoldout":false}
  ]'
# → --variants also accepts @path/to/variants.json

Variant fields: id, name, weight (positive number, relative), templateVersionId (or null), subjectOverride (or null), timingDelayMinutes (or null; stored but not applied to sends yet), isHoldout (the contact gets no send), isControl (the baseline that results compare the other variants against). Note: "templateId" is NOT a variant field -- the API ignores it, so the CLI rejects it; use "templateVersionId" (from templates create/add-version).

Caveat (#1490): a variant's templateVersionId is stored and recorded as the send's templateId, but the send is still rendered from the journey step's own base template -- it is not re-rendered from the variant's template version. subjectOverride DOES take effect. Until #1490 ships, use subjectOverride for real A/B content differences.

Run it

molted experiments start <id>   # only from draft
molted experiments stop <id>    # only from running
molted experiments results <id>

List / inspect

molted experiments list [--journey <journeyId>]
molted experiments get <id>

Related: molted journeys, molted templates

Commands

molted experiments create

Create a new experiment

molted experiments create [options]
OptionDescriptionDefault
--name <name>Experiment name (required) (required)
--variants <json-or-@file>JSON array of variants, or @path/to/file.json (required) (required)
--journey <id>Journey ID
--journey-step <id>Journey step ID -- required in practice: an experiment only runs when this matches the step being processed
--type <type>Experiment type (server default: ab) (one of: ab, holdout)
--segment <id>Segment ID to scope the experiment to

molted experiments list

List experiments

molted experiments list [options]
OptionDescriptionDefault
--journey <id>Filter by journey ID

molted experiments get

Get an experiment by ID

molted experiments get <id>
ArgumentDescriptionRequired
<id>yes

molted experiments start

Start an experiment (only from draft)

molted experiments start <id>
ArgumentDescriptionRequired
<id>yes

molted experiments stop

Stop an experiment (only from running)

molted experiments stop <id>
ArgumentDescriptionRequired
<id>yes

molted experiments results

Get experiment results by variant

molted experiments results <id>
ArgumentDescriptionRequired
<id>yes

See CLI overview for global options, credentials and output format.