Migrate from SendGrid.

The developer-first transactional API SendGrid stopped being when it killed the free tier. 3,000 emails and 3,000 inbound replies a month free, typed reply events, MCP-native distribution. ~30 minutes of code changes.

Send + receive, side by side.

Your SendGrid send and inbound code, and the Mails.ai code that replaces it.

SendGrid
// SendGrid — send + raw inbound parse via Inbound Parse webhook
import sgMail from "@sendgrid/mail";
sgMail.setApiKey(process.env.SENDGRID_API_KEY);

await sgMail.send({
  from: "hello@yourcompany.com",
  to: "user@example.com",
  subject: "Demo",
  text: "...",
});

// Inbound Parse webhook delivers raw multipart form-data
app.post("/inbound", async (req, res) => {
  const { from, subject, text, attachments } = req.body;
  // Parse it yourself — classification, entity extraction, injection scan
});
Mails.ai
// Mails.ai — send + typed reply event in 6 lines
import { mails } from "@mailsai/sdk";
const agent = mails.agent("hello"); // sends from hello.yourcompany@send.mails.ai

await agent.send({ to: "user@example.com", subject: "Demo", body: "..." });

agent.onReply((event) => {
  // event.injection_score / sender_reputation
});

Introduction

SendGrid cut its free tier in 2025. It’s also built for the 2009 era of email — before agents, before MCP, before typed events. Mails.ai is built for what you’re actually shipping now.

Jump ahead

Four reasons.

Free tier still exists: 3,000 emails and 3,000 inbound replies a month

SendGrid killed the free tier in May 2025. We launched it as the developer-first anchor — 3,000 emails and 3,000 inbound replies a month, magic-link signup, no credit card.

Typed reply events instead of Inbound Parse webhook

SendGrid Inbound Parse delivers raw multipart form-data with attachments — parsing is on you. Mails.ai delivers typed reply events with injection_score + sender_reputation pre-computed. Cut your inbound code by ~70%.

Self-serve signup — no Pro tier gate

SendGrid Pro starts at $89.95/mo for 100K emails. Mails.ai Pro starts at $20/mo for 50,000 emails + 50,000 inbound replies. Above that, Scale is $99/mo for 250,000 emails + 500,000 inbound replies.

Native prompt-injection scanning

Every inbound runs a six-category injection scanner. SendGrid Inbound Parse has no equivalent — agent attack vectors are 100% your responsibility there.

What maps to what.

Key differences

  • Sending. Same shape. Add agent (the agent's name or agt_ id) for per-agent reputation tracking.
  • Inbound. Pre-scanned structured reply event delivered as JSON. Attachments handled separately.
  • Broadcast. Mails.ai doesn't compete on broadcast. Keep SendGrid Marketing Campaigns or migrate to Klaviyo/Resend Marketing.
  • Multi-tenant. Multi-tenant via workspace separation. Per-agent allowlists and send limits on every plan.
NameSendGridMails.ai
SendingPOST /v3/mail/sendPOST /v1/messages
InboundInbound Parse webhook (raw multipart)GET /v1/events + typed webhook
BroadcastMarketing Campaigns API(n/a)
Multi-tenantSubuser APIWorkspace-scoped API keys

What you gain by moving.

Typed reply events.

Stop regexing raw inbound bodies. Every inbound arrives with injection_score and sender_reputation pre-computed, and first-contact mail with intent, entities and urgency too when you enable classification.

Native prompt-injection scanning.

Every inbound runs a six-category injection scanner before reaching your agent. No third-party tool, no DIY guardrails.

MCP-native distribution.

npx @mailsai/mcp-server drops into Claude Code, Cursor, Cline, or any MCP-compatible runtime — your agent gets mails_send / mails_list_replies tools automatically.

Self-serve signup.

No Enterprise gate. No contact-sales tier. No sales team to call. The pricing page is the price — monthly, or yearly for two months free.

Lean cost structure.

Commodity infrastructure plus a small team, and no sales org to pay for.

Dual-run on the Free tier.

Same SMTP shape on the send side; typed reply events on the inbound side. Self-serve checkout, magic-link signup, no sales call. The Free tier (3,000 emails and 3,000 inbound replies a month) covers the dual-running phase.

Give your first agent an inbox

Free covers 3,000 emails and 3,000 inbound replies a month, with no card. Upgrade when your agents get busy.

Get your API key