Skip to main content

Prerequisites

Before you start, ensure you have:

Step 1: Get Your API Token

  1. Log into your Lettermint dashboard
  2. Navigate to Projects[Your Project]API Token
  3. Copy your API token
Your API token grants full access to send emails on your behalf. Never expose it in client-side code, public repositories, or logs. Store it securely as an environment variable.
API token location in the Lettermint dashboard

Step 2: Send Your First Email

Choose your preferred method:
import { Lettermint } from "lettermint";

const lettermint = new Lettermint({
  apiToken: process.env.LETTERMINT_API_TOKEN
});

const response = await lettermint.email
  .from("You <you@yourdomain.com>")
  .to("recipient@example.com")
  .subject("Hello from Lettermint!")
  .text("This is my first email sent via Lettermint.")
  .send();

console.log(`Email sent with ID: ${response.message_id}`);
Install the SDK first: npm install lettermint (Node.js), composer require lettermint/lettermint-php (PHP), or pip install lettermint (Python).

Expected Response

A successful request returns a 202 Accepted response:
{
  "message_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "status": "pending"
}
Lettermint does not have a rate limit on its sending API. Send as many emails as you need without worrying about throttling.

Step 3: Check Your Emails

Go to the Emails overview in your dashboard to see your email’s delivery status.

Next Steps

Going Further

Once you’re comfortable with the basics, explore advanced features:
  • Idempotency — Prevent duplicate sends with idempotency keys
  • Tags — Organize and filter emails with custom tags
  • HTML Content — Send rich HTML emails alongside plain text
  • Tracking — Monitor opens and clicks with built-in tracking
Need help? Create a support ticket on your support page.