SuperSend TX with Node.js

Use the Node SDK in Express, Fastify, workers, cron jobs, queue consumers, or any other server runtime where your API key can stay private.

1. Install the SDK

npm install supersendtx

2. Configure your API key

export SUPERSENDTX_API_KEY=stx_your_key_here

3. Send an email

import { SuperSendTX } from 'supersendtx'

const tx = new SuperSendTX(process.env.SUPERSENDTX_API_KEY!)

const result = await tx.emails.send({
  from: 'ops@yourdomain.com',
  to: 'user@example.com',
  subject: 'Your receipt',
  html: '<p>Thanks for your purchase.</p>',
})

console.log(result.id, result.status)