Get your API key
Concepts

Programmable email

Programmable email is email you drive entirely from code — send with one API call, receive every message as structured JSON on a webhook, and give any app or AI agent its own inbox on a domain you control, with no mail server to run. It is email as a two-way programmable primitive: not just a way to send notifications, but a channel your software can also receive, parse, and reply on.

That is the developer meaning of the term. (You may also see "programmable email" used in marketing tools for templated personalization inside campaign emails — a different thing. This is email as I/O.)

The three primitives

MailKite exposes email as three building blocks. Everything else is built on these.

1. Send

One endpoint, one API key. Transactional mail, replies, and broadcasts go out over your own authenticated, warmed-up domain. SPF, DKIM, and DMARC are configured and monitored for you.

send · Node
import { MailKite } from "mailkite";

const mk = new MailKite(process.env.MAILKITE_API_KEY);

await mk.send({
from: "hello@myapp.ai",
to: "ada@example.com",
subject: "Welcome aboard",
html: "<p>Your account is ready.</p>",
});

Full reference: Send API.

2. Receive

Point your domain's MX at MailKite and every inbound message is parsed and POSTed to your endpoint as clean JSON — body, headers, and attachments — signed so you can verify it came from us. No IMAP, no polling, no MIME parsing, no mail server.

receive · Node + Express
import express from "express";
import { MailKite } from "mailkite";

const app = express();
const SECRET = process.env.MAILKITE_WEBHOOK_SECRET;

app.use("/hooks/mail", express.raw({ type: "application/json" }));

app.post("/hooks/mail", (req, res) => {
if (!MailKite.verifyWebhook(req.headers["x-mailkite-signature"], req.body, SECRET)) {
return res.sendStatus(401);
}
res.sendStatus(200); // ack fast

const event = JSON.parse(req.body);
if (event.type !== "email.received") return;

// event.from.address, event.subject, event.text, event.html, event.attachments
console.log("mail from", event.from.address, "→", event.subject);
});

Full guides: Inbound webhooks, verifying signatures, and delivery & reliability. Prefer a mailbox? You can also read the same inbox over IMAP.

3. Identity — an inbox per app or agent

Every domain gives you unlimited addresses. Point each at its own webhook, or hand one to an AI agent so it can receive parsed mail, hold threads, and reply — either by running your own model loop, or by letting MailKite run the agent for you on a durable queue.

See Connect your agent and Inbox agents.

Why not just an "email API"?

A plain email API only sends. Programmable email adds the return path (inbound as JSON) and an inbox identity per app or agent, so your software can send and receive on the same verified domain, in both directions. That is the difference between firing off notifications and holding a conversation.

Start here

New to MailKite? The Quickstart takes you from a domain to your first parsed inbound message and your first send in a few minutes. Then wire up domains & DNS and grab an API key. Every domain and mailbox is free until it gets real traction — see pricing.

Start free