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 🙏

© 2025 – Pkg Stats / Ryan Hefner

amisend

v1.0.4

Published

Implementation of amisend email

Readme

Amisend Node.js SDK

Node.js library for the Amisend API.

Complete documentation

This library is an implementation made in javascript of the Email Service API

Install

Npm:

npm install --save amisend

Or using Yarn:

yarn add amisend

Getting started

Authenticate with your Api Key

Create an account at amisend and get your API Key.

// CommonJS
const Amisend = require("amisend");

// ES6 / Typescript
import Amisend from "amisend";

const amisend = new Amisend({
  apiKey: "YOUR_API_KEY",
});

Usage

Emails

List emails

amisend.emails
  .list({ page: 1, limit: 10 })
  .then((emails) => {
    // Handle emails
  })
  .catch((error) => console.log(error));

Send email

amisend.emails
  .send({
    from: "Example <[email protected]>",
    to: ["[email protected]"],
    subject: "hello world",
    html: "<p>It works!</p>",
  })
  .then((response) => {
    // Handle response
  })
  .catch((error) => console.log(error));

Contacts

List contacts in an audience

amisend.contacts
  .list({ audienceId: "audience-id", page: 1, limit: 10 })
  .then((contacts) => {
    // Handle contacts
  })
  .catch((error) => console.log(error));

Create a contact

amisend.contacts
  .create({
    audienceId: "audience-id",
    name: "Sebastián",
    email: "[email protected]",
  })
  .then((response) => {
    // Handle response
  })
  .catch((error) => console.log(error));

Update a contact

amisend.contacts
  .update({
    audienceId: "audience-id",
    contactId: "contact-id",
    name: "Sebastián Updated",
  })
  .then((response) => {
    // Handle response
  })
  .catch((error) => console.log(error));

Delete a contact

amisend.contacts
  .delete({ audienceId: "audience-id", contactId: "contact-id" })
  .then((response) => {
    // Handle response
  })
  .catch((error) => console.log(error));

Domains

List domains

amisend.domains
  .list({})
  .then((domains) => {
    // Handle domains
  })
  .catch((error) => console.log(error));

Create a domain

amisend.domains
  .create({ name: "example.com" })
  .then((domain) => {
    // Handle domain
  })
  .catch((error) => console.log(error));

Retrieve a domain

amisend.domains
  .retrieve({ domainId: "domain-id" })
  .then((domain) => {
    // Handle domain
  })
  .catch((error) => console.log(error));

Delete a domain

amisend.domains
  .delete({ domainId: "domain-id" })
  .then((response) => {
    // Handle response
  })
  .catch((error) => console.log(error));

Check a domain

amisend.domains
  .check({ domainId: "domain-id" })
  .then((result) => {
    // Handle result
  })
  .catch((error) => console.log(error));

Audiences

List audiences

amisend.audiences
  .list({ page: 1, limit: 10 })
  .then((audiences) => {
    // Handle audiences
  })
  .catch((error) => console.log(error));

Create an audience

amisend.audiences
  .create({ name: "Newsletter" })
  .then((audience) => {
    // Handle audience
  })
  .catch((error) => console.log(error));

Retrieve an audience

amisend.audiences
  .retrieve({ audienceId: "audience-id" })
  .then((audience) => {
    // Handle audience
  })
  .catch((error) => console.log(error));

Delete an audience

amisend.audiences
  .delete({ audienceId: "audience-id" })
  .then((response) => {
    // Handle response
  })
  .catch((error) => console.log(error));

API Keys

List API keys

amisend.apiKeys
  .list()
  .then((apiKeys) => {
    // Handle API keys
  })
  .catch((error) => console.log(error));

Create an API key

amisend.apiKeys
  .create({ name: "My Key" })
  .then((apiKey) => {
    // Handle API key
  })
  .catch((error) => console.log(error));

Delete an API key

amisend.apiKeys
  .delete({ apiKeyId: "api-key-id" })
  .then((response) => {
    // Handle response
  })
  .catch((error) => console.log(error));

Broadcasts

List broadcasts

amisend.broadcasts
  .list({ page: 1, limit: 10 })
  .then((broadcasts) => {
    // Handle broadcasts
  })
  .catch((error) => console.log(error));

Create a broadcast

amisend.broadcasts
  .create({
    name: "Promo",
    from: "Example <[email protected]>",
    audience: "audience-id",
    subject: "Promo subject",
    html: "<p>Promo content</p>",
  })
  .then((broadcast) => {
    // Handle broadcast
  })
  .catch((error) => console.log(error));

Retrieve a broadcast

amisend.broadcasts
  .retrieve({ broadcastId: "broadcast-id" })
  .then((broadcast) => {
    // Handle broadcast
  })
  .catch((error) => console.log(error));

Update a broadcast

amisend.broadcasts
  .update({ broadcastId: "broadcast-id", subject: "New subject" })
  .then((broadcast) => {
    // Handle broadcast
  })
  .catch((error) => console.log(error));

Delete a broadcast

amisend.broadcasts
  .delete({ broadcastId: "broadcast-id" })
  .then((response) => {
    // Handle response
  })
  .catch((error) => console.log(error));

Send a broadcast

amisend.broadcasts
  .send({ broadcastId: "broadcast-id" })
  .then((result) => {
    // Handle result
  })
  .catch((error) => console.log(error));

Unsubscribe a contact from a broadcast

amisend.broadcasts
  .unsubscribe({ broadcastId: "broadcast-id", contactId: "contact-id" })
  .then((result) => {
    // Handle result
  })
  .catch((error) => console.log(error));

See the official documentation for more details and advanced use cases.