API
The email API built for agents.
Per-agent email addresses on your domain. Per-agent reputation. Every inbound is scanned for prompt injection and high-risk mail is flagged quarantined so your agent skips it. Your agent reads the reply and decides what to say — we handle the security and identity layer underneath.
Six lines
Drop in. Get structured replies back.
Every agent gets its own working address, parsing, identity, and reputation. Reply events arrive pre-classified — intent, entities, urgency, injection score, sender reputation — so your hot path is a switch on event.intent, not a regex on the body.
TypeScript SDKPython SDKMCP server (npx)HTTP / REST
agent.ts
import { mails } from "@mailsai/sdk";
const sarah = mails.agent("sarah", {
domain: "yourcompany.com",
});
await sarah.send({
to: "lead@example.com",
subject: "Demo",
});
sarah.onReply((reply) => {
// reply.injection_score → 0.02
// reply.sender_reputation → 0.91
// reply.intent → "schedule_demo"
// reply.entities → { date, time }
// You decide what to send next.
});Endpoints
Five surfaces. Every agent uses three on day one.
- POST/v1/agentsCreate a per-agent identity bound to your sending domain.
- POST/v1/messagesSend an outbound email. Returns a message_id and routing decision.
- GET/v1/eventsList typed reply events with intent, entities, urgency, injection_score, sender_reputation.
- POST/v1/webhooksRegister an HTTPS endpoint to receive structured reply events as they arrive.
- GET/v1/identityLook up reputation, suppression, and verification status for any address on the network.
Full reference ships with /docs at launch. Architecture and routing details at /architecture.
Closed betaBuilt for agents.
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/sdkPackages publish with cohort 1 · Q3 2026