Documentation

Introduction

TempMailDetector offers a powerful email validation API to identify temporary and disposable email addresses in real-time.

Integrate in minutes with AI

Paste our prompt into ChatGPT, Claude or Cursor and let it wire up the API for you.

Why Use TempMailDetector?

  • Stop Abuse — Prevent signups from disposable email services that are commonly used for spam and fraud
  • Improve Data Quality — Ensure you're collecting genuine, long-term user contact information
  • Simple Integration — One API call to check any domain or email address
  • Real-Time Updates — Our database is continuously updated with new temporary email providers

Getting Started

To use the TempMailDetector email validation API, you'll first need a key. Each account includes free lookups monthly, with options to purchase additional lookups as needed.

Take a look at the Check Endpoint tab to learn how to integrate the API into your application, and review the Quota Endpoint tab to programmatically track your account and lookups.

Endpoint /check

Checks if an email address is a temporary or disposable email address.

Important: When implementing this email validation API, you should never send us your customer's full email. We only validate the domain, and where a full email is provided, we strip away the user part before processing the request.

Important: Due to sub-domains ( sub.test.com ) and multi-level country codes ( sub.test.co.uk ), you should split your email string using @ and send the full domain in your request.

URL

POST https://api.tempmaildetector.com/check

Headers

  • Content-Type: application/json
  • Authorization: Bearer {YOUR_API_KEY}

Request Body

The request body should be in JSON format and contain the following parameter:

  • domain (string, required): The domain (also known as the host) of the email address to be checked.
{
  "domain": "host.com"
}

curl Example Request

curl --request POST \
  --url https://api.tempmaildetector.com/check \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer {YOUR_API_KEY}' \
  --data '{"domain":"host.com"}'

Example Response

{
  "domain": "host.com",
  "score": 90, // Advised to block >= 75.
  "meta": {
    "block_list": false,
    "domain_age": 0,
    "website_resolves": false,
    "accepts_all_addresses": false,
    "valid_email_security": false,
    "forwarding": true
  }
}



Field Descriptions

Key Type Description
domain string The domain provided.
score int A risk score from 0 - 100.
You are advised to block >= 75.
meta object Meta object containing additional information about the domain provided.
meta.block_list bool Indicates if the domain is already in the block list.
meta.domain_age int Domain age in years. -1 indicates that a WHOIS did not provide a creation date.
meta.website_resolves bool Indicates if the email domain has a resolvable website.
meta.accepts_all_addresses bool Indicates if the email domain accepts any email address.
meta.valid_email_security bool Indicates if the email domain has valid email security measures in place.
meta.forwarding bool Indicates if the email is using a forwarding service.



Error Handling

The API will return appropriate HTTP status codes to indicate success or failure of the request. Common status codes include:

  • 200 OK : The request was successful.
  • 400 Bad Request : The request was malformed or missing required parameters.
  • 401 Unauthorized : The API key provided is invalid or missing.
  • 402 Payment Required : Your account has run out of lookups.
  • 500 Internal Server Error : An error occurred on the server.

Good to know:

  • bad_request is returned when the request body is missing or not valid JSON.
  • invalid_domain_or_mx is returned when we cannot resolve the domain to a mail server. This covers domains that are malformed, such as not a domain, and domains that do not exist, such as the typo gmail.cim.
  • invalid_api_key is returned when the API key is missing or invalid.
  • no_lookups_remaining is returned when your key has run out of lookups.

Ensure to handle these responses appropriately in your application.

Endpoint /check-email

Scores a full email address, returning a low / medium / high risk score for the local part, and a score out of 100 for the domain.

domain.score and local_part.risk are two independent signals. You should not expect them to always agree with one another.

Address domain.score local_part.risk Why
[email protected] 0 high Trusted domain, machine-generated mailbox name with dots.
[email protected] 90 low Disposable domain, human-chosen mailbox name.

URL

POST https://api.tempmaildetector.com/check-email

Headers

  • Content-Type: application/json
  • Authorization: Bearer {YOUR_API_KEY}

Request Body

The request body should be in JSON format and contain the following parameter:

  • email (string, required): The full email address to check.
{
  "email": "[email protected]"
}

curl Example Request

curl --request POST \
  --url https://api.tempmaildetector.com/check-email \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer {YOUR_API_KEY}' \
  --data '{"email":"[email protected]"}'

Example Response

{
  "local_part": {
    "name": "user",
    "risk": "high" // Advised to block: high, monitor: medium.
  },
  "domain": {
    "name": "host.com",
    "score": 90, // Advised to block >= 75.
    "block_list": false,
    "domain_age": 0,
    "website_resolves": false,
    "accepts_all_addresses": false,
    "valid_email_security": false,
    "forwarding": true
  }
}



Field Descriptions

