Django email verification

Verify emails server-side in Django

Call Verifly from a Django form's clean_email method or a DRF serializer validator. Undeliverable, disposable, and role addresses are rejected server-side before a User row is created.

Verify an email from DjangoAPI
import requests

res = requests.get(
    'https://verifly.email/api/v1/verify',
    params={'email': email},
    headers={'Authorization': f'Bearer {settings.VERIFLY_API_KEY}'},
    timeout=15,
)
verdict = res.json()['result']  # deliverable | undeliverable | risky

Real-time SMTP mailbox checks

Single, batch, and async bulk verification

Disposable, role account, and catch-all detection

Pay-as-you-go credits with no subscription lock-in

Search fit

Built for Django email verification

Use Verifly when you need a simple API, predictable pricing, and clean JSON results before emails hit your product, CRM, or campaign tool.

Reject undeliverable emails inside a Django form clean_email method
Validate emails in a DRF serializer before creating a user
Block disposable and role addresses at signup, server-side
Batch-verify an existing auth_user table with a management command

Why Django's EmailValidator can't catch bounces

Django's EmailField and EmailValidator confirm that a string is shaped like an email address. They do not open a connection to the mail server, so they cannot tell you whether the mailbox behind that address actually accepts mail. A user can register with a flawlessly formatted address that has no inbox, and every activation link, password reset, and notification you send will hard-bounce.

A steady stream of bounces erodes your sending domain's standing with the big mailbox providers, which quietly pushes even your legitimate transactional email toward spam folders. Public signup and registration endpoints also attract disposable inboxes and throwaway abuse accounts, so rejecting those domains at validation time keeps your auth_user table lean and your metrics real.

Verifly performs a live SMTP mailbox check and returns a deliverable / undeliverable / risky verdict along with disposable, role, and catch-all flags. Because the API is a simple authenticated GET, it fits naturally inside a form's clean_email method, a DRF serializer validator, or an async Celery task.

Reject undeliverable emails in a Django form

  1. Grab a free Verifly key at verifly.email/api/v1/autonomous/register — 100 credits, no card, no captcha.
  2. Store it as VERIFLY_API_KEY in settings (read from an environment variable, never hard-coded).
  3. Override clean_email on your registration form and call Verifly there.
  4. Raise forms.ValidationError for undeliverable or disposable results so the message binds to the email field.
  5. Fail open on a network error or non-200 so a verifier outage never blocks a real signup.
accounts/forms.py
import requests
from django import forms
from django.conf import settings


class SignupForm(forms.Form):
    email = forms.EmailField()

    def clean_email(self):
        email = self.cleaned_data['email']
        try:
            res = requests.get(
                'https://verifly.email/api/v1/verify',
                params={'email': email},
                headers={'Authorization': f'Bearer {settings.VERIFLY_API_KEY}'},
                timeout=15,
            )
            res.raise_for_status()
        except requests.RequestException:
            return email  # fail open: don't block signup on a verifier outage

        data = res.json()
        if data.get('result') == 'undeliverable' or data.get('disposable'):
            raise forms.ValidationError('Please use a real, deliverable email address.')
        return email

The same check in a DRF serializer

If your signup is an API endpoint built on Django REST Framework, put the identical logic in a field-level validate_email method on the serializer. Raising serializers.ValidationError returns a clean 400 with the error attached to the email field, exactly like any other validation failure, so your frontend handles it with no special casing.

accounts/serializers.py
import requests
from django.conf import settings
from rest_framework import serializers


class SignupSerializer(serializers.Serializer):
    email = serializers.EmailField()
    password = serializers.CharField(write_only=True)

    def validate_email(self, value):
        try:
            res = requests.get(
                'https://verifly.email/api/v1/verify',
                params={'email': value},
                headers={'Authorization': f'Bearer {settings.VERIFLY_API_KEY}'},
                timeout=15,
            )
            res.raise_for_status()
        except requests.RequestException:
            return value

        if res.json().get('result') == 'undeliverable':
            raise serializers.ValidationError('This email address is not deliverable.')
        return value

FAQ

Frequently asked questions

Where should the Verifly call live in a Django project?

For form-based signup, clean_email is the natural home; for an API, use validate_email on the serializer. Both run server-side during validation, so the check happens before your view ever touches the database or creates a User.

Won't calling an API during validation slow down signup?

A single GET typically returns in well under a second. If you'd rather keep the request instant, accept the signup and move the check into a Celery task that flags or deactivates the account afterward if the address is undeliverable.

Should I block risky and catch-all results?

Catch-all domains accept mail for every address, so a specific mailbox can't be confirmed. Most Django apps hard-reject undeliverable plus disposable and let risky through, storing the flag on the user model for later review.

How do I clean users already in auth_user?

Write a management command that iterates existing addresses in batches and posts them to POST /verify/batch, then flag or disable the undeliverable rows. Verifly's async bulk pipeline handles large tables in one job.

What does verifying Django signups cost?

Pricing is pay-as-you-go from $2 per 1,000 checks down to $0.60 per 1,000 at volume, with 100 free credits to start and no monthly minimum, so a small site only pays for real signup traffic.

Is there an official Django package required?

No package is needed — the Verifly API is plain HTTP, so the requests library (or httpx) is all you need. That keeps the integration transparent and easy to test with a mocked response.