MOLTED EMAIL
CLI Reference

molted journeys

Manage journey orchestration

CommandDescription
molted journeys createCreate a new journey
molted journeys listList all journeys
molted journeys getGet a journey by ID
molted journeys updateUpdate a journey
molted journeys add-stepAdd a step to a journey
molted journeys update-stepUpdate a step in a journey (refused while the journey is active: pause it first)
molted journeys delete-stepDelete a step from a journey (refused while the journey is active: pause it first)
molted journeys deleteDelete a journey in draft, paused, archived or completed status (an active one must be paused or archived first; remaining runs are cancelled)
molted journeys runsManage journey runs (list, cancel). Deprecated: runs <id> alone still works as runs list <id>.
molted journeys runs listList runs for a journey
molted journeys runs cancelCancel a single journey run
molted journeys runs cancel-allCancel every active run of a journey
molted journeys triggerTrigger a journey by ingesting an event

Agent context

Journeys are automated multi-step email sequences triggered by events. A journey defines a series of steps (send, delay, branch, end) that execute in order when a trigger event fires for a contact.

Create a journey end-to-end

# 1. Create templates for each step (declare every {{variable}}, or lint fails;
#    a marketing template also needs an unsubscribe link, see templates --help)
molted templates create --name "Day 1" --slug onboard-day1 --type transactional \
  --subject "Welcome {{name}}" --body "<h1>Welcome!</h1>" \
  --variables '[{"name": "name", "type": "string", "required": true}]' --auto-publish
# → { "template": { "id": "<uuid>", "slug": "onboard-day1", ... }, "version": {...}, ... }

# 2. Create the journey with a trigger event (it starts as a draft)
molted journeys create --name "Onboarding" --trigger-event signup
# → { "id": "<uuid>" }

# 3. Add steps in order (templateId takes the template's id or its slug)
molted journeys add-step <journeyId> --step-order 1 --step-type send \
  --config '{"templateId": "onboard-day1"}'
molted journeys add-step <journeyId> --step-order 2 --step-type delay \
  --config '{"delayMinutes": 1440}'
molted journeys add-step <journeyId> --step-order 3 --step-type send \
  --config '{"templateId": "<templateId>", "mailboxId": "<mailboxId>"}'
molted journeys add-step <journeyId> --step-order 4 --step-type end

# 4. Activate the journey
molted journeys update <journeyId> --status active

# 5. Trigger it for a contact
molted journeys trigger --event signup --contact alice@example.com \
  --properties '{"name": "Alice", "plan": "pro"}'
# → { "eventId": "<uuid>" }. Every active journey with this trigger event (and
#   matching trigger conditions) starts a run, unless the contact already has an
#   active run in it.

