Check Email API

Endpoint: GET /v1/check_email/

This API endpoint allows you to verify the existence of an email address and check whether a Gmail account requires phone number verification for login.

Authentication

To use this API, you need an API key. Here's how to obtain and use it:

  1. Obtaining the API Key:

    • Log in to https://my.sonjj.com
    • Navigate to the API section
    • You will find your unique X-Api-Key there
  2. Using the API Key:

    • Include the X-Api-Key in the header of every request
    • Header name: X-Api-Key
    • Header value: Your unique API key

Request

Parameters

Name In Type Required Description
email query string true The email address to check

Headers

  • X-Api-Key: Your API key (required)
  • Accept: application/json

Example Request

const headers = {
  'Accept':'application/json',
  'X-Api-Key':'YOUR_API_KEY'  // Replace with your actual API key from https://my.sonjj.com
};

fetch('https://app.sonjj.com/v1/check_email/?email=example@gmail.com',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

Response

Success Response (200 OK)

A JSON object containing information about the email address:

{
  "type": "string",
  "disposable": "string",
  "status": "string"
}
  • type: Indicates the type of email address
  • disposable: Indicates whether the email is from a disposable email service
  • status: Provides information about the existence or validity of the email address

Error Response (422 Unprocessable Entity)

In case of validation errors, the API will return a 422 status code with details about the error.

Features

  1. Email Existence Verification: The API checks if the provided email address exists.
  2. Gmail Phone Verification Check: For Gmail accounts, it determines if phone number verification is required for login.
  3. Disposable Email Detection: Identifies if the email is from a disposable email service.
  4. Email Type Classification: Categorizes the email address type.

Use Cases

  • User registration validation
  • Email list cleaning
  • Fraud prevention
  • Improving email deliverability

Notes

  • This API goes beyond basic syntax checking, providing deeper insights into email validity and security features.
  • The response time may vary depending on the email provider and the checks performed.
  • Respect privacy laws and terms of service when using this API to verify email addresses.