Password reset and verification emails

Transactional auth mail — password resets, email verification, magic links — is a core SuperSend TX use case. Send them with POST /emails (or the npm SDK) from a verified domain.


  1. Create an API key in the dashboard
  2. Verify your sending domain (Domains)
  3. When your app issues a reset or verify token, call SuperSend TX with the link in html / text
  4. Optionally track delivery via webhooks

Example: password reset

import { SuperSendTX } from 'supersendtx'

const client = new SuperSendTX(process.env.SUPERSENDTX_API_KEY)

export async function sendPasswordResetEmail({
  to,
  resetUrl,
}: {
  to: string
  resetUrl: string
}) {
  return client.emails.send({
    from: 'noreply@yourdomain.com',
    to,
    subject: 'Reset your password',
    html: `<p>Reset your password:</p><p><a href="${resetUrl}">${resetUrl}</a></p><p>If you did not request this, you can ignore this email.</p>`,
    text: `Reset your password: ${resetUrl}\n\nIf you did not request this, you can ignore this email.`,
  })
}

curl:

curl -X POST https://api.supersendtx.com/emails \
  -H "Authorization: Bearer $SUPERSENDTX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "noreply@yourdomain.com",
    "to": "user@example.com",
    "subject": "Reset your password",
    "html": "<p><a href=\"https://yourapp.com/reset?token=…\">Reset password</a></p>"
  }'

Example: email verification

await client.emails.send({
  from: 'noreply@yourdomain.com',
  to: user.email,
  subject: 'Verify your email',
  html: `<p>Confirm your email:</p><p><a href="${verifyUrl}">Verify email</a></p>`,
  text: `Confirm your email: ${verifyUrl}`,
})

Templates

For repeated auth copy, store HTML in Templates and send with template variables instead of inlining markup every time.


Auth providers (Supabase, Clerk, Auth.js)

Those products often expect custom SMTP. SuperSend TX supports SMTP relay credentials (SMTP) and HTTP hooks. For Supabase, see Supabase Auth email. For Clerk and Auth.js, see Auth provider email.