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

@senddy.io/senddy

v0.1.0

Published

Official Node.js/TypeScript SDK for Senddy

Readme

Senddy TypeScript SDK

Official TypeScript/JavaScript SDK for the Senddy email API.

Installation

Requires Node.js 18.13+.

npm install senddy

Quick Start

import { EmailClient } from 'senddy';

const client = new EmailClient('sk_your_api_key');

// Send an email
const result = await client.emails.send({
  from: '[email protected]',
  to: '[email protected]',
  subject: 'Hello',
  html: '<p>Welcome!</p>',
});

console.log(result.id); // email_abc123

Configuration

const client = new EmailClient('sk_your_api_key', {
  baseUrl: 'https://api.senddy.io', // default: http://localhost:3012
  timeout: 30_000, // ms, default: 30000
  retries: 2, // default: 2
  headers: { 'X-Custom': 'value' }, // extra headers on every request
});

If no API key is passed, the SDK reads from the SENDDY_API_KEY environment variable.

Emails

Send

const result = await client.emails.send(
  {
    from: '[email protected]',
    to: ['[email protected]', '[email protected]'],
    subject: 'Hello',
    html: '<p>Hi there</p>',
    text: 'Hi there', // optional plain-text fallback
    cc: '[email protected]', // optional
    bcc: '[email protected]', // optional
    reply_to: '[email protected]', // optional
    tags: { campaign: 'welcome' }, // optional metadata
    attachments: [
      {
        // optional
        filename: 'report.pdf',
        content: base64String,
        content_type: 'application/pdf',
      },
    ],
  },
  {
    idempotencyKey: 'unique-key', // optional, prevents duplicate sends
  },
);

Get

const email = await client.emails.get('email_abc123');
console.log(email.status); // 'delivered'
console.log(email.recipients); // recipient details
console.log(email.events); // delivery events

List

const { data, pagination } = await client.emails.list({
  limit: 25,
  offset: 0,
  status: 'delivered',
  since: '2026-01-01T00:00:00Z',
});

Download EML

const { content, contentType } = await client.emails.download('email_abc123');
// content is a Buffer containing the raw EML

Suppressions

List

const { data, pagination } = await client.suppressions.list({
  limit: 50,
  search: 'example.com',
  reason: 'hard_bounce',
});

Create

const entry = await client.suppressions.create({
  email_address: '[email protected]',
});

Delete

const result = await client.suppressions.delete('[email protected]');
console.log(result.removed); // true

Error Handling

import { ValidationError, RateLimitError, APIError } from 'senddy';

try {
  await client.emails.send({
    /* ... */
  });
} catch (err) {
  if (err instanceof ValidationError) {
    console.error('Validation:', err.details);
  } else if (err instanceof RateLimitError) {
    console.error(`Rate limited. Retry after ${err.retryAfter}s`);
  } else if (err instanceof APIError) {
    console.error(`API error ${err.statusCode}: ${err.message}`);
  }
}

Error Types

| Class | Status | Description | | --------------------- | ------ | ------------------------------------------- | | ValidationError | 400 | Invalid request, includes .details array | | AuthenticationError | 401 | Missing or invalid API key | | ForbiddenError | 403 | Insufficient permissions | | NotFoundError | 404 | Resource not found | | RateLimitError | 429 | Rate limit exceeded, includes .retryAfter | | InternalError | 5xx | Server error |

Retries

The SDK automatically retries on 429 and 5xx responses with exponential backoff and jitter. Retries respect the Retry-After header. Non-retryable errors (4xx except 429) are thrown immediately.

Requirements

  • Node.js >= 18.13.0
  • Zero runtime dependencies (uses native fetch)

License

MIT