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

@sendsend.io/node

v0.1.1

Published

TypeScript SDK for the SendSend delivery API

Readme

SendSend Node.js SDK

npm version npm bundle size

The official Node.js / TypeScript SDK for the SendSend delivery API.

Install

npm install @sendsend.io/node

Setup

import { SendSend } from "@sendsend.io/node";

const sendsend = new SendSend({ apiKey: "ss_live_..." });

Usage

Send a webhook

const { jobId } = await sendsend.webhooks.send({
  configId: "cfg_abc123",
  items: [
    { id: "evt_1", payload: { userId: "u_42", event: "signup" } },
    { id: "evt_2", payload: { userId: "u_43", event: "purchase" } },
  ],
});

console.log(jobId); // "job_k7x..."

Send an email

const { jobId } = await sendsend.email.send({
  configId: "cfg_email",
  from: "[email protected]",
  subject: "Welcome!",
  html: "<h1>Hi {{name}}</h1>",
  recipients: [
    { to: "[email protected]", variables: { name: "Alice" } },
    { to: "[email protected]", variables: { name: "Bob" } },
  ],
});

Send an email with a template

await sendsend.email.send({
  configId: "cfg_email",
  templateId: "tmpl_welcome",
  recipients: [{ to: "[email protected]", variables: { name: "Alice" } }],
  attachments: [
    {
      filename: "invoice.pdf",
      content: base64String,
      contentType: "application/pdf",
    },
  ],
});

Check job status

const job = await sendsend.jobs.get("job_k7x...");

console.log(job.status); // "completed"
console.log(job.processedItems); // 2
console.log(job.failedItems); // 0

Check bulk send status

const bulk = await sendsend.bulkSends.get("bulk_abc...");

console.log(bulk.status); // "completed"
console.log(bulk.totalItems); // 10000
console.log(bulk.jobs); // individual job breakdowns

Manage configs

// List all configs
const configs = await sendsend.configs.list();

// Create a webhook config
const config = await sendsend.configs.create({
  name: "My Webhook",
  channel: "webhook",
  credentials: {
    authType: "bearer",
    apiKey: "your-endpoint-token",
  },
  settings: {
    webhookUrl: "https://api.yourapp.com/webhook",
    retryAttempts: 3,
    timeoutMs: 5000,
  },
  rateLimit: { burst: 50, rate: 100, periodSeconds: 60 },
});

// Update a config
await sendsend.configs.update(config.id, {
  settings: { retryAttempts: 5 },
});

// Delete a config
await sendsend.configs.delete(config.id);

Error handling

All API errors throw a SendSendError with the HTTP status and response body.

import { SendSendError } from "@sendsend.io/node";

try {
  await sendsend.webhooks.send({ configId: "bad", items: [] });
} catch (err) {
  if (err instanceof SendSendError) {
    console.log(err.status); // 400, 401, 404, 429, etc.
    console.log(err.message);

    if (err.isAuthError) {
      // 401 — invalid or expired API key
    }
    if (err.isRateLimitError) {
      // 429 — slow down
    }
    if (err.isValidationError) {
      // 400 — bad request params
    }
  }
}

Timeout and connection errors throw SendSendTimeoutError and SendSendConnectionError respectively.

Configuration

const sendsend = new SendSend({
  apiKey: "ss_live_...",
  baseUrl: "https://api.sendsend.dev", // default
  timeout: 30_000, // 30s default
  maxRetries: 2, // default, with exponential backoff
});

Retries: Server errors (5xx) and timeouts are retried automatically with exponential backoff (up to 8s between attempts). Client errors (4xx) are never retried.

Requirements

  • Node.js 18+ (uses native fetch)
  • TypeScript 5.0+ (optional)

License

MIT