← All Guides
Migrate from SendGrid to AISend
AISend offers a simpler, more modern API than SendGrid with AI-powered delivery optimization. Here's how to make the switch.
Step 1: Sign up for AISend
Create a free account at aisend.app. No credit card required. Get your API key from the dashboard.
Step 2: Replace API calls
AISend's API is simpler than SendGrid's:
// SendGrid (before)
const sgMail = require('@sendgrid/mail');
sgMail.setApiKey(process.env.SENDGRID_API_KEY);
sgMail.send({
to: 'user@example.com',
from: 'hello@yourdomain.com',
subject: 'Hello',
html: '<p>Hello</p>',
});
// AISend (after)
const aisend = new AISend(process.env.AISEND_API_KEY);
await aisend.emails.send({
to: 'user@example.com',
from: 'hello@yourdomain.com',
subject: 'Hello',
html: '<p>Hello</p>',
});Step 3: Update DNS records
Add your domains in the AISend dashboard. Update SPF and DKIM DNS records to point to AISend instead of SendGrid.
Step 4: Set up webhooks
Configure webhook URLs in the AISend dashboard for delivery events. The event format is similar to SendGrid's but cleaner.