MOLTED EMAIL
CLI Reference

molted inbound-hooks

Manage inbound webhook mappings for zero-code integrations

CommandDescription
molted inbound-hooks createCreate an inbound webhook mapping
molted inbound-hooks listList all inbound webhook mappings
molted inbound-hooks getGet an inbound webhook mapping by ID
molted inbound-hooks updateUpdate an inbound webhook mapping
molted inbound-hooks deleteDelete an inbound webhook mapping
molted inbound-hooks logsView recent webhook delivery logs
molted inbound-hooks testDry-run a sample payload against a webhook mapping: no side effects

Agent context

----- Agent Context ------------------------------------------------

Inbound webhook mappings let you connect external services (Clerk, Stripe, Supabase Auth, etc.) to Molted without writing code.

Setup flow

molted inbound-hooks create \
  --name "Clerk Signups" \
  --email-path "data.email_addresses[0].email_address" \
  --field-map "name=data.first_name" \
  --action "sync_contact" \
  --action "subscribe_to_list:<listId>"
# -> returns the mapping with a unique urlToken (ink_...); paste
#    https://api.molted.email/v1/hooks/<urlToken> into your provider

molted inbound-hooks list
molted inbound-hooks get <id>
molted inbound-hooks update <id> --enabled false
molted inbound-hooks delete <id>
molted inbound-hooks logs <id>   # recent deliveries and errors
molted inbound-hooks test <id> --payload '{"data":{"email":"a@b.com"}}'
                                  # dry run: shows extracted fields and the
                                  # actions it would take, no side effects

Action types:
sync_contact Upsert the contact: name from the "name" (or

"firstName") mapping, every mapped field

merged into its metadata
subscribe_to_list:<id> Subscribe contact to a list subscribe_to_list:<id>:confirm Same, but require double opt-in (a pending
contact must confirm via email before they
go active -- see the confirmation journey
docs). An unsubscribed or suppressed
address is never reactivated by a
resubmission either way.
trigger_journey:<event> Fire an event to start a journey

Email path syntax uses dot notation with array indices:
data.email simple field
data.email_addresses[0].email nested array

Security model:
The receiver URL is authenticated by the URL token alone. Anyone with the URL can trigger actions, so treat tokens as secrets. Delete and recreate if leaked. Per-token rate limit: 120 requests/minute (429 when exceeded).

Related: molted contacts, molted lists, molted journeys

Commands

molted inbound-hooks create

Create an inbound webhook mapping

molted inbound-hooks create [options]
OptionDescriptionDefault
--name <name>Display name for this webhook (required)
--email-path <path>JSON path to extract email from payload (required)
--source <source>Source service name (clerk, stripe, etc.)
--field-map <mapping...>Field mappings (key=path format) (variadic)
--action <action...>Actions to execute (type or type:param) (variadic)

molted inbound-hooks list

List all inbound webhook mappings

molted inbound-hooks list

molted inbound-hooks get

Get an inbound webhook mapping by ID

molted inbound-hooks get <id>
ArgumentDescriptionRequired
<id>yes

molted inbound-hooks update

Update an inbound webhook mapping

molted inbound-hooks update [options] <id>
ArgumentDescriptionRequired
<id>yes
OptionDescriptionDefault
--name <name>Display name
--email-path <path>JSON path to extract email
--source <source>Source service name
--field-map <mapping...>Field mappings (key=path format) (variadic)
--action <action...>Actions to execute (replaces existing) (variadic)
--enabled <value>Enable or disable (true/false)

molted inbound-hooks delete

Delete an inbound webhook mapping

molted inbound-hooks delete <id>
ArgumentDescriptionRequired
<id>yes

molted inbound-hooks logs

View recent webhook delivery logs

molted inbound-hooks logs [options] <id>
ArgumentDescriptionRequired
<id>yes
OptionDescriptionDefault
--limit <n>Number of logs to show20

molted inbound-hooks test

Dry-run a sample payload against a webhook mapping: no side effects

molted inbound-hooks test [options] <id>
ArgumentDescriptionRequired
<id>yes
OptionDescriptionDefault
--payload <json|@file>Sample payload as a JSON string, or @path/to/file.json (required)

Shows the email and fields the mapping would extract from the sample payload, and the actions it would take -- without upserting a contact, subscribing to a list, triggering a journey, or writing a delivery log.

Examples

molted inbound-hooks test wh_abc --payload '{"data":{"email":"a@b.com","first_name":"Ada"}}'
molted inbound-hooks test wh_abc --payload @sample-clerk-payload.json

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