Skip to Content
JavaScript SDK

JavaScript SDK

The official Mailpulse SDK for JavaScript, TypeScript, React, and Vue applications.

Installation

npm install mailpulse # or pnpm add mailpulse # or yarn add mailpulse

Features

  • TypeScript First - Full type definitions included
  • Framework Agnostic - Works with vanilla JS, React, Vue, or any framework
  • Lightweight - Minimal bundle size with tree-shaking support
  • Modern - ESM and CommonJS builds available

Quick Start

import { MailpulseClient } from 'mailpulse'; const client = new MailpulseClient({ apiKey: 'your-api-key', }); // Get global stats const stats = await client.getStats(); console.log(stats.openRate); // Get campaigns const { campaigns } = await client.getCampaigns(); // Get campaign stats const campaignStats = await client.getCampaignStats('campaign-id', { period: '30d' });

Configuration

OptionTypeRequiredDefaultDescription
apiKeystringYes-Your Mailpulse API key
apiUrlstringNohttps://mailpulse-io.lyten.agencyAPI base URL

Available Methods

MethodDescription
getStats()Get global tracking statistics
getCampaigns()List all campaigns
getCampaign(id)Get campaign details with emails
getCampaignStats(id, options)Get detailed campaign analytics
registerEmail(data)Register an email for tracking

Framework Integrations

Choose your framework to get started:

Last updated on
Mailpulse Documentation