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

@emalia/sdk

v1.0.0

Published

Official Emalia email marketing SDK for Node.js

Readme

@emalia/sdk

Official Node.js SDK for Emalia — email marketing platform.

Installation

npm install @emalia/sdk

Quick Start

import { Emalia } from '@emalia/sdk';

const emalia = new Emalia({
  apiKey: 'ema_your_api_key_here',
});

// Send an email
const result = await emalia.send({
  to: '[email protected]',
  plantilla_id: 'template-uuid',
  variables: { nombre: 'Juan' },
});

// Create a contact
await emalia.contacts.create({
  email: '[email protected]',
  nombre: 'Juan Perez',
  lista_id: 'list-uuid',
});

// List campaigns
const campaigns = await emalia.campaigns.list();

API Reference

Initialize

const emalia = new Emalia({
  apiKey: 'ema_xxx',        // Required - your API key
  baseUrl: 'https://...',   // Optional - defaults to https://emaliamail.com
});

Send Email

await emalia.send({
  to: '[email protected]',
  subject: 'Welcome!',
  html: '<h1>Hello {{nombre}}</h1>',
  variables: { nombre: 'Juan' },
  tags: ['bienvenida'],
});

Send Batch

await emalia.sendBatch({
  plantilla_id: 'template-uuid',
  destinatarios: [
    { email: '[email protected]', nombre: 'Ana' },
    { email: '[email protected]', nombre: 'Bruno' },
  ],
});

Contacts

// List contacts
const { data } = await emalia.contacts.list({ page: 1, search: 'juan' });

// Create contact
await emalia.contacts.create({
  email: '[email protected]',
  nombre: 'New User',
  lista_id: 'list-uuid',
  tags: ['cliente'],
});

Lists

const { data } = await emalia.lists.list();
await emalia.lists.create({ nombre: 'VIP Clients', color: '#D65444' });

Tags

const { data } = await emalia.tags.list();
await emalia.tags.create({ nombre: 'premium' });
await emalia.tags.remove({ contacto_id: 'uuid', tag_id: 'uuid' });

Campaigns

const { data } = await emalia.campaigns.list({ estado: 'enviada' });

Automations

const { data } = await emalia.automations.list();

Webhooks

// List webhooks
const { data } = await emalia.webhooks.list();

// Create webhook
await emalia.webhooks.create({
  url: 'https://yourapp.com/webhook',
  eventos: ['email.sent', 'email.opened', 'email.clicked'],
});

// Update webhook
await emalia.webhooks.update('webhook-id', { activo: false });

// Delete webhook
await emalia.webhooks.remove('webhook-id');

Webhook Events

  • email.sent — Email delivered
  • email.opened — Email opened
  • email.clicked — Link clicked
  • email.bounced — Email bounced
  • email.complained — Spam complaint
  • contacto.created — Contact created
  • contacto.updated — Contact updated
  • contacto.unsubscribed — Contact unsubscribed
  • lista.subscribed — Added to list
  • lista.unsubscribed — Removed from list
  • campana.sent — Campaign sent
  • automation.started — Automation triggered
  • automation.completed — Automation finished

License

MIT — EME Automations