Skip to main content
Experimental. This Module has no test or production evidence recorded yet. Read it, run it locally, and hold off on real Orders. See maturity levels.
The Newsletter Module manages your email subscriber database: the full subscribe, unsubscribe, and resubscribe lifecycle, with tagging and source attribution. It does not send emails itself. Connect an email provider such as Resend by listening to the newsletter.subscribed event and using RESEND_API_KEY in your Integration code. Source: modules/newsletter · npm: @86d-store/newsletter

Installation

Add the Module to your store configuration:

Configuration

string
default:"\"true\""
When "true", previously unsubscribed (or bounced) addresses can resubscribe. Set to "false" to prevent resubscription; calls to POST /newsletter/subscribe for an unsubscribed address return the subscriber unchanged.

Subscriber lifecycle

subscribe() is idempotent: calling it for an already-active address returns the existing subscriber unchanged. For an unsubscribed or bounced address, it reactivates the record while preserving the original subscribedAt date.

Store endpoints

Subscribe (POST /newsletter/subscribe)

All fields except email are optional. Use source to track where signups originate, for example "footer-form", "checkout-upsell", or "product-page". Tags are stored as a JSON array; use them to filter subscribers in Store Admin.

Unsubscribe (POST /newsletter/unsubscribe)

The endpoint sets the subscriber’s status to unsubscribed and records an unsubscribedAt timestamp.

Admin endpoints

Query parameters for GET /admin/newsletter

Events

Listen to newsletter.subscribed to forward new signups to an external email provider:

Store components

Use these components in your MDX Template files.

NewsletterForm

A full email subscription form with optional name fields and customizable copy.
boolean
default:"false"
Show first and last name input fields alongside the email field.
string
Attribution source recorded on the subscriber (for example "footer-form").
string
default:"\"Subscribe to our newsletter\""
Form heading text.
string
default:"\"Get the latest updates...\""
Descriptive text displayed below the heading.
boolean
default:"false"
Render the form in a compact inline layout.

NewsletterInline

Inline newsletter signup intended for embedding in blog posts or product pages. Accepts the same props as NewsletterForm. Use compact={true} for inline placement.

NewsletterUnsubscribe

A self-service unsubscribe form for use on your unsubscribe page, typically linked from email footers.

Types