The newsletter module manages your email subscriber database. It handles the full subscriber lifecycle (subscribe, unsubscribe, resubscribe) with tagging and source attribution. The module does not send emails itself; connect it to an email provider like Resend by listening to theDocumentation Index
Fetch the complete documentation index at: https://86d.app/docs/llms.txt
Use this file to discover all available pages before exploring further.
newsletter.subscribed event and using RESEND_API_KEY in your integration.
Source: modules/newsletter · npm: @86d-app/newsletter
Installation
Configuration
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
| Method | Path | Description |
|---|---|---|
POST | /newsletter/subscribe | Subscribe an email address |
POST | /newsletter/unsubscribe | Unsubscribe an email address |
Subscribe (POST /newsletter/subscribe)
email are optional. Use source to track where signups originate (e.g., "footer-form", "checkout-upsell", "product-page"). Tags are stored as a JSON array and can be used to filter subscribers in the admin.
Unsubscribe (POST /newsletter/unsubscribe)
unsubscribed and records an unsubscribedAt timestamp.
Admin endpoints
| Method | Path | Description |
|---|---|---|
GET | /admin/newsletter | List subscribers (filter: status, tag; paginate: page, limit) |
DELETE | /admin/newsletter/:id/delete | Permanently delete a subscriber |
Query parameters for GET /admin/newsletter
| Param | Type | Default | Description |
|---|---|---|---|
status | string | Filter by active, unsubscribed, or bounced | |
tag | string | Filter by a specific tag | |
page | number | 1 | Page number (1-indexed) |
limit | number | 50 | Results per page (max 100) |
Events
| Event | Trigger | Payload |
|---|---|---|
newsletter.subscribed | New subscriber added or reactivated | subscriberId, email, source |
newsletter.unsubscribed | Subscriber opts out | subscriberId, email |
newsletter.campaign.sent | Campaign sent to subscriber list | campaignId, subject, recipientCount |
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.
Show first and last name input fields alongside the email field.
Attribution source recorded on the subscriber (e.g.,
"footer-form").Form heading text.
Descriptive text displayed below the heading.
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.

