Migrate from SendGrid.

The developer-first transactional API SendGrid stopped being when it killed the free tier. 3,000 events/mo free, typed reply events, MCP-native distribution. ~30 minutes of code changes.

Why migrate

Four reasons.

Free tier still exists, set at 3,000 events/mo

SendGrid killed the free tier in May 2025. We launched it as the developer-first anchor — 3,000 events/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 intent + entities + injection_score pre-computed. Cut your inbound code by ~70%.

Self-serve at every volume — no Pro tier gate

SendGrid Pro starts at $89.95/mo for 100K emails. Mails.ai Pro starts at $20/mo for 50K sends + 50K parses. Above that, the Metered tier (coming soon) scales linearly to any volume.

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.

Code diff

Send + receive, side by side.

Before — 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: "sarah@yourcompany.com",
  to: "lead@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
});
After — Mails.ai
// Mails.ai — send + typed reply event in 6 lines
import { mails } from "@mailsai/sdk";
const agent = mails.agent("sarah", { domain: "yourcompany.com" });

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

agent.onReply((event) => {
  // event.intent / entities / urgency / injection_score / sender_reputation
});
Endpoint mapping

What maps to what.

SendGridMails.aiNotes
POST /v3/mail/sendPOST /v1/messagesSame shape. Add agent_id for per-agent reputation tracking.
Inbound Parse webhook (raw multipart)GET /v1/events + typed webhookPre-classified structured reply event delivered as JSON. Attachments handled separately.
Marketing Campaigns API(n/a)Mails.ai doesn't compete on broadcast. Keep SendGrid Marketing Campaigns or migrate to Klaviyo/Resend Marketing.
Subuser APIWorkspace-scoped API keysMulti-tenant via workspace separation. Per-agent allowlists + budgets on Scale tier.
Closed beta

Built for agents.
Self-serve at every volume.

Public API opens Q3 2026. Drop ~6 lines into your agent and ship.

npmpnpmbunpip
$ npm install @mailsai/sdk
Packages publish with cohort 1 · Q3 2026