Back to BlockTempMail

Getting Started

This documentation provides information about BlockTempMail, which you can use to block temporary and fake emails. Our API helps reduce spam and fake sources on your website and makes it easier for real users to communicate with you. Before you start using our API, you need to create an account. Once the account creation process is complete, you can access our API and start using the feature to block temporary and fake emails. This documentation explains step-by-step how to use our API to block temporary emails. It also provides information on sample code and solutions to common problems.

What is BlockTempMail?

BlockTempMail is an API service that can be easily integrated into any project to protect it from fake and disposable email addresses.

Why should i use BlockTempMail?

In today's world, many services and applications require users to register with an email address. However, some users abuse these services by creating fake or disposable email addresses. Such email addresses can be used for various purposes, including sending spam, committing identity theft, and engaging in fraudulent activities. BlockTempMail is an API service that detects these fake and disposable email addresses and protects your projects from these malicious activities. By using this service, you can ensure that users register with valid and genuine email addresses, which is essential for maintaining the security of their accounts and preventing time and resource losses due to spam. BlockTempMail is easy to integrate into your projects via its API interface. This makes it a quick and simple process to add this protection to your projects. Additionally, using BlockTempMail is cost-effective, allowing you to incorporate this service into your projects without exceeding your budget.

Capabilities of BlockTempMail

  • Email format validation.
  • Detection of temporary and fake emails.
  • TLD validation for email addresses.
  • Verification of mailbox existence.
  • Role-based email detection.
  • Customizable and modular design for optimal performance.

Basic Usage

Requirements

To use BlockTempMail API, you will need an API token and an environment to make HTTP requests. The API token can be generated by signing up on the BlockTempMail website and selecting a plan that suits your budget. Once you have obtained the API token, you can use it to authenticate your requests and access the features provided by the BlockTempMail API. Additionally, you may need to have knowledge of HTTP methods, data formats, and the endpoint URLs to send valid requests to the API. It is also recommended to have basic knowledge of programming and scripting languages to integrate BlockTempMail API with your applications seamlessly.

Submit your first request

Sending your first request on BlockTempMail is a simple process. All you need to do is construct an HTTP request with the email address you want to check and your API token.

Here is an example of what the request URL should look like:

https://api.blocktempmail.com/TEST-EMAIL-HERE?token=API-TOKEN-HERE

After sending your request to BlockTempMail's API endpoint, you can expect to receive a detailed and informative response in JSON format.

{
  "status": 200,
  "email": "test@example.com",
  "username": "test",
  "domain": "example.com",
  "tempmail": false,
  "provider" : null,
  "mx": [
  "mail.example.com"
  ],
  "datetime" : "07 Sep 2025 10:18.45"
}

This response will provide valuable information about the email address you have verified, allowing you to make informed decisions about how to proceed. By leveraging BlockTempMail's advanced technology, you can easily detect temporary or disposable email addresses, preventing unnecessary sign-ups and protecting your platform from spam and abuse. With BlockTempMail, you can streamline your verification process and ensure the integrity of your data. So why wait? Sign up for BlockTempMail today and start verifying your email addresses with ease and confidence!

Status Codes

HTTP status codes are three-digit numbers that are returned by a server in response to a client's request. These codes indicate the status of the requested resource and provide information on how the request was processed. Understanding HTTP status codes is essential for troubleshooting API requests and responses.

The following table lists the common HTTP status codes returned by the BlockTempMail API and their corresponding meanings:

Code Description
200 The request has succeeded. The server has returned the requested data.
400 The request could not be understood or was missing required parameters.
401 Authentication failed or the API token is invalid.
429 The user has sent too many requests in a given amount of time.

API Result

To help you better understand the data returned by the BlockTempMail API, we have provided a comprehensive table below that lists all the keys returned by the API and provides a brief description of each key's value.

Key Description
status The HTTP status code for the API response.
email The email address that was validated.
username The username part of the email address.
domain The domain part of the email address.
tempmail A boolean value indicating whether the email address is a temporary or disposable email address.
provider The email provider associated with the domain (if available).
mx The mail exchange (MX) records for the domain.
datetime The date and time the API response was generated.
error error.type
The error type can be one of these values: not_exist_mailbox, invalid_tld, invalid_email, or not_found_mx_record.
error.message
A message that provides more details about the error encountered.

At BlockTempMail, we offer you the flexibility to customize our API keys according to your specific needs. By filtering out the results that you don't need, you can save valuable time and resources. Our modular architecture allows you to tailor the API to your exact requirements, ensuring a seamless integration with your existing systems. With BlockTempMail, you are in control of your email verification process, ensuring the highest levels of efficiency and accuracy for your business needs.