Documentation

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. 1

    Create a free account

    Sign up — no credit card required. Your API key is generated automatically.

    Create free account →
  2. 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. 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

Format your secret API key in the Authorization header for REST API requests.

HTTP Header
Authorization: Bearer YOUR_API_KEY

API Endpoint

POSThttps://leadcop.io/api/check-email

Request body

JSON
{
  "email": "test@mailinator.com"
}

Response

JSON
{
  "isDisposable": true,
  "domain": "mailinator.com",
  "requestsRemaining": 999
}

Error Codes

400 Bad Request

Missing email parameter

The request body did not include the 'email' field or the value was empty.

401 Unauthorized

Invalid API Key

The Authorization header is missing, incorrectly formatted, or the API key is invalid.

429 Too Many Requests

Rate Limit Exceeded

You have sent too many requests in a short period. Upgrade your plan to increase limits.

🛍️

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)

  1. Go to your Shopify Admin and click on Online Store > Themes.
  2. Click the ... (Actions) button next to your active theme, then select Edit Code.
  3. Open the layout/theme.liquid file.
  4. Scroll to the very bottom of the file and paste the following script tag immediately before the closing </body> tag:
HTML
<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)

  1. Download the official LeadCop WordPress plugin .zip file from your dashboard.
  2. In your WordPress Admin, navigate to Plugins > Add New > Upload Plugin.
  3. Select the downloaded .zip file and click Install Now, then Activate.
  4. Navigate to the new LeadCop menu item in your WordPress admin sidebar.
  5. Paste your API key into the settings field and click Save Settings.

Supported Form Systems out-of-the-box:

  • ✅ WordPress Registration
  • ✅ Comment Forms
  • ✅ WooCommerce Checkout
  • ✅ Contact Form 7
  • ✅ WPForms
  • ✅ Gravity Forms

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)

  1. Go to your Wix Dashboard and select Settings.
  2. Scroll down to the Advanced section and click on Custom Code.
  3. Click + Add Custom Code in the top right.
  4. Paste the LeadCop script tag in the code box.
  5. Set Place Code in to Body - end.
  6. 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)**:

HTML
<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

  1. Go to your Webflow Project Settings.
  2. Click on the Custom Code tab.
  3. Paste the script tag into the Footer Code text area (before the closing </body> tag).
  4. Click Save Changes and publish your site.
HTML
<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

  1. Open your project in Framer and click on the Project Settings (gear icon).
  2. In the left sidebar, click on General.
  3. Scroll down to the Custom Code section.
  4. In the End of <body> input field, paste your LeadCop script tag:
HTML
<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):

    TypeScript
    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 {
            const res = await fetch("https://leadcop.io/api/check-email", {
              method: "POST",
              headers: {
                "Content-Type": "application/json",
                "Authorization": "Bearer YOUR_API_KEY",
              },
              body: JSON.stringify({ email }),
            });
            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