npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sendi-email

v0.1.7

Published

Node.js SDK for the Sendi email API

Downloads

691

Readme

Sendi Node.js SDK

The official Node.js SDK for the Sendi email API.

Install

npm install sendi-email

Quick Start

import { Sendi } from 'sendi-email';

const sendi = new Sendi('snd_your_api_key');

await sendi.emails.send({
  from: '[email protected]',
  to: '[email protected]',
  subject: 'Hello from Sendi',
  html: '<p>It just works.</p>'
});

Emails

Send an email

const { id } = await sendi.emails.send({
  from: '[email protected]',
  to: '[email protected]',
  subject: 'Welcome!',
  html: '<h1>Welcome aboard</h1>',
  // Optional
  cc: '[email protected]',
  bcc: ['[email protected]', '[email protected]'],
  replyTo: '[email protected]',
  attachments: [{ filename: 'invoice.pdf', content: '<base64>' }],
  tags: { campaign: 'welcome' },
  scheduledAt: '2026-03-08T12:00:00Z', // Schedule for later
});

Batch send (up to 100)

const { data } = await sendi.emails.batch([
  { from: '[email protected]', to: '[email protected]', subject: 'Hi', text: 'Hello' },
  { from: '[email protected]', to: '[email protected]', subject: 'Hi', text: 'Hello' },
]);
// data = [{ emailId: '...' }, { emailId: '...' }]

Get an email

const email = await sendi.emails.get('email_id');

List emails

const { emails, pagination } = await sendi.emails.list({
  page: 1,
  limit: 50,
  status: 'delivered',
});

Update schedule

await sendi.emails.update('email_id', {
  scheduledAt: '2026-03-09T15:00:00Z',
});

Cancel scheduled email

await sendi.emails.cancel('email_id');

Domains

// Add a domain
const domain = await sendi.domains.create({ domain: 'yourdomain.com' });

// List domains
const domains = await sendi.domains.list();

// Verify domain
const { verified } = await sendi.domains.verify('domain_id');

// Remove domain
await sendi.domains.remove('domain_id');

Webhooks

// Create endpoint
const endpoint = await sendi.webhooks.create({
  url: 'https://yourapp.com/webhooks',
  events: ['email.delivered', 'email.bounced', 'email.opened'],
});
// endpoint.secret — save this for signature verification

// List endpoints
const endpoints = await sendi.webhooks.list();

// Toggle active/inactive
await sendi.webhooks.update('webhook_id', { active: false });

// Remove
await sendi.webhooks.remove('webhook_id');

Analytics

// Email time series (7 or 30 days)
const { result, totalCounts } = await sendi.analytics.timeSeries({ days: 30 });

// Reputation metrics
const { bounceRate, complaintRate } = await sendi.analytics.reputation();

// Filter by domain
const stats = await sendi.analytics.timeSeries({ days: 7, domainId: 'domain_id' });

Error Handling

import { Sendi, SendiError } from 'sendi-email';

try {
  await sendi.emails.send({ ... });
} catch (err) {
  if (err instanceof SendiError) {
    console.log(err.message);    // "Rate limit exceeded"
    console.log(err.statusCode); // 429
  }
}

License

MIT