penna

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

  1. Sign up at penna.dev
  2. Verify your email address
  3. Complete the onboarding flow

Create Your First Newsletter

Once logged in, you'll be guided through creating your first newsletter:

  1. Choose a name - Pick a descriptive name for your newsletter
  2. Set your sender details - Configure your "From" name and email address
  3. Get your API keys - Copy your public key for integration

Add Your First Subscriber

There are two ways to add subscribers:

Via Dashboard

  1. Navigate to your newsletter dashboard
  2. Click "Add Subscriber" in the top right
  3. Enter the email address
  4. (Optional) Add to segments
  5. 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

  1. Go to NewslettersCompose
  2. Write your subject line
  3. Compose your content (supports markdown)
  4. Preview your email
  5. Select recipients (All subscribers or specific segments)
  6. 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.

Next Steps