Email Health-Monitoring Via Nova Uptime's Public API: Integratiegids voor Developers
Bouw aangepaste email health-monitoring in je platform met Nova Uptime's REST API. Complete gids met codevoorbeelden, rate limits en productiepatronen.
Waarom Nova Uptime's API Gebruiken Voor Email Health-Monitoring?#
Als je klantdomeinen beheert (SaaS-platform, hostingprovider, agency), moet je programmatisch de email health controleren over allemaal.
Drie Aanpakken:
- Handmatig: Controleer elk domein in het Nova Uptime-dashboard. Niet schaalbaar.
- WHOIS-Queries: Schrijf eigen DKIM/SPF/DMARC-parsing. Complex, onbetrouwbaar.
- Nova Uptime Public API: REST API die alle complexiteit afhandelt. Schaalbaar, betrouwbaar, onderhouden.
Deze gids behandelt de API-aanpak.
API Overzicht#
Base URL: https://api.novauptime.com/api/v1
Authenticatie: X-API-Key header
Rate Limits: 50 requests/uur voor free tier, 1.000/uur voor paid
Response Format:
{
"success": true,
"data": { ... },
"message": "Optional message"
}
Stap 1: Genereer Je API Key#
- Log in op go.novauptime.com
- Settings → API Keys
- Klik "Generate New Key"
- Kopieer de 20-karakter key (bijv.
abc123def456ghi789jk) - Sla veilig op (niet committen naar git!)
Environment Variable:
export NOVAUPTIME_API_KEY="abc123def456ghi789jk"
Stap 2: Controleer Email Health Voor Een Domein#
Endpoint: GET /domains/{domain}/email-health
Voorbeeld Request:
curl -H "X-API-Key: abc123def456ghi789jk" \
https://api.novauptime.com/api/v1/domains/example.com/email-health
Response:
{
"success": true,
"data": {
"domain": "example.com",
"score": 92,
"grade": "A",
"timestamp": "2026-02-20T10:30:00Z",
"records": {
"mx": {
"status": "configured",
"value": "mail.example.com"
},
"spf": {
"status": "configured",
"value": "v=spf1 include:sendgrid.net -all",
"lookups": 4
},
"dkim": {
"status": "configured",
"selectors": ["s1", "s2"],
"configured_count": 2
},
"dmarc": {
"status": "configured",
"policy": "reject"
},
"blacklist": {
"status": "clean",
"checked_against": 4,
"listed_on": 0
}
},
"recommendations": [
{
"type": "warning",
"message": "SPF record has 4 lookups (limit is 10). Consider consolidating includes.",
"action": "Use SPF flattening service or consolidate email providers"
}
]
}
}
Praktijkvoorbeelden#
Use Case 1: Agency Dashboard#
Je bent een agency die 100+ klantwebsites beheert. Je wilt elke klant zijn email health tonen in jouw dashboard.
Implementatie:
// Express.js route to fetch email health
app.get("/client/:clientId/email-health", async (req, res) => {
const clientId = req.params.clientId;
// Get client's domain from database
const client = await Client.findById(clientId);
const domain = client.primaryDomain;
// Fetch email health from Nova Uptime
const response = await fetch(
`https://api.novauptime.com/api/v1/domains/${domain}/email-health`,
{
headers: { "X-API-Key": process.env.NOVAUPTIME_API_KEY }
}
);
const emailHealth = await response.json();
// Return to frontend
res.json(emailHealth.data);
});
Use Case 2: Geautomatiseerde Email Health Scoring#
Beoordeel alle klantdomeinen en alert bij verslechtering.
Implementatie:
// Cron job: Check all domains daily
async function dailyEmailHealthAudit() {
const domains = await Domain.find();
for (const domain of domains) {
// Fetch current score
const current = await fetchEmailHealth(domain.name);
// Compare to previous day
const previous = await EmailHealthHistory.findLatest(domain.name);
if (current.data.score < previous.score - 5) {
// Score dropped >5 points, alert
await sendSlackAlert({
domain: domain.name,
oldScore: previous.score,
newScore: current.data.score,
change: current.data.score - previous.score
});
}
// Store history
await EmailHealthHistory.create({
domain: domain.name,
score: current.data.score,
timestamp: new Date()
});
}
}
Use Case 3: Bulk Domeinaudit#
Je hebt een concurrent overgenomen. 50 nieuwe klantdomeinen. Je wilt voor allemaal de email health-status.
Implementatie:
// Fetch email health for 50 domains
async function auditAcquiredDomains(acquiredDomains) {
const results = [];
// Fetch with concurrency limit (5 at a time)
for (const domain of acquiredDomains) {
const health = await fetchEmailHealth(domain);
results.push({
domain,
score: health.data.score,
grade: health.data.grade,
issues: health.data.recommendations
});
}
// Export to CSV
const csv = convertToCSV(results);
fs.writeFileSync("email-health-audit.csv", csv);
// Summary: 40 domains healthy, 10 need fixes
console.log(`Healthy: ${results.filter(r => r.score > 80).length}`);
console.log(`Need fixes: ${results.filter(r => r.score < 80).length}`);
}
API-Patronen Voor Productie#
Patroon 1: Caching Met Verloop#
Roep de API niet bij elk request aan. Cache resultaten lokaal.
const redis = require("redis");
const client = redis.createClient();
async function getEmailHealthCached(domain, maxAge = 3600) {
// Try cache first
const cached = await client.get(`email-health:${domain}`);
if (cached) {
return JSON.parse(cached);
}
// Cache miss, fetch from API
const health = await fetchEmailHealth(domain);
// Store in cache for 1 hour
await client.setex(
`email-health:${domain}`,
maxAge,
JSON.stringify(health.data)
);
return health.data;
}
Patroon 2: Rate Limit-Handling#
De Nova Uptime API heeft rate limits. Handel ze netjes af.
async function fetchWithRetry(domain, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
const response = await fetch(
`https://api.novauptime.com/api/v1/domains/${domain}/email-health`,
{
headers: { "X-API-Key": process.env.NOVAUPTIME_API_KEY },
timeout: 10000
}
);
if (response.status === 429) {
// Rate limited, wait before retry
const retryAfter = response.headers.get("Retry-After") || (2 ** i);
console.log(`Rate limited. Retrying in ${retryAfter}s`);
await new Promise(r => setTimeout(r, retryAfter * 1000));
continue;
}
if (!response.ok) throw new Error(`HTTP ${response.status}`);
return await response.json();
} catch (error) {
if (i === maxRetries - 1) throw error;
console.log(`Attempt ${i + 1} failed, retrying...`);
await new Promise(r => setTimeout(r, (2 ** i) * 1000));
}
}
}
Patroon 3: Batch Processing#
Bij het controleren van 100+ domeinen, batch je requests efficiënt.
async function batchEmailHealthCheck(domains) {
const batchSize = 10; // 10 concurrent requests
const results = [];
for (let i = 0; i < domains.length; i += batchSize) {
const batch = domains.slice(i, i + batchSize);
// Process batch concurrently
const batchResults = await Promise.all(
batch.map(domain => fetchEmailHealth(domain))
);
results.push(...batchResults);
// Log progress
console.log(`Processed ${Math.min(i + batchSize, domains.length)}/${domains.length}`);
}
return results;
}
Patroon 4: Resultaten Lokaal Opslaan#
Sla email health-resultaten op in je eigen database voor historische tracking.
// Database model
const EmailHealthSchema = {
domain: String,
score: Number,
grade: String,
records: {
mx: Object,
spf: Object,
dkim: Object,
dmarc: Object,
blacklist: Object
},
timestamp: Date,
createdAt: Date
};
async function storeEmailHealth(domain) {
const health = await fetchEmailHealth(domain);
// Store in DB
const record = new EmailHealthLog({
domain,
score: health.data.score,
grade: health.data.grade,
records: health.data.records,
timestamp: new Date(health.data.timestamp),
createdAt: new Date()
});
await record.save();
return record;
}
Patroon 5: Alerting Bij Wijzigingen#
Volg veranderingen en alerteer het team wanneer er iets stuk gaat.
async function monitorEmailHealth(domain) {
const current = await getEmailHealthCached(domain);
const previous = await EmailHealthLog.findLatest(domain);
if (!previous) {
// First check, just store it
await storeEmailHealth(domain);
return;
}
// Detect changes
const scoreChange = current.score - previous.score;
if (scoreChange < -10) {
// Major degradation
await alertSlack({
channel: "#email-alerts",
message: `
${domain}: Email health degraded
Previous: ${previous.score} (${previous.grade})
Current: ${current.score} (${current.grade})
Change: ${scoreChange < 0 ? "" : "+"}${scoreChange}
Issues: ${current.recommendations.map(r => r.message).join("\n")}
`
});
}
}
Error Handling#
Gangbare Foutscenario's:
async function robustEmailHealthCheck(domain) {
try {
const health = await fetchWithRetry(domain);
return health.data;
} catch (error) {
if (error.code === "ENOTFOUND") {
// Domain doesn't exist
console.error(`Domain ${domain} not found`);
return null;
} else if (error.statusCode === 401) {
// Invalid API key
console.error("Invalid Nova Uptime API key");
return null;
} else if (error.statusCode === 429) {
// Rate limited (even after retries)
console.error("Rate limit exceeded");
return null;
} else {
// Unknown error
console.error(`Error checking ${domain}: ${error.message}`);
return null;
}
}
}
Frontend-Integratie#
React Component-Voorbeeld#
import { useState, useEffect } from 'react';
function EmailHealthCard({ domain }) {
const [health, setHealth] = useState(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState(null);
useEffect(() => {
async function fetchHealth() {
try {
const response = await fetch(`/api/email-health/${domain}`);
const data = await response.json();
setHealth(data);
} catch (err) {
setError(err.message);
} finally {
setLoading(false);
}
}
fetchHealth();
}, [domain]);
if (loading) return <div>Loading...</div>;
if (error) return <div>Error: {error}</div>;
return (
<div className="email-health-card">
<h3>{domain}</h3>
<div className={`score score-${health.grade}`}>
{health.score}/100 ({health.grade})
</div>
<div className="records">
{Object.entries(health.records).map(([key, value]) => (
<div key={key} className={`record ${value.status}`}>
<strong>{key.toUpperCase()}</strong>: {value.status}
</div>
))}
</div>
{health.recommendations.length > 0 && (
<div className="recommendations">
<h4>Recommendations:</h4>
<ul>
{health.recommendations.map((rec, i) => (
<li key={i} className={rec.type}>
{rec.message}
</li>
))}
</ul>
</div>
)}
</div>
);
}
API Documentatie-Referentie#
Base URL: https://api.novauptime.com/api/v1
Endpoints:
GET /domains/{domain}/email-health
→ Check email health for domain
→ Rate limit: 50/hour (free), 1000/hour (paid)
→ Response: Email health score, grade, records, recommendations
GET /domains/{domain}/incidents
→ Get last 20 downtime incidents
→ Optional param: limit, offset
GET /domains/{domain}/history
→ Get check history (configurable hours, max 720h)
→ Optional params: hours (default 168), limit (default 500)
GET /domains
→ List user's domains (paginated, max 50/page)
→ Optional params: page, limit
Best Practices#
- Cache agressief: Email health verandert niet vaak. Cache 1-24 uur.
- Batch requests: Check 10 domeinen tegelijk, niet één voor één.
- Handel errors netjes af: Netwerkproblemen gebeuren. Retry met exponential backoff.
- Monitor de API: Houd je API-gebruik bij. Cache langer als je de rate limit nadert.
- Beveilig je API key: Nooit committen naar git. Gebruik environment variables.
- Test rate limits: Simuleer hoog volume voor je naar productie deployt.
Samenvatting: API-Integratie Checklist#
- ✅ Genereer en beveilig API key
- ✅ Implementeer basis email health-check
- ✅ Voeg caching-laag toe (Redis of in-memory)
- ✅ Implementeer rate limit-handling
- ✅ Voeg error handling toe voor gangbare fouten
- ✅ Test met je eigen domein
- ✅ Bouw frontend-component om resultaten te tonen
- ✅ Zet alerting op voor score-veranderingen
- ✅ Documenteer API key-beheer in team-wiki
- ✅ Monitor API-gebruik en quota
Begin Vandaag#
De Nova Uptime public API is beschikbaar op de free tier. Genereer je eerste API key in Settings en begin met het integreren van email health-checks in je platform.
Voor gedetailleerde API-referentie, bezoek de Nova Uptime API-documentatie.
Monitor Your Website Before It Goes Down
Get uptime monitoring, SSL tracking, domain expiry alerts, and email health checks. Free plan — no credit card required.
Start Monitoring FreeGerelateerde artikelen
Hoe je uptime monitoring integreert in je app via een API
Een developer-gids voor het integreren van website-uptime-monitoring met de REST API van Nova Uptime. Inclusief authenticatie, endpoints, code-voorbeelden.
Beste gratis e-mail-health-checktools in 2026: een vergelijking
8 gratis e-mail-health-checkers vergeleken: Nova Uptime, MXToolbox, DMARCian, EasyDMARC, Postmark, Mailtrap, Sender Score, ZeroBounce.
Domain Health Check: een volledige gratis audit (DNS + SSL + e-mail + uptime)
Run in 5 minuten een volledige gratis domain-health-audit: DNS, SSL, e-mail-auth (SPF/DKIM/DMARC), blacklists en uptime. Stappenplan inbegrepen.