Newsletter
💡
NextSaaS comes with built-in newsletter functionality powered by Beehiiv, a powerful newsletter platform designed for creators and businesses.
Setup Requirements
1. Create Beehiiv Account
Sign up for a Beehiiv account at beehiiv.com (opens in a new tab)
2. Get API Credentials
Obtain your Publication ID and API Key from Beehiiv dashboard:
- Go to Settings → API & Webhooks
- Generate a new API key
- Copy your Publication ID (starts with
pub_
for V2 API)
How to access your Publication ID or API keys (opens in a new tab)
3. Configure Environment Variables
Add these variables to your .env
file:
src/.env
# Beehiiv API Key
BEEHIIV_API_KEY="{beehiiv_api_key}"
# Beehiiv Publication ID, starts with pub_
BEEHIIV_PUBLICATION_ID="{beehiiv_publication_id}"
Key Features
Subscriber Management
- User can subscribe to newsletter through newsletter form.
- User will be automatically added to the list after purchase.
- User can unsubscribe from Dashboard - Settings page.
- Subscriber list is persisted in the database as well as in Beehiiv.
Multiple Newsletter Components
NextSaaS includes two pre-built newsletter components:
-
Simple Newsletter Form (
<Newsletter />
):- Clean, minimal design
- Email validation
- Success/error notifications
-
Enhanced Newsletter Form (
<Newsletter2 />
):- Styled design with animations
- Advanced validation
- Custom success messages