Integrate LeadCop.
Protect your registration forms and email lists from disposable, temporary, and fake email addresses. This guide covers everything from a simple no-code setup to full backend API integration.
Quick Start
The fastest way to protect your website — no programming needed. You just need to copy and paste one line of code.
3 steps to protect any website
- 1
Create a free account
Sign up — no credit card required. Your API key is generated automatically.
Create free account → - 2
Copy the script tag
Paste this snippet just before the closing </body> tag in your website's HTML:
HTML<script src="https://leadcop.io/leadcop-email-validator.js" data-api-key="YOUR_API_KEY"> </script> - 3
That's it — you're protected
LeadCop automatically finds every email input field on your site. When someone types a disposable email, they'll see an error.
✅ Real-time validation as users type.
Authentication
There are two ways to use LeadCop. Pick the one that matches where your validation runs — the key type differs for each.
No-code · in the browser
Embedded script & plugins
Drop the script tag on your site. It validates form inputs client-side and calls /api/public/check-email for you.
Uses a domain-locked key via data-api-key.
Code · on your server
REST API
Call POST /api/check-email directly from your backend for full control over the validation response.
Uses your primary key via the Authorization header.
Bearer token (REST API)
Send your primary API key from the dashboard in the Authorization header on every request.
Authorization: Bearer YOUR_API_KEYPrimary keys are server-to-server only. Calling the REST API with your primary key from a browser returns 403. For client-side / form validation use a domain-locked key(created per website in the dashboard), or better, the embedded script.
Server-to-server header
When calling from your own backend, add the X-LeadCop-Source header so the request is treated as a trusted server-to-server call (bypasses the browser-origin check).
Authorization: Bearer YOUR_API_KEY
X-LeadCop-Source: serverAPI Endpoint
A single endpoint validates an email and returns a full reputation breakdown. Send the email in the request body.
https://leadcop.io/api/check-emailExample request (cURL)
curl -X POST https://leadcop.io/api/check-email \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-LeadCop-Source: server" \
-H "Content-Type: application/json" \
-d '{"email": "test@mailinator.com"}'Request body
{
"email": "test@mailinator.com"
}Response · 200 OK
{
"isDisposable": true,
"domain": "mailinator.com",
"reputationScore": 40,
"riskLevel": "Poor",
"tags": ["disposable"],
"reasons": ["Disposable email provider detected"],
"isValidSyntax": true,
"isRoleAccount": false,
"isFreeEmail": false,
"isInvalidTld": false,
"didYouMean": null,
"mxValid": true,
"smtpValid": true,
"requestsRemaining": 999
}Response fields
isDisposablebooleanTrue if the domain is a disposable/temporary provider (or blocked by your policy).
reputationScorenumber0–100 quality score. Higher is safer; combines every signal below.
riskLevelstringHuman-readable band: Excellent, Good, Medium, Poor, or Critical.
didYouMeanstring | nullSuggested correction for a likely domain typo, e.g. "gmail.com" for "gmial.com".
isRoleAccountboolean | nullTrue for role addresses like info@ or admin@. Null if your plan lacks role detection.
isFreeEmailboolean | nullTrue for free providers (Gmail, Yahoo…). Null if your plan lacks free-provider detection.
isInvalidTldbooleanTrue if the top-level domain is not a valid, recognized TLD.
mxValidbooleanTrue if the domain has valid MX (mail exchange) records.
tagsstring[]Machine-readable labels, e.g. ["disposable", "role_account"].
reasonsstring[]Human-readable explanations for the score and any block.
requestsRemainingnumberRequests left in your current billing period.
Error Codes
Invalid request payload
The request body was missing the 'email' field, was empty, or was not valid JSON. Returns { "error": "Invalid request payload" }.
Invalid API Key
The Authorization header is missing, malformed, or the API key does not match any account.
Key used in the wrong context
Either a primary key was called from a browser (primary keys are server-to-server only), or a domain-locked key was used on a domain it isn't authorized for.
Rate limit exceeded
Either your monthly request quota is used up (upgrade your plan), or you exceeded your per-minute burst limit (rate limit = plan requests/second × 60). Retry after slowing down.
Transient server error
A temporary error on our side. Requests are safe to retry — the embedded script and plugins fail open, so form submissions are never blocked by an outage.
Shopify Integration
Add LeadCop validation to your Shopify storefront. This will protect your newsletter signups, contact forms, and customer registration inputs.
Theme Integration (theme.liquid)
- Go to your Shopify Admin and click on Online Store > Themes.
- Click the ... (Actions) button next to your active theme, then select Edit Code.
- Open the
layout/theme.liquidfile. - Scroll to the very bottom of the file and paste the following script tag immediately before the closing
</body>tag:
<script
src="https://leadcop.io/leadcop-email-validator.js"
data-api-key="YOUR_API_KEY">
</script>Ensure you replace YOUR_API_KEY with your actual public API key from the LeadCop dashboard.
WordPress Integration
Protect your WordPress site using our native plugin. It automatically integrates with default registration, comments, WooCommerce, and popular form builders.
Plugin Setup (No Code)
- In your WordPress Admin, go to Plugins > Add New.
- Search for “LeadCop” in the plugin directory.
- Click Install Now on the LeadCop plugin, then Activate.
- Open the new LeadCop menu item in your admin sidebar.
- Paste your API key into the settings field and click Save Settings.
LeadCop is published on the official WordPress.org directory, so it installs in one click — no file downloads. View on WordPress.org →
Prefer a manual install?
Download the .zip from the WordPress.org page, then go to Plugins > Add New > Upload Plugin, select the file, and click Install Now.
Supported Form Systems out-of-the-box:
- ✅ WordPress Registration
- ✅ Comment Forms
- ✅ WooCommerce Checkout
- ✅ Contact Form 7
- ✅ WPForms
- ✅ Gravity Forms
Alternative: Script tag (No plugin)
Don’t want a plugin? Add the same script your other sites use. Paste it before the closing </body> tag — either in your theme’s footer.php, or with a header/footer code plugin (e.g. “WPCode” or “Insert Headers and Footers”).
<script
src="https://leadcop.io/leadcop-email-validator.js"
data-api-key="YOUR_API_KEY">
</script>Wix Integration
Configure LeadCop on your Wix website. Choose the method depending on whether your site is on a Wix Premium or Wix Free plan.
Method 1: Wix Premium (Custom Code)
- Go to your Wix Dashboard and select Settings.
- Scroll down to the Advanced section and click on Custom Code.
- Click + Add Custom Code in the top right.
- Paste the LeadCop script tag in the code box.
- Set Place Code in to Body - end.
- Select All Pages (or specify your Contact page) and click Apply.
Method 2: Wix Free (HTML Embed workaround)
Wix Free does not support Custom Code. You must embed a custom HTML form and the LeadCop script inside a single HTML Element (iframe):
<form action="YOUR_FORM_SUBMIT_URL" method="POST">
<input type="email" name="email" required />
<button type="submit">Submit</button>
</form>
<script
src="https://leadcop.io/leadcop-email-validator.js"
data-api-key="YOUR_API_KEY">
</script>Webflow Integration
Add LeadCop to your Webflow project. It will automatically intercept native Webflow form submissions.
Site-wide Integration
- Go to your Webflow Project Settings.
- Click on the Custom Code tab.
- Paste the script tag into the Footer Code text area (before the closing
</body>tag). - Click Save Changes and publish your site.
<script
src="https://leadcop.io/leadcop-email-validator.js"
data-api-key="YOUR_API_KEY">
</script>Framer Integration
Inject the LeadCop script into your Framer website to protect signup forms and lead capture widgets.
Framer Custom Code Settings
- Open your project in Framer and click on the Project Settings (gear icon).
- In the left sidebar, click on General.
- Scroll down to the Custom Code section.
- In the End of <body> input field, paste your LeadCop script tag:
<script
src="https://leadcop.io/leadcop-email-validator.js"
data-api-key="YOUR_API_KEY">
</script>Click Save and publish your changes.
Next.js & React Integration
For dynamic React or Next.js applications, query the LeadCop REST API directly from your client components or server-side actions.
Client-side React Hook
Create a custom hook to perform real-time checks as the user types (using a 500ms debounce to limit API requests):
import { useState, useEffect } from "react";
export function useEmailCheck(email: string) {
const [result, setResult] = useState({ isDisposable: false, checking: false });
useEffect(() => {
if (!email || !email.includes("@")) return;
const delay = setTimeout(async () => {
setResult(prev => ({ ...prev, checking: true }));
try {
// Use a domain-locked key here — primary keys are server-to-server only
// and will return 403 when called from a browser. Create a domain-locked
// key in the dashboard under API Keys → New Key.
const res = await fetch("https://leadcop.io/api/public/check-email", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email, apiKey: "YOUR_DOMAIN_LOCKED_KEY" }),
});
const data = await res.json();
setResult({ isDisposable: !!data.isDisposable, checking: false });
} catch {
setResult({ isDisposable: false, checking: false });
}
}, 500);
return () => clearTimeout(delay);
}, [email]);
return result;
}Frequently Asked Questions
Protect your growth.
Set up takes under 2 minutes. Start for free today and clean your lead data instantly.
Start for free today