Widget
View as MarkdownOpen in ChatGPTOpen in Claude
Check addresses in your signup form as visitors type: typos, dead domains and throwaway inboxes are caught before they become accounts.
Install
- In Dashboard → Integrations, create a publishable key (
mf_pub_...) and list the exact origins of your site (for examplehttps://example.com). - Add the script and mark the field:
<script src="https://mails.fit/widget.js" defer></script>
<input type="email" name="email" data-mailsfit="mf_pub_..." data-mailsfit-block="invalid">The widget checks on blur, or 800 ms after typing stops, shows a message (and a typo suggestion) under the field, and blocks the form with setCustomValidity for the statuses in data-mailsfit-block (invalid by default, invalid,risky, or none). Network errors and refusals never block the form.
Events
document.querySelector("input[data-mailsfit]").addEventListener("mailsfit:result", (e) => {
console.log(e.detail); // { email, status: "ok" | "risky" | "invalid" | "unavailable", suggestion }
});Cost and limits
- One credit per check from the key owner's balance;
unknownresults are refunded. - A daily cap per key (default 500, 1 to 50,000, set in the dashboard); past it the answer is
unavailable. - 30 checks a minute per key, 10 per key and visitor IP.
- The publishable key and allowed origin are public, so the caps bound what a copied key can spend. It grants nothing else.
Endpoint
The script calls POST /v1/widget/check?key=mf_pub_... with {"email": "..."} and gets {"status": "ok" | "risky" | "invalid" | "unavailable", "suggestion": null}. Server-side code should use /v1/verify with a secret key instead.