Easy Email API Documentation
Welcome to the official documentation for the Email Verification API. This guide provides detailed instructions to help you integrate and use the API effectively.
Overview
The Easy Email Verification API is designed to validate email addresses in real-time. It provides information about the validity, deliverability, and attributes of email addresses to ensure a clean and reliable user database.
Features
- Email Validation: Check if an email address is formatted correctly.
- Domain Analysis: Validate if the domain of the email is active and has proper DNS records.
- Disposable Email Detection: Identify temporary email addresses.
- Free Email Detection: Identify email addresses using a free email provider like
gmail.com - Role-Based Email Detection: Detect emails associated with roles like
[email protected]. - Inbox Existence Check: Confirm if the email inbox exists.
- Confidence Scoring: Assess the reliability of the email address.
Quick Start
Replace {email} with the email address you want to validate.
Example Request
GET http://easyemailapi.com/api/verify/tcook%40apple.com
Authentication
EasyEmailAPI uses personal access tokens created in the dashboard.
Header Authentication (Recommended)
Send the token as a Bearer token:
curl -H "Authorization: Bearer YOUR_TOKEN" \
"http://easyemailapi.com/api/verify/tcook%40apple.com"
Query String Authentication
You can also send the token as a query parameter for simpler integrations:
curl "http://easyemailapi.com/api/verify/tcook%40apple.com?token=YOUR_TOKEN"
Supported parameters:
tokenapi_token
Always URL-encode email addresses and tokens when using query strings.
Response Format
The API returns a JSON response with the following structure:
{
"email": "[email protected]",
"valid": true,
"user": "tcook",
"domain": "apple.com",
"role": false,
"disposable": false,
"free_email": false,
"valid_mx": true,
"mx": "",
"sub": false,
"score": 60,
"max_score": 60,
"inbox_exists": false,
"inbox_check_enabled": false
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
email | String | The email address being verified. |
valid | Boolean | Indicates whether the email is valid in structure. |
user | String | The username part of the email address. |
domain | String | The domain part of the email address. |
role | Boolean | Indicates if the email is role-based (e.g., admin@, support@). |
disposable | Boolean | Identifies if the email is from a disposable email provider. |
free_email | Boolean | Identifies if the email is from a free email provider (ex: gmail) |
valid_mx | Boolean | Checks if the domain has valid MX (mail exchange) records. |
mx | String | Details about the mail exchange server, if available. |
sub | Boolean | A custom flag for additional features or filters. |
score | Integer | A confidence score for the reliability of the email. |
max_score | Integer | The maximum possible score for the response. |
inbox_exists | Boolean | Confirms whether the email inbox exists (if enabled). |
inbox_check_enabled | Boolean | Whether inbox checks are enabled for your account. |
Error Codes
| Code | Description |
|---|---|
400 | Invalid request or missing email parameter. |
404 | Email address not found or inaccessible. |
500 | Internal server error. |
Rate Limiting
The FREE plan is limited to 10 requests per minute to ensure fair usage and the stability of the service.
Need More Requests?
If your application requires a higher allocation, we’re here to help! Please reach out to us to discuss customized plans that suit your needs.
Contact us at [email protected] or visit our website for more information.
Integration Examples
cURL
curl -H "Authorization: Bearer YOUR_TOKEN" \
"http://easyemailapi.com/api/verify/tcook%40apple.com"
JavaScript (Axios)
const axios = require("axios");
axios
.get("http://easyemailapi.com/api/verify/tcook%40apple.com", {
headers: { Authorization: "Bearer YOUR_TOKEN" },
})
.then((response) => console.log(response.data))
.catch((error) => console.error(error));
JavaScript (Without Axios)
const email = "[email protected]";
const url = `http://easyemailapi.com/api/verify/${encodeURIComponent(email)}`;
fetch(url)
.then((response) => {
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return response.json();
})
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error("Error:", error);
});
To include authentication without Axios, add the header:
const email = "[email protected]";
const url = `http://easyemailapi.com/api/verify/${encodeURIComponent(email)}`;
fetch(url, {
headers: {
Authorization: "Bearer YOUR_TOKEN",
},
})
.then((response) => {
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return response.json();
})
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error("Error:", error);
});
Python
import requests
email = "[email protected]"
url = f"http://easyemailapi.com/api/verify/{email}"
headers = {"Authorization": "Bearer YOUR_TOKEN"}
response = requests.get(url, headers=headers)
if response.status_code == 200:
data = response.json()
print(data)
else:
print(f"Error: {response.status_code}")
PHP
<?php
$email = "[email protected]";
$url = "http://easyemailapi.com/api/verify/" . urlencode($email);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_TOKEN',
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if ($response === false) {
echo "Error: " . curl_error($ch);
} else {
$data = json_decode($response, true);
print_r($data);
}
curl_close($ch);
PHP (Laravel)
use Illuminate\Support\Facades\Http;
$email = "[email protected]";
$url = "http://easyemailapi.com/api/verify/".urlencode($email);
$response = Http::withToken('YOUR_TOKEN')->get($url);
if ($response->successful()) {
$data = $response->json();
print_r($data);
} else {
echo "Error: " . $response->status();
}
PHP (Guzzle)
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$email = "[email protected]";
$url = "http://easyemailapi.com/api/verify/".urlencode($email);
$client = new Client();
$response = $client->request('GET', $url, [
'headers' => [
'Authorization' => 'Bearer YOUR_TOKEN',
],
]);
if ($response->getStatusCode() === 200) {
$data = json_decode($response->getBody(), true);
print_r($data);
} else {
echo "Error: " . $response->getStatusCode();
}
Ruby
require 'net/http'
require 'json'
email = '[email protected]'
url = URI("http://easyemailapi.com/api/verify/#{URI.encode_www_form_component(email)}")
request = Net::HTTP::Get.new(url)
request['Authorization'] = 'Bearer YOUR_TOKEN'
response = Net::HTTP.start(url.hostname, url.port) { |http| http.request(request) }
if response.is_a?(Net::HTTPSuccess)
data = JSON.parse(response.body)
puts data
else
puts "Error: #{response.code}"
end
C#
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string email = "[email protected]";
string url = $"http://easyemailapi.com/api/verify/{Uri.EscapeDataString(email)}";
using (HttpClient client = new HttpClient())
{
try
{
client.DefaultRequestHeaders.Authorization =
new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", "YOUR_TOKEN");
HttpResponseMessage response = await client.GetAsync(url);
if (response.IsSuccessStatusCode)
{
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
else
{
Console.WriteLine($"Error: {response.StatusCode}");
}
}
catch (Exception e)
{
Console.WriteLine($"Exception: {e.Message}");
}
}
}
}
Java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class EmailVerification {
public static void main(String[] args) {
String email = "[email protected]";
String urlString = "http://easyemailapi.com/api/verify/" + java.net.URLEncoder.encode(email, "UTF-8");
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Bearer YOUR_TOKEN");
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder response = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} else {
System.out.println("Error: HTTP response code " + responseCode);
}
} catch (Exception e) {
System.out.println("Exception: " + e.getMessage());
}
}
}
