Understand what the Lumail TypeScript SDK is for and when to use it in your application.
The Lumail TypeScript SDK is the easiest way to integrate the Lumail API into a JavaScript or TypeScript project. It gives you a typed client for subscribers, campaigns, transactional emails, tags, events, and Lumail tools.
It is built for web apps, SaaS backends, serverless functions, internal dashboards, and scripts. It is not a separate AI-agent runtime. If you are connecting Claude, Cursor, or another assistant directly to Lumail, use the MCP integration. If you need language-agnostic access, use the REST API or Tools API.
pnpm add lumail
import { Lumail } from "lumail";
const lumail = new Lumail({
apiKey: process.env.LUMAIL_API_KEY!,
});
const { subscriber } = await lumail.subscribers.create({
| Integration point | What the SDK does |
|---|---|
| Signup forms | Create or update subscribers and trigger workflows |
| Checkout flows | Tag customers, store plan fields, and track payment events |
| Product events | Record subscriber activity for segmentation and analytics |
| Transactional email | Send email from a verified domain |
| Internal admin tools | Search, update, tag, or unsubscribe subscribers |
| Scheduled jobs | Create, schedule, and send campaigns from backend code |
| Interface | Best for |
|---|---|
| TypeScript SDK | JavaScript or TypeScript apps that want typed API access |
| REST API | Any language or framework |
| Tools API | Calling Lumail tool actions through one endpoint |
| MCP | Letting AI assistants discover and call Lumail tools directly |
| CLI | Terminal workflows and shell scripts |