PPlunk Docs

Quickstart

Send your first email with Plunk in under five minutes.

1. Create an account

Sign up and create a project. Every project gets a secret key and a public key from the project settings page.

2. Install the SDK

bash
npm install @plunk/node

3. Send an email

typescript
import Plunk from "@plunk/node";

const plunk = new Plunk(process.env.PLUNK_SECRET_KEY!);

await plunk.emails.send({
  to: "user@example.com",
  subject: "Welcome to Acme",
  body: "<h1>Thanks for signing up!</h1>",
});

4. Track an event

Events let you trigger automations and segment contacts based on behaviour in your product.

typescript
await plunk.events.track({
  event: "user-signed-up",
  email: "user@example.com",
  data: { plan: "pro" },
});

That's it — you're ready to build automations and campaigns on top of these primitives.