Sending Individual Emails

Send emails using our API, the Node.js SDK, or the dashboard interface. This guide covers all three approaches.

Using the Notify NPM Package

First, install the Notify NPM package:


npm install notifycx

Then, use the following code to send a basic email, or one with variables (i.e. template-based):

import Notify from 'notifycx';

const notify = new Notify(process.env.NOTIFY_API_KEY);

// Send a basic email
await notify.sendEmail({
  to: 'recipient@example.com',
  subject: 'Hello!',
  name: 'John Doe',
  message: 'Your email content here'
});

// Send using a template
await notify.sendEmailFromTemplate({
  to: 'recipient@example.com',
  from: 'noreply@notify.cx',
  templateId: '<your_template_id>',
  variables: {
    name: 'John Doe',
    order_id: 'ORD-123'
  }
});

Using the Notify API

// Basic email
await fetch('https://notify.cx/api/send-email', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': process.env.NOTIFY_API_KEY
  },
  body: JSON.stringify({
    to: 'recipient@example.com',
    subject: 'Hello!',
    name: 'John Doe',
    message: 'Your email content here'
  })
});

// Template email
await fetch('https://notify.cx/api/send-email-from-template', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': process.env.NOTIFY_API_KEY
  },
  body: JSON.stringify({
    to: 'recipient@example.com',
    from: 'noreply@notify.cx',
    templateId: '<your_template_id>',
    variables: {
      name: 'John Doe',
      order_id: 'ORD-123'
    }
  })
});

Sending via Dashboard

Basic Emails

  1. Navigate to notify.cx/dashboard/email/send
  2. Fill in recipient details
  3. Compose your message
  4. Click "Send Email"

Template Emails

  1. Go to notify.cx/dashboard/email/template-send
  2. Select your template
  3. Fill in variables
  4. Preview the email
  5. Send to recipient

Tracking Delivery

Via Dashboard

  1. Visit notify.cx/dashboard/logs or notify.cx/dashboard/analytics
  2. Find your email
  3. View content of email, delivery status, and more.

Via API

Coming soon.

Via NPM Package

Coming soon.


Next Steps