MOLTED EMAIL
CLI Reference

molted trace

Get the full decision trace for a send request

Agent context

Trace and timeline are debugging tools for understanding what happened with a send request. Use the requestId from any send response.

Trace — shows the full decision trace for a send request

molted trace <requestId>
# → {
#     "request": { "requestId": "...", "recipientEmail": "...", "templateId": "...",
#                  "status": "sent", "deliveryStatus": "delivered", ... },
#     "policyDecision": { "requestId": "...", "decision": "allow", "reason": null, "createdAt": "..." },
#     "deliveryEvents": [
#       { "eventType": "delivered", "providerName": "resend", "occurredAt": "...", ... }
#     ],
#     "auditEvents": [
#       { "eventType": "mail.send.executed", "eventJson": { "status": "sent", ... }, ... }
#     ]
#   }

Use this when a send is blocked and you need to know which policy decision was made and why. Check policyDecision.decision ("allow" or "block") and policyDecision.reason. An unknown requestId is a 404 request_not_found.

Timeline — shows delivery events after the send

molted timeline <requestId>
# → [
#     { "id": "...", "event_type": "queued", "provider_name": "mock", "occurred_at": "...", ... },
#     { "id": "...", "event_type": "sent", "provider_name": "mock", "occurred_at": "...", ... },
#     { "id": "...", "event_type": "delivered", "provider_name": "mock", "occurred_at": "...", ... }
#   ]

Use this to track delivery progress: sent → delivered → opened/clicked (or deferred, bounced, complained, failed). Real providers report these events as their webhooks arrive; the mock provider synthesizes queued, sent and delivered immediately on send. Note the timeline's fields are snake_case, unlike trace's.

Related: molted send, molted analytics

Commands

molted trace

Get the full decision trace for a send request

molted trace <requestId>
ArgumentDescriptionRequired
<requestId>yes

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