Adding real-time email verification to your signup form is one of the best investments you can make in your data quality. It stops bad emails before they ever enter your database.
Here's how to add real-time verification using the CheckMail1 API:
// Frontend: validate on blur
document.getElementById('email').addEventListener('blur', async (e) => {
const email = e.target.value;
const res = await fetch('/api/check-email', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({ email })
});
const data = await res.json();
if (!data.valid) {
showError('Please enter a valid email address');
}
});// Backend: Node.js route
app.post('/api/check-email', async (req, res) => {
const { email } = req.body;
const result = await axios.get('https://checkmail1.com/api/verify', {
params: { email },
headers: { 'X-API-Key': process.env.CHECKMAIL_API_KEY }
});
res.json({ valid: result.data.valid && result.data.score > 70 });
});Start with 70 and adjust based on your signup conversion data.