Step types

  • send — sends an email using a template. Config: { templateId, payload?, mailboxId? }. Set mailboxId to send from a specific mailbox (defaults to the tenant's default mailbox). Use molted mailboxes list to find the id.
  • delay — waits N minutes before the next step Config: { delayMinutes } (default 60).
  • branch — conditional routing. field is a dot path resolved against the trigger payload from journeys trigger/--properties (a bare field like "plan" and "properties.plan" are equivalent; "triggerPayload.plan" also works). Operators: eq, neq, gt, lt, contains, exists (value is not needed for exists). The first matching condition wins; every nextStepOrder must be greater than this step's own step-order (no looping back); example config: '{"conditions":[{"field":"properties.plan","operator":"eq","value":"pro","nextStepOrder":3}],"defaultNextStepOrder":4}' (the legacy '{"conditions":[...],"onMatch":{"nextStep":3},"onNoMatch":{"nextStep":4}}' shape, where all conditions AND together, is still accepted but deprecated)
  • end — terminates the journey

Journey statuses

  • draft - a new journey: nothing runs until you set it to active
  • active — processing triggers and running steps
  • paused — stops processing new triggers; in-flight runs are parked (deferred) and pick back up once the journey is active again
  • archived — stops processing and cancels every in-flight run. Not permanent — set status back to active to reactivate.

Stopping on a reply (on by default):
When a contact replies, every active run of a journey with exit on reply stops for them (status cancelled, reason contact_replied), once the journey has already sent them an email. Automatic replies (out of office), delivery notices, spam and mail the safety check quarantined or rejected never count; an opt-out does. Pending approvals of the run are rejected. Turn it off for a journey that should keep going after a reply:

molted journeys update <journeyId> --no-exit-on-reply

Delete a journey you no longer need (e.g. a test one)

molted journeys delete <journeyId>
# → { "deleted": true, "id": "...", "cancelledRuns": 0 }

Works for a draft, paused, archived or completed journey. An active journey is refused: pause or archive it first (molted journeys update <id> --status paused). Any run still waiting (a paused journey's parked runs) is cancelled, and its pending send approvals are rejected. The journey disappears from list and get; its run and send history is kept.

Monitor and manage journey runs

molted journeys runs list <journeyId>
# → the 100 most recent runs, with their current step and status

molted journeys runs cancel <journeyId> <runId>
# → cancel one in-flight run

molted journeys runs cancel-all <journeyId>
# → cancel every active run of a journey (pulls every contact out without archiving)

Measure journey effectiveness

molted outcomes journey-impact
# → shows conversion/revenue attributed to each journey

Related: molted templates, molted send, molted outcomes, molted contacts

Commands

molted journeys create

Create a new journey

molted journeys create [options]
OptionDescriptionDefault
--name <name>Journey name (required) (required)
--trigger-event <event>Trigger event name (required) (required)
--trigger-conditions <json>Trigger conditions as JSON: only events whose payload has every key equal to the given value start a run, e.g. '{"plan":"pro"}'
--exit-on-replyStop a contact's run when they reply (the default)
--no-exit-on-replyKeep sending after a contact replies

molted journeys list

List all journeys

molted journeys list

molted journeys get

Get a journey by ID

molted journeys get <id>
ArgumentDescriptionRequired
<id>Journey IDyes

molted journeys update

Update a journey

molted journeys update [options] <id>
ArgumentDescriptionRequired
<id>Journey IDyes
OptionDescriptionDefault
--name <name>Journey name
--status <status>Status (active|paused|archived)
--exit-on-replyStop a contact's run when they reply (applies to runs in flight)
--no-exit-on-replyKeep sending after a contact replies

molted journeys add-step

Add a step to a journey

molted journeys add-step [options] <id>
ArgumentDescriptionRequired
<id>Journey IDyes
OptionDescriptionDefault
--step-order <n>Step order (integer) (required) (required)
--step-type <type>Step type (send|delay|branch|end) (required) (required)
--config <json>Step config as JSON

molted journeys update-step

Update a step in a journey (refused while the journey is active: pause it first)

molted journeys update-step [options] <journeyId> <stepId>
ArgumentDescriptionRequired
<journeyId>Journey IDyes
<stepId>Step IDyes
OptionDescriptionDefault
--step-order <n>New step order (integer)
--step-type <type>Step type (send|delay|branch|end)
--config <json>Step config as JSON

molted journeys delete-step

Delete a step from a journey (refused while the journey is active: pause it first)

molted journeys delete-step <journeyId> <stepId>
ArgumentDescriptionRequired
<journeyId>Journey IDyes
<stepId>Step IDyes

molted journeys delete

Delete a journey in draft, paused, archived or completed status (an active one must be paused or archived first; remaining runs are cancelled)

molted journeys delete <id>
ArgumentDescriptionRequired
<id>Journey IDyes

molted journeys runs

Manage journey runs (list, cancel). Deprecated: runs <id> alone still works as runs list <id>.

molted journeys runs [id]
ArgumentDescriptionRequired
[id]Journey ID (deprecated shorthand for runs list <id>)no

molted journeys runs list

List runs for a journey

molted journeys runs list <id>
ArgumentDescriptionRequired
<id>Journey IDyes

molted journeys runs cancel

Cancel a single journey run

molted journeys runs cancel <journeyId> <runId>
ArgumentDescriptionRequired
<journeyId>Journey IDyes
<runId>Run IDyes

molted journeys runs cancel-all

Cancel every active run of a journey

molted journeys runs cancel-all <journeyId>
ArgumentDescriptionRequired
<journeyId>Journey IDyes

molted journeys trigger

Trigger a journey by ingesting an event

molted journeys trigger [options]
OptionDescriptionDefault
--event <name>Event name (required) (required)
--contact <email>Contact email (required) (required)
--properties <json>Event payload as JSON (required) (required)

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