Key Type Description
domain object The domain score object
domain.score int A risk score from 0 - 100 for the domain.
You are advised to block >= 75.
domain.block_list bool Whether the domain is treated as blocklisted. Not always the same as domain.score >= 75 : a direct blocklist or provider match sets it regardless of score, while forwarding services score 80 yet stay unblocked.
domain.domain_age int Domain age in years. -1 indicates that a WHOIS did not provide a creation date.
domain.website_resolves bool Indicates if the email domain has a resolvable website.
domain.accepts_all_addresses bool Indicates if the email domain accepts any email address.
domain.valid_email_security bool Indicates if the email domain has valid email security measures in place.
domain.forwarding bool Indicates if the email is using a forwarding service.
local_part object Signals about the local part (the part of the address before @ ).
local_part.name string The local part that was scored, echoed back so the consumer can tell which part the local_part.risk band applies to.
local_part.risk string One of low , medium , or high. How likely the local part looks auto-generated rather than human-chosen.
You are advised to block high.



Error Handling

The API will return appropriate HTTP status codes to indicate success or failure of the request. Common status codes include:

  • 200 OK : The request was successful.
  • 400 Bad Request : The request was malformed or missing required parameters.
  • 401 Unauthorized : The API key provided is invalid or missing.
  • 402 Payment Required : Your account has run out of lookups.
  • 500 Internal Server Error : An error occurred on the server.

Good to know:

  • bad_request is returned when the request body is missing or not valid JSON.
  • invalid_email is returned when the value provided is not a full email address — for example, missing @ , or nothing before it.
  • invalid_domain_or_mx is returned when we cannot resolve the domain part of the address to a mail server. This covers domains that are malformed, such as not a domain, and domains that do not exist, such as the typo gmail.cim.
  • invalid_api_key is returned when the API key is missing or invalid.
  • no_lookups_remaining is returned when your key has run out of lookups.

Ensure to handle these responses appropriately in your application.

GDPR Consideration:

The local part (everything in front of the @) is used only to compute the risk level, then discarded. Flagged domains are added to the block list. If elevated privacy is a concern, use the domain only check endpoint instead.

Quota Endpoint

Retrieve your remaining lookup quota and overage settings. This is particularly useful and often used by larger customers who require programmatic tracking of usage.

URL

GET https://api.tempmaildetector.com/quota

Headers

  • Content-Type: application/json
  • Authorization: Bearer {YOUR_API_KEY}

curl Example Request

curl --request GET \
  --url https://api.tempmaildetector.com/quota \
  --header 'Authorization: Bearer {YOUR_API_KEY}'

Example Response

{
  "lookups_remaining": 150,
  "overage_enabled": true,
  "overage_count": 25,
  "overage_limit": 1000
}

Response Field Descriptions

Key Type Description
lookups_remaining int Number of standard lookups remaining in your current billing cycle
overage_enabled bool Whether your account is configured to allow overage lookups beyond the standard quota
overage_count int Number of overage lookups already used in the current billing cycle
overage_limit int Maximum number of overage lookups allowed per billing cycle

Error Handling

  • 200 OK : The request was successful.
  • 401 Unauthorized : The API key is invalid or missing.

GDPR Statement

You should update your Terms of Service and GDPR statements outlining that you make use of Temp Mail Detector as a 3rd party Data Processor to manage email reputation and validation:

Our website uses TempMailDetector.com as a Data Processor to identify and block temporary or disposable email addresses during sign-up. This helps prevent abuse and is processed under our legitimate interest in maintaining service integrity (GDPR Art. 6(1)(f)).

WordPress Plugin

Stop WordPress disposable emails plugin

Our WordPress plugin automatically validates user email addresses during registration and checkout, blocking temporary and disposable email domains in real-time.

Features

  • Blocklist — Enter your own list of domains to block
  • Protect Comments — Choose if you would like the plugin to mark comments as spam
  • Protect WooCommerce — Block temporary emails during WooCommerce checkout, customer registration, and account updates
  • Plus Emails — Block emails which have a + in the user part
  • External Check — This makes use of the live Temp Mail Detector database for real-time checks

Ghost Plugin

Stop Ghost disposable emails plugin

Automatically detect and remove members with temporary email addresses when they sign up to your Ghost publication. By configuring a member.added webhook, Ghost sends each new member to our endpoint where we score their email domain and optionally delete or disable the member via the Ghost Admin API if it looks disposable.

1. Connect Your Ghost Site

  1. In your Ghost admin panel, go to Settings → Integrations → Add custom integration . Name it (e.g. "TempMailDetector") and copy the Admin API key .
  2. In your TempMailDetector account settings → Plugins , enter your Ghost site URL and Admin API key, and choose what should happen when a disposable address is detected: delete the member (default) or unsubscribe them from all newsletters .

2. Configure Your Webhook

In the same Ghost custom integration, under Webhooks , add a new webhook with event Member added and the following target URL. Enter your TempMailDetector API key below to generate it.

Fill in your API key above to generate the URL.

Copied to clipboard.

Each new member is now checked on signup, and members with a disposable email address are handled automatically using the action you chose in your account settings.

;

Stop fraudulent signups

Get protected