Connect mailcheck.fr
to all your tools
No native integration required, our REST API connects with any tool in a few lines of code or through Zapier. Here is how to connect the most common tools.
How it works
On every form submission, first call the mailcheck.fr API to validate the address.
If the status is valid or risky with a high enough
score, trigger the call to the Brevo API to add the contact to your list.
Addresses that are invalid or disqualifie are
simply ignored, they never enter Brevo.
const MAILCHECK_KEY = process.env.MAILCHECK_API_KEY;
const BREVO_KEY = process.env.BREVO_API_KEY;
async function addContactToBrevo(email, firstName, lastName) {
// Step 1: verify the email with mailcheck.fr
const check = await fetch("https://api.mailcheck.fr/v1/verify", {
method: "POST",
headers: { "Authorization": `Bearer ${MAILCHECK_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ email })
}).then(r => r.json());
// Step 2: reject invalid addresses
if (check.status === "invalid" || check.status === "disqualifie") {
return { success: false, reason: check.status };
}
// Step 3: add to Brevo
await fetch("https://api.brevo.com/v3/contacts", {
method: "POST",
headers: { "api-key": BREVO_KEY, "Content-Type": "application/json" },
body: JSON.stringify({
email,
attributes: { PRENOM: firstName, NOM: lastName },
listIds: [42],
updateEnabled: true
})
});
return { success: true, score: check.score };
} Method 1: Cleaning an existing list (CSV)
- Export your Mailchimp audience from Audience > Export Audience
- Import the CSV into mailcheck.fr and start the verification
- Export the filtered CSV (valid addresses only)
- In Mailchimp, archive the invalid contacts through Archive Contacts by importing the list of emails to remove
Method 2: Real-time validation through Zapier
Create a Zap with the "New Subscriber in Mailchimp" trigger, then add
a Webhooks by Zapier > POST action to
https://api.mailcheck.fr/v1/verify with the Bearer token.
Add a conditional filter: if status != valid, use
the Mailchimp > Unsubscribe Contact action to remove the address.
Setup through HubSpot Workflows
- In HubSpot, go to Automations > Workflows > Create Workflow
- Trigger: "Contact is created" or "Form submitted"
- Add a "Send a webhook" action with the POST method to
https://api.mailcheck.fr/v1/verify - In the headers, add
Authorization: Bearer YOUR_API_KEY - JSON body:
{"email": "{{contact.email}}"} - Add a conditional branch on the webhook response: if
status = invalid, set aEmail Quality = Invalidproperty and remove from your marketing sequences
Email Quality Score (Number type) and store the mailcheck.fr score (0-100) so you can filter and segment your contacts by email quality.
Script to add in the Custom Code of your Webflow page
In the settings of your Webflow page (Page Settings > Custom Code > Before </body>), add the following script. It intercepts the form submission, validates the email in real time and only allows the submission if the address is valid.
// Replace YOUR_API_KEY with your mailcheck.fr key
// Never commit an API key on the client side in production!
// For production, proxy it through your backend.
const MAILCHECK_KEY = "mc_live_xxxxxxxxxxxxxxxxxxxx";
document.querySelectorAll("form[data-name]").forEach(function(form) {
form.addEventListener("submit", async function(e) {
const emailInput = form.querySelector('input[type="email"]');
if (!emailInput) return;
e.preventDefault();
const btn = form.querySelector('input[type="submit"]');
const originalText = btn ? btn.value : "";
if (btn) btn.value = "Checking...";
try {
const res = await fetch("https://api.mailcheck.fr/v1/verify", {
method: "POST",
headers: {
"Authorization": `Bearer ${MAILCHECK_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({ email: emailInput.value })
});
const data = await res.json();
if (data.status === "invalid" || data.status === "disqualifie") {
// Show an error message
let err = form.querySelector(".email-error");
if (!err) {
err = document.createElement("div");
err.className = "email-error";
err.style.cssText = "color:#c92a2a;font-size:0.85rem;margin-top:6px;";
emailInput.parentNode.insertBefore(err, emailInput.nextSibling);
}
err.textContent = "This email address looks invalid. Please check it and try again.";
if (btn) btn.value = originalText;
} else {
// Valid email, submit normally
form.submit();
}
} catch (err) {
// On API error, let it through (fail open)
form.submit();
}
});
}); Inline validation on any form
This snippet attaches to every email field on a page and validates the address the moment
the user leaves the field (blur), even before submission.
Immediate visual feedback with a green/red badge.
(function() {
const PROXY_URL = "/api/verify-email"; // Your backend proxy endpoint
function injectBadge(input, status, score) {
let badge = input.parentNode.querySelector(".mc-badge");
if (!badge) {
badge = document.createElement("span");
badge.className = "mc-badge";
badge.style.cssText = "margin-left:8px;font-size:.8rem;font-weight:600;padding:2px 8px;border-radius:10px;";
input.parentNode.style.position = "relative";
input.parentNode.appendChild(badge);
}
if (status === "valid") {
badge.textContent = "✓ Valid";
badge.style.background = "#e6faf0";
badge.style.color = "#00873d";
} else {
badge.textContent = "✕ Invalid";
badge.style.background = "#ffe8e8";
badge.style.color = "#c92a2a";
}
}
document.querySelectorAll('input[type="email"]').forEach(function(input) {
input.addEventListener("blur", async function() {
if (!input.value || !input.value.includes("@")) return;
try {
const res = await fetch(PROXY_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email: input.value })
});
const data = await res.json();
injectBadge(input, data.status, data.score);
} catch(e) { /* silent */ }
});
});
})(); Need help integrating?
Our API documentation covers every endpoint with complete examples. Our team replies within 24h.