Before you start
You'll need:
- A RelayPost account (sign up free)
- Access to your domain's DNS settings
- Access to your application code where SendGrid is integrated
The migration can be done incrementally — you don't need to switch everything at once.
Step 1: Create your RelayPost account
Sign up at app.relaypost.dev/register. Create an organization and generate an API key from the dashboard.
Step 2: Add and verify your domain
In the RelayPost dashboard, go to Domains and add your sending domain. RelayPost will provide DKIM and SPF DNS records to add. This typically takes 5 minutes to configure and under an hour for DNS propagation.
You can keep your existing SendGrid DNS records active during the transition.
Step 3: Replace API calls
SendGrid's API:
// SendGrid
const sgMail = require("@sendgrid/mail");
sgMail.setApiKey(process.env.SENDGRID_API_KEY);
await sgMail.send({
to: "[email protected]",
from: "[email protected]",
subject: "Welcome",
html: "<p>Thanks for signing up.</p>"
}); RelayPost equivalent:
// RelayPost — no SDK needed
await fetch("https://api.relaypost.dev/v1/emails/send", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_RELAYPOST_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
from: "[email protected]",
to: "[email protected]",
subject: "Welcome",
html: "<p>Thanks for signing up.</p>"
})
}); Step 4: Replace SMTP configuration (if using SMTP)
If you send via SMTP, update your SMTP settings:
| Setting | SendGrid | RelayPost |
|---|---|---|
| Host | smtp.sendgrid.net | smtp.relaypost.dev |
| Port | 587 | 587 |
| Username | apikey | Your SMTP username |
| Password | Your SendGrid API key | Your SMTP password |
| Encryption | STARTTLS | STARTTLS |
Step 5: Update webhook endpoints
If you use SendGrid's Event Webhook, configure equivalent webhooks in RelayPost. RelayPost sends delivery, bounce, complaint, open, and click events via HTTP POST to your endpoint.
Step 6: Test and verify
Before switching production traffic:
- Send test emails to Gmail, Outlook, and Yahoo accounts
- Verify DKIM and SPF pass (check email headers)
- Confirm webhook events are received
- Check the RelayPost dashboard for delivery logs
Step 7: Switch production traffic
Once testing is complete, route production email through RelayPost. Start with non-critical emails (notifications, updates) before switching transactional email (password resets, receipts).
After confirming everything works, remove your SendGrid DNS records and revoke your SendGrid API key.
Migration checklist
- ☐ RelayPost account created
- ☐ API key generated
- ☐ Domain added and verified (DKIM/SPF passing)
- ☐ API calls updated in application code
- ☐ SMTP configuration updated (if applicable)
- ☐ Webhooks configured
- ☐ Test emails sent and verified
- ☐ Production traffic switched
- ☐ SendGrid DNS records removed
- ☐ SendGrid API key revoked
Frequently asked questions
How long does it take to migrate from SendGrid?
Most teams complete the migration in under an hour. Domain verification takes 5 minutes, API integration takes 10-30 minutes depending on complexity, and DNS propagation takes up to 48 hours (though usually under 1 hour).
Can I run SendGrid and RelayPost in parallel during migration?
Yes. You can route some email through RelayPost and some through SendGrid during the transition. This is the recommended approach — start with non-critical emails, verify delivery, then migrate the rest.
Do I need to change my DNS records?
Yes. You'll add new DKIM and SPF records for RelayPost. You can keep your existing SendGrid records during the transition and remove them after migration is complete.
Will my deliverability be affected during migration?
If you keep your existing authentication records active during the transition and warm up your RelayPost sending gradually, deliverability should not be affected. RelayPost uses high-reputation sending infrastructure.
Ready to switch?
Start free with 1,000 emails/mo. Migration takes under an hour.
Get Started Free Compare Features