Skip to main content

Overview

Moving from SendGrid to Unosend simplifies your email infrastructure. No more complex template engines or Web API v3 quirks — just a clean REST API. Why switch:
  • Simpler API — clean JSON payloads vs SendGrid’s nested personalizations objects
  • Better pricing — up to 60% lower at scale
  • Unlimited broadcasts — no separate marketing email limits
  • Built-in SMS + WhatsApp — no need for separate Twilio services

Migration Steps

1. Create Your Unosend Account

  1. Sign up at unosend.co/signup
  2. Add and verify your sending domain
  3. Generate an API key

2. Update Environment Variables

- SENDGRID_API_KEY=SG.xxxxxxxxxxxx
+ UNOSEND_API_KEY=un_xxxxxxxxxxxx

3. Update Your Code

Before (SendGrid):
const sgMail = require('@sendgrid/mail');
sgMail.setApiKey(process.env.SENDGRID_API_KEY);

await sgMail.send({
  to: 'user@example.com',
  from: 'hello@yourdomain.com',
  subject: 'Hello',
  html: '<p>Welcome!</p>'
});
After (Unosend):
import { Unosend } from 'unosend';
const unosend = new Unosend(process.env.UNOSEND_API_KEY);

await unosend.emails.send({
  from: 'hello@yourdomain.com',
  to: ['user@example.com'],
  subject: 'Hello',
  html: '<p>Welcome!</p>'
});

4. Update DNS Records

Remove SendGrid’s DNS records and add Unosend’s:
TypeNameValue
TXTunosend._domainkeyYour DKIM public key
MXsend10 mail.unosend.co
TXTsendv=spf1 include:_spf.unosend.co ~all

5. Migrate Contacts

Export contacts from SendGrid (Marketing → Contacts → Export) as CSV, then import into Unosend:
  1. Go to Audiences in the Unosend dashboard
  2. Create an audience
  3. Click Import Contacts
  4. Upload your SendGrid CSV export

Key Differences

FeatureSendGridUnosend
Email payloadNested personalizations arrayFlat JSON object
to field[{"email": "..."}]["email@..."]
HTML contentcontent: [{type, value}]html: "..."
WebhooksEvent WebhookNative webhooks
TemplatesDynamic Templates (Handlebars)Mustache variables
SMTPPort 587Ports 25, 465, 587, 2525

Pricing Comparison

Emails/MonthSendGridUnosendSavings
40,000$20/mo (Essentials)$20/moSame
100,000$45/mo$50/mo
300,000Custom$165/mo
1,000,000Custom$600/mo
Unosend includes broadcasts, SMS, WhatsApp, and email validation at no extra cost.

Quick Start Guide

Get sending in under 5 minutes