PristineSend
Get started
Getting started

Quickstart

Go from signup to a sent email in about five minutes. The fastest path is the official Node / TypeScript SDK — a raw curl request works just as well.

Prerequisites

Get your API key

After signing in, go to Settings → API Keys and create a key. A live key starts with ps_live_; a sandbox key starts with ps_test_ (captured, never delivered). Treat it like a password — keep it server-side and out of source control.

Keep it in an environment variable
export PRISTINESEND_API_KEY=ps_live_xxxxxxxxxxxxxxxx

Install the SDK

The SDK ships ESM + CJS type definitions and has no required dependencies. Skip this step if you’re using curl.

npm install pristinesend

Send your first email

Send one transactional email. The SDK reads the API base URL and auth from your key — and attaches an idempotency key on every send, so a network retry never double-sends.

"color:#ff7b72">import { PristineSend } "color:#ff7b72">from "pristinesend"

"color:#ff7b72">const ps = "color:#ff7b72">new PristineSend(process.env.PRISTINESEND_API_KEY!)

"color:#ff7b72">const { id } = "color:#ff7b72">await ps.emails.send({
  to: "recipient@example.com",
  "color:#ff7b72">from: "hello@yourdomain.com",
  subject: "Hello ">from PristineSend!",
  html: "<p>Your first email via PristineSend 🎉</p>",
})

console.log("Sent:", id)

A successful response looks like:

{
  "success": true,
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "message": "Email sent successfully"
}

If from is omitted, your workspace default sender is used. A supplied from must be on a verified domain, or the API returns 403 sender_not_verified.

Check the logs

Every send is recorded under Logs in your dashboard — filter by status, recipient, or date — and is readable over the API at GET /v1/emails/:id using the id from the response. Test-mode sends carry a Test badge.

Next steps