Email APIs · September 21, 2026
SendGrid Free Plan Is Gone: A 30-Minute Migration Guide
SendGrid's free tier is now a 60-day trial. Here is a technical guide for engineers to migrate their transactional email to a sustainable alternative without downtime.
The End of the Forever-Free Tier
If you relied on the SendGrid free plan for a low-volume side project or a new product, you likely noticed the change: the free tier is now a 60-day trial. Once that trial expires, you must move to a paid plan, with Essentials starting at 19.95 USD per month (SendGrid Pricing). To migrate, you need to export your suppressions, update your DNS records, and swap your API integration. This process takes about 30 minutes if your templates are simple.
Assessing Your Alternatives
When choosing a replacement, you must distinguish between provider acceptance (the API accepting your request), delivery (the receiving server accepting the mail), and inbox placement (the mail avoiding the spam folder). No provider can guarantee the latter, as it depends on your sender reputation and content.
The Cost Landscape (September 2026)
For low-volume transactional mail, the price delta is significant. Sending 50,000 emails costs roughly 5 USD on Amazon SES a la carte, compared to approximately 66 USD on Postmark tiers.
- Amazon SES: Costs 0.10 USD per 1,000 emails a la carte (AWS SES Pricing). New tiered plans introduced July 21, 2026, include Essentials (0.16 USD per 1,000), Pro (0.22 USD per 1,000 plus 105 USD per month per region), and Enterprise (0.23 USD per 1,000 plus 500 USD per month).
- Resend: Offers a free tier of 3,000 emails per month capped at 100 per day. The Pro plan is 20 USD per month for 50,000 emails, with overages at 0.90 USD per 1,000 (Resend Pricing).
- Mailgun: Starts at 15 USD per month for 10,000 emails, with overages ranging from 1.80 to 1.10 USD per 1,000 (Mailgun Pricing).
- Postmark: Starts at 15 USD per month for 10,000 emails, with overages from 1.80 to 1.20 USD per 1,000 (Postmark Pricing).
- SendHQ: Provides a modern alternative for product teams and AI agents, focusing on EU-only privacy-minimized telemetry and workspace-scoped API keys.
Step 1: Data Export and Suppression Lists
Do not migrate your list without exporting your suppressions. If you send to an address that previously bounced or unsubscribed, you risk damaging your reputation with the new provider.
SendGrid allows you to export your suppression list via the UI or API. You will receive a CSV of emails that should not be contacted. When importing these into a new provider, ensure you map the "reason" (bounce vs. unsubscribe) correctly to maintain compliance with laws like GDPR or CAN-SPAM.
Step 2: DNS and Authentication
This is where most migrations fail. You cannot simply change the API key; you must prove ownership of the domain to the new provider.
DKIM, SPF, and DMARC
You will need to add new CNAME or TXT records to your DNS provider. If you are moving to SendHQ, you can use the Email DNS Checker to verify your current setup before making changes.
- SPF: Update your SPF record to include the new provider. If you are using multiple providers, remember that you cannot have multiple SPF TXT records. You must combine them into one (e.g.,
v=spf1 include:sendgrid.net include:_spf.sendhq.cc ~all). For a deeper dive, see the SPF glossary term. - DKIM: Generate new DKIM keys in your new provider's dashboard and add the resulting CNAME records to your DNS. This ensures the receiving server can verify the email was not tampered with in transit.
- DMARC: Your DMARC policy remains the same regardless of the provider, as it is a domain-level policy. However, ensure your new provider is aligned with your DMARC policy to avoid emails being rejected. Refer to the DKIM, SPF, and DMARC guide for implementation details.
Step 3: Code Migration
Most providers use a REST API. If you used SendGrid's dynamic templates, you will need to migrate those HTML/CSS layouts to the new provider's template engine.
Example: From SendGrid to a Generic REST API
SendGrid uses a specific JSON structure for personalizations. Most modern APIs, including SendHQ, prefer a flatter structure for better readability.
SendGrid Payload:
{
"personalizations": [
{
"to": [{"email": "user@example.com"}],
"dynamic_template_data": {
"first_name": "Alice"
}
}
],
"from": {"email": "noreply@yourdomain.com"},
"template_id": "d-12345"
}
Modern API Payload (e.g., SendHQ):
{
"to": "user@example.com",
"from": "noreply@yourdomain.com",
"template_id": "welcome-email",
"variables": {
"first_name": "Alice"
}
}
Handling the Migration in Code
To avoid downtime, implement a wrapper or a strategy pattern. This allows you to toggle between providers using an environment variable.
interface EmailProvider {
send(payload: EmailPayload): Promise<void>;
}
class SendGridProvider implements EmailProvider {
async send(payload: EmailPayload) {
// SendGrid specific implementation
}
}
class SendHQProvider implements EmailProvider {
async send(payload: EmailPayload) {
// SendHQ specific implementation
}
}
const provider = process.env.EMAIL_PROVIDER === 'sendhq'
? new SendHQProvider()
: new SendGridProvider();
Step 4: AI Agents and Idempotency
If you are using AI agents to trigger emails, you face a specific risk: the agent may loop or retry a request multiple times due to a timeout, leading to the user receiving ten identical emails.
Sending an email is an external side effect. You must implement idempotency. An idempotency key is a unique identifier sent in the header that tells the API, "If you have already seen this key, do not send the email again; just return the original success response."
Agent-Ready Implementation:
{
"headers": {
"Idempotency-Key": "order_123_welcome_email"
},
"body": {
"to": "customer@example.com",
"template_id": "order-confirmation"
}
}
Additionally, for high-risk agent actions (like sending a password reset or a billing alert), implement a human-in-the-loop approval step or a strict rate limit per user ID to prevent agent hallucinations from spamming your customers.
Step 5: Testing and Validation
Before switching the environment variable to the new provider, run through this checklist:
- DNS Propagation: Use a tool like
digor a web-based checker to ensure your new DKIM and SPF records are live. - Webhook Verification: If you rely on delivery events (delivered, opened, clicked), update your webhook endpoints. SendGrid's event format differs from others. Ensure your endpoint can handle the new JSON schema without crashing.
- Error Handling: Test how your application handles provider-specific errors. For example, a 429 (Too Many Requests) should trigger a backoff strategy, while a 400 (Bad Request) usually indicates a malformed email address that should be marked as a bounce in your database.
Common Error Cases to Test
- Invalid Email Format: Ensure the API returns a clear error and your code does not retry indefinitely.
- Rate Limiting: Simulate a burst of emails to see if your queue handles the provider's limits.
- Large Attachments: Verify the maximum payload size of the new provider. Some limit you to 10MB, others to 25MB.
Summary Checklist for Migration
- Export Suppressions: CSV export from SendGrid.
- Set Up DNS Records: SPF, DKIM, and DMARC alignment.
- Migrate Templates: Convert HTML/CSS to new format.
- Update API Logic: Implement provider wrapper.
- Add Idempotency: Essential for AI agent triggers.
- Test Webhooks: Verify event delivery and parsing.
- Switch Traffic: Update ENV variable and monitor logs.
Final Thoughts on Deliverability
Moving providers is a great time to audit your sending habits. Remember that provider acceptance is just the first hurdle. Delivery depends on the receiving ISP (Gmail, Outlook, etc.) accepting the connection. Inbox placement is the final hurdle, determined by your domain's long-term reputation and the engagement rates of your recipients.
Avoid the temptation to use these APIs for unsolicited bulk email. Not only is it often illegal, but it will lead to your account being suspended regardless of which provider you choose. Stick to transactional, opted-in communication to maintain a healthy sender score.
For teams building AI-native applications, look for providers that offer agent-readiness features like MCP servers and llms.txt files to make integration seamless. SendHQ is designed for this exact workflow, providing the infrastructure needed for modern product teams.
Learn more about building reliable email systems at https://sendhq.cc.