How to Monitor Your Resend Email API with Vigilmon
Resend is a modern email API built for developers — clean SDK, React Email support, and excellent deliverability. But when email is mission-critical (password resets, receipts, notifications), you need to know immediately if Resend or your email integration goes down.
Why Monitor Email Delivery?
Email failures are silent. When Resend has an outage or your integration breaks:
- Users can't reset their passwords
- Transactional receipts don't arrive
- Account verification emails bounce
- Users assume your app is broken
External monitoring catches these failures before users escalate to support.
Monitor Resend's Service Status
In Vigilmon:
- URL:
https://status.resend.com - Check interval: 5 minutes
- Expected status:
200
Application Email Health Route
Node.js / TypeScript:
import { Resend } from "resend";
const resend = new Resend(process.env.RESEND_API_KEY);
app.get("/health/email", async (req, res) => {
try {
// Use the domains endpoint — lightweight, no email sent
const { data, error } = await resend.domains.list();
if (error) {
return res.status(503).json({
status: "error",
provider: "resend",
message: error.message,
});
}
res.json({
status: "ok",
provider: "resend",
domains: data?.data?.length ?? 0,
});
} catch (err) {
res.status(503).json({ status: "error", message: String(err) });
}
});
Next.js App Router:
// app/api/health/email/route.ts
import { Resend } from "resend";
import { NextResponse } from "next/server";
const resend = new Resend(process.env.RESEND_API_KEY);
export async function GET() {
try {
const { data, error } = await resend.domains.list();
if (error) {
return NextResponse.json({ status: "error", message: error.message }, { status: 503 });
}
return NextResponse.json({ status: "ok", domains: data?.data?.length ?? 0 });
} catch (err) {
return NextResponse.json({ status: "error", message: String(err) }, { status: 503 });
}
}
Python (FastAPI):
import httpx
from fastapi.responses import JSONResponse
@app.get("/health/email")
async def email_health():
try:
async with httpx.AsyncClient() as client:
response = await client.get(
"https://api.resend.com/domains",
headers={"Authorization": f"Bearer {settings.RESEND_API_KEY}"},
timeout=10.0
)
if response.status_code == 200:
return {"status": "ok", "provider": "resend"}
return JSONResponse(status_code=503, content={"status": "error"})
except Exception as e:
return JSONResponse(status_code=503, content={"status": "error", "message": str(e)})
Add to Vigilmon
- Log in at vigilmon.online
- Click + Add Monitor
- URL:
https://your-app.com/api/health/email - Check interval: 2 minutes
- Expected status: 200
Heartbeat Monitoring for Email Flows
For end-to-end testing, set up a heartbeat monitor and ping it from a cron job:
// cron: every 30 minutes
async function emailHealthCheck() {
const { error } = await resend.emails.send({
from: "health@your-app.com",
to: "monitor@your-app.com",
subject: "Email health check",
text: "Automated health check.",
});
if (!error) {
await fetch("https://vigilmon.online/heartbeat/your-heartbeat-id");
}
}
What to Monitor
| Monitor | URL | Purpose |
|---|---|---|
| Resend status | https://status.resend.com |
Provider status |
| App email health | /api/health/email |
Integration health |
| Heartbeat | Vigilmon heartbeat | Synthetic email test |
Email is infrastructure. Monitor it like infrastructure.
Vigilmon — free uptime monitoring for Resend, SendGrid, and any email API integration.
Top comments (0)