WWistfare Mail

Quickstart

Send your first email with Wistfare Mail in under 5 minutes.

1. Get Your API Key

Log in to the Wistfare Mail dashboard, go to Settings > API Keys, and create a new key with the emails:send scope. Your key will look like wm_a1b2c3d4e5f6... — copy it, you will only see it once.

2. Install the SDK

npm install wistmail

3. Send Your First Email

import { WistMail } from 'wistmail'
 
const wm = new WistMail({
  apiKey: 'wm_your_api_key',
  baseUrl: 'https://mail.wistfare.com',
})
 
const { id } = await wm.emails.send({
  from: 'hello@wistfare.com',
  to: 'recipient@example.com',
  subject: 'Hello from Wistfare Mail!',
  html: '<h1>It works!</h1><p>Your email infrastructure is live.</p>',
})
 
console.log('Email sent:', id) // eml_abc123...

4. Check Delivery Status

const status = await wm.emails.get('eml_abc123')
console.log(status.status)      // 'delivered'
console.log(status.deliveredAt) // '2026-03-28T12:00:00Z'

5. Set Up Webhooks (Optional)

Receive real-time delivery events by creating a webhook endpoint:

const webhook = await wm.webhooks.create({
  url: 'https://yourapp.com/webhooks/email',
  events: ['email.delivered', 'email.bounced', 'email.opened'],
})
 
console.log(webhook.secret) // whsec_... — use this to verify signatures

Next Steps

  • Sending Emails — full sending API reference with batch support
  • Webhooks — all webhook events and signature verification
  • Audiences — manage contact lists and subscriptions

On this page