1. Code
  2. APIs

Validate and Verify Emails With the mailboxlayer API

Scroll to top
Read Time: 5 mins
Sponsored Content

This sponsored post features a product relevant to our readers while meeting our editorial guidelines for being objective and educational.

The internet is only a few decades old, and in that relatively short amount of time, we have seen it transform from a delivery mechanism for simple, text-based information to the platform that the world’s applications and communication systems run on. But despite all of the changes it (and we) have experienced over that time, email is still the primary means of communication between individuals and businesses.

In fact, the fundamental issues that haunted email at its creation are still in place today. It is:

  • prone to failure due to syntax errors, simple typos, or invalid addresses
  • easy to obtain and thus easy to use for spoofing and spam
  • sometimes unreliable due to network issues and over-aggressive black-lists

Every organization needs some tools to help alleviate these issues. By using mailboxlayer, your applications can provide functionality to address each of them.

What Is mailboxlayer?


Mailboxlayer is a powerful RESTful API that offers instant email address validation and verification via syntax checks, typo and spelling checks, SMTP checks, free and disposable provider filtering, and much more. It is secured by 256-bit encryption, and it will help you deliver applications that fight against fraudulent email while increasing the success rates of email campaigns.

The mailboxlayer API is built and maintained by apilayer, an Austrian company that specializes in building fast and highly scalable APIs for a wide variety of purposes and industries. They’ve built a cloud infrastructure that can handle anything—from hundreds of requests a month to millions of requests a minute. And the best thing is their pricing; they have subscription plans for any budget.

The mailboxlayer API exists for a single, yet admirable, purpose: to fight fraud. Email is the principal means of communication with your customers. So before you add just any old email into your database, you should verify that it’s valid. Mailboxlayer’s feature-set helps you do that.

Features: Why Use the mailboxlayer API?

Companies such as Intel, Zillow, and Bitwage rely upon mailboxlayer to separate low-quality email addresses from real users. Here are a few reasons:

Secure Data Streams

All paid plans have access to 256-bit encrypted data streams.

Full Verification

Verify email addresses as they come into your system, and use their provider database, which is updated daily, to separate free and disposable emails from real domains.

Interactive Documentation

Each endpoint is thoroughly documented, and you can try out the API’s features as you go through the documentation.

Easy to Use

You can make requests using an easy-to-integrate URL structure, and response payloads use a lightweight JSON format.

World-Class Tech Support

The tech team at mailboxlayer is fantastic, and they’re trained to provide the exact information you need when you need it.

Infinitely Scalable

mailboxlayer is built on top of apilayer’s cloud infrastructure, so it can meet your smallest and largest demands.

Lightning-Fast Response

Did we mention mailboxlayer is built on apilayer’s cloud infrastructure? That means it is also incredibly fast!

Near 100% Uptime

Thanks to apilayer’s cloud infrastructure, you can rely on mailboxlayer to be readily available to power your applications.

How It Works

The mailboxlayer API is a RESTful API that delivers data in JSON format. It provides several endpoints that serve different features and advanced tools, such as syntax and typo checks, DNS and SMTP verification, catch-all detection, and more.

Quick Tutorial

As with all other apilayer services, it’s easy to get started with mailboxlayer. The first thing you need to do is register a free account to get an access key. This is provided by the control panel’s dashboard—the first thing you see after registering your account.

Mailboxlayer DashboardMailboxlayer DashboardMailboxlayer Dashboard

The dashboard also features an interactive API demo that provides the basic syntax for an email address validation. As mentioned earlier, the API always responds with JSON—even for errors. The following is a snippet from an actual response:

Sample JSON ResponseSample JSON ResponseSample JSON Response

The control panel also lets you view account and subscription information, as well as your API usage. The latter shows how many requests have been made for the month, as well as a daily usage breakdown.

Mailboxlayer API usageMailboxlayer API usageMailboxlayer API usage

You will want to visit the documentation in order to integrate the API into your applications. Each endpoint is thoroughly documented, and you’ll find basic PHP and JavaScript code samples.


Mailboxlayer has many subscription plans. The Free plan is great for testing and personal use. It limits you to 250 requests per month and provides access to the syntax/typo, provider, feature, and DNS/SMTP end points.

Mailboxlayer Subscription PricesMailboxlayer Subscription PricesMailboxlayer Subscription Prices

Of course, you can unlock more features by choosing one of the following paid plans:

Basic: This plan includes 5,000 monthly requests, HTTPS support, and access to the catch-all endpoint.

Professional Plus: In addition to the features provided by the Basic plan, the Professional Plus plan gives you 50,000 requests per month and the ability to check 25 email addresses with a single request.

Enterprise Plus: This plan gives you everything and increases the monthly limit to 250,000 requests and bulk checks of up to 100 email addresses per request.


Email is the primary means of communication between you and your users, and it makes perfect sense that you may want to validate and verify your users’ email addresses. Not only does it help fight fraud, but validation/verification can help reduce bounce rates for your email campaigns.

Mailboxlayer has the tools you need to do just that. With its easy-to-use RESTful API, you can validate and verify email addresses, check DNS MX records and SMTP servers, check for disposable email addresses, and much more. Mailboxlayer is very easy (and free!) to get started with, so register an account and try it today!

Did you find this post useful?
Want a weekly email summary?
Subscribe below and we’ll send you a weekly email summary of all new Code tutorials. Never miss out on learning about the next big thing.
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.