Getting Started
Get up and running with Penna in minutes
Getting Started
This guide will help you set up your first newsletter and start collecting subscribers in just a few minutes.
Create Your Account
- Sign up at penna.dev
- Verify your email address
- Complete the onboarding flow
Create Your First Newsletter
Once logged in, you'll be guided through creating your first newsletter:
- Choose a name - Pick a descriptive name for your newsletter
- Set your sender details - Configure your "From" name and email address
- Get your API keys - Copy your public key for integration
Add Your First Subscriber
There are two ways to add subscribers:
Via Dashboard
- Navigate to your newsletter dashboard
- Click "Add Subscriber" in the top right
- Enter the email address
- (Optional) Add to segments
- Click "Create"
Via API
Add a simple subscription form to your website:
<form id="subscribe-form">
<input type="email" id="email" placeholder="Enter your email" required />
<button type="submit">Subscribe</button>
</form>
<script>
document
.getElementById("subscribe-form")
.addEventListener("submit", async (e) => {
e.preventDefault();
const email = document.getElementById("email").value;
const response = await fetch(
"https://api.penna.dev/api/v1/external/newsletters/subscriber/new",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"x-penna-public-key": "YOUR_PUBLIC_KEY",
},
body: JSON.stringify({ email }),
},
);
if (response.ok) {
alert("Successfully subscribed!");
}
});
</script>Send Your First Newsletter
Using the Dashboard
- Go to Newsletters → Compose
- Write your subject line
- Compose your content (supports markdown)
- Preview your email
- Select recipients (All subscribers or specific segments)
- Click Send
Using the API
const response = await fetch(
"https://api.penna.dev/api/v1/external/newsletters/send",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"x-penna-public-key": "YOUR_PUBLIC_KEY",
"x-penna-private-key": "YOUR_PRIVATE_KEY",
},
body: JSON.stringify({
subject: "Welcome to my newsletter!",
content: "# Hello!\n\nThanks for subscribing.",
segmentIds: ["YOUR_SEGMENT_ID"], // Pass segment IDs or recipientEmails (max 5,000 resolved recipients per request)
}),
},
);Important: Keep your private key secure! Never expose it in client-side code. Note that single send calls resolve to a maximum of 5,000 recipients (MAX_RECIPIENTS_PER_SEND = 5000). See Send Newsletter API reference and Segmentations API for details.