Email Verification API

Validates and verifies an email address assessing deliverability and quality.

Authentication

Email Verification API uses API keys to authenticate requests. You can view and manage your API keys (Domain Keys) in the Domains page.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

All requests made to the API must hold a custom HTTP header named "apikey". Implementation differs with each programming language. Below are some samples.

All API requests must be made over HTTP/HTTPS. API requests without authentication will fail.

PHP CURL Integration

<?php
    $email = isset($_POST['email'])?$email=$_POST['email']:'';
    $data = array('email' => $email, 'domain' => $_SERVER['SERVER_NAME']);
      function checkBounce($method, $data){
          define("api_key", 'Your_API_Key_Here');
          $url = "https://bounceinspector.com/api/api.php";
          $curl_url = $url.'?'.http_build_query($data);
          $curl = curl_init($curl_url);
          curl_setopt($curl, CURLOPT_URL, $curl_url);
          if ($method == 'POST') {
              curl_setopt($curl, CURLOPT_POST, 1);
          }
          curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

          $headers = array(
             "api_key: ".api_key,
             "Content-Type: application/json",
          );
          curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
          //for debug only!
          curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
          curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);

          $resp = curl_exec($curl);
          curl_close($curl);
          return $resp;
      }

      $getResult = checkBounce('GET', $data);

      print_r($getResult);
 ?>
 	
 

Curl

curl --request GET \ --url 'https://bounceinspector.com/api/api.php?email=EMAIL_ADRESS_TO_VERIFY&domain=Your_Domain_Name' \ --header 'api_key: API KEY HERE' \ --header 'Content-Type: application/json'
 								

Python

import requests
headers = {
'api_key': 'Your_API_KEY_HERE',
'Content-Type': 'application/json',
}
params = {
'email': 'EMAIL_TO_VERIFY',
'domain': 'YOUR_DOMAIN_NAME',
}
response = requests.get('https://bounceinspector.com/api/api.php', params=params, headers=headers)
print(response.content)
 								

Javascript

fetch('https://bounceinspector.com/api/api.php?email=EMAIL_TO_VERIFY&domain=YOUR_DOMAIN_NAME', {
headers: {
'api_key': 'Your_API_KEY_HERE',
'Content-Type': 'application/json'
}
}).then(response => response.text()).then(data => console.log(data));
 								

JAVA

import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Scanner;
class Main {
 public static void main(String[] args) throws IOException {
    URL url = new URL("https://bounceinspector.com/api/api.php?email=EMAIL_ADRESS_TO_VERIFY&domain=Your_Domain_Name");
    HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
    httpConn.setRequestMethod("GET");

    httpConn.setRequestProperty("api_key", "Your_API_KEY_HERE");
    httpConn.setRequestProperty("Content-Type", "application/json");

    InputStream responseStream = httpConn.getResponseCode() / 100 == 2
        ? httpConn.getInputStream()
        : httpConn.getErrorStream();
    Scanner s = new Scanner(responseStream).useDelimiter("\\A");
    String response = s.hasNext() ? s.next() : "";
    System.out.println(response);
  }
}
 								

GO

package main

import (
  "fmt"
  "io/ioutil"
  "log"
  "net/http"
)
func main() {
  client := &http.Client{}
  req, err := http.NewRequest("GET", "https://bounceinspector.com/api/api.php?email=EMAIL_ADRESS_TO_VERIFY&domain=Your_Domain_Name", nil)
  if err != nil {
    log.Fatal(err)
  }
  req.Header.Set("api_key", "API KEY HERE")
  req.Header.Set("Content-Type", "application/json")
  resp, err := client.Do(req)
  if err != nil {
    log.Fatal(err)
  }
  defer resp.Body.Close()
  bodyText, err := ioutil.ReadAll(resp.Body)
  if err != nil {
    log.Fatal(err)
  }
  fmt.Printf("%s\n", bodyText)
}
 								

Node.JS Axios

const axios = require('axios');

const response = await axios.get('https://bounceinspector.com/api/api.php', {
     params: {
           'email': 'EMAIL_ADRESS_TO_VERIFY',
           'domain': 'Your_Domain_Name'
     },
     headers: {
           'api_key': 'API KEY HERE',
           'Content-Type': 'application/json'
     }
});
 								

Request parameters

Parameter Type Position # Description
email string Body Required Email to verify.
domain string Body Required The domain name corresponding to the API KEY (included in domains list)
api_key string Header Required Your API Key

Response structure

{
"error_status":0,
"score":99,
"result":1,
"email":"example@email.com"
}



Reponse parameteres

Parameter Type Value Description
Error_status Integer 0, 1, 2, 3, 4 Return one value from 0 to 4 (check error status description)
Score Integer 0, 10, 50, 99 check score description
Result Integer Return the result of verification
Email string Email to verify Return verified email

Error status

Value Description
0 There is no error and every thing is okay
1 Invalid API Key
2 Invalid or not verified email
3 Invalid User
4 Credit Insufficient

Score

Value Description
0 The email was not verified due to an error status (Check Error Status), if the error status is 0 it means the email syntax is incorrect (high bounce risk)
10 Email syntax is correct but email not exists or is disposable email (high bounce risk)
50 Email syntax is correct and dns server exists but communication with server is failed (the risk of bounce is 50%). If this result appears with a professional domain, there is a low risk of reputational impact, but if it appears with a high traffic email provider like Gmail, Yahoo, Outlook,....etc. The risk of reputational impact is high
99 This email exist, the chance of deliverability is high (the email is good for communication)

Result

Value Description
-6 Invalid API key
-5 Invalid or not verified domain name
-4 Invalid User
-3 Suspected as phishing email address
-2 Credit Insufficient
-1 Greylisted email address (cannot determine whether email exists or not due to failed connection to email server), if email is provided from free providers such as (Gmail, yahoo, outlook, hotmail...etc), Then you can re-verify your email.
0 Blacklisted email address (this email lead to hard bounce)
1 Whitelisted email address (this email is deliverable)
2 Blacklisted email address (domain name not exists), this email lead to hard bounce
3 Blacklisted email address (Email syntax is not correct), this email lead to hard bounce