Skip to main content

Email Validation API

Overview

  • Provides email address validation using standard URL requests.
  • The service follows RESTful principles – accepting HTTP requests and returning JSON response documents.

Quick Start

  • To use this functionality you will need to buy an Email Validation click bundle from the Shop located in our Portal. Register for the Portal here.
  • An email address is validated by sending a POST request to the URL:
https://api.hopewiser.com/email-verify/verify

 

    where the request body contains the email address to verify. For example:
{
"email": "support@hopewiser.com"
}
  • The service can respond with a status of either Completed or Processing. If the status is Processing, then the result should be obtained by making periodic GET requests for the returned resource ID. For example:
https://api.hopewiser.com/email-verify/verify/afe5bc5f-1078-422b-9a342-eba02ba8a395
  • Authentication is achieved using HTTP Basic Authentication, where both the token username and password are supplied in the Authorization request header. To secure this information all requests should use the https:// protocol, in preference to standard http://.

Basics

How do I determine if my token can use the Email Validation API?

The Email Validation API is only available when your Portal account contains an active Email Validation plan. You can determine this by sending a GET request to the URL:

https://api.hopewiser.com/email-verify/provisioned
  • The service will respond with the HTTP status code 200 (OK) if the token has been successfully authenticated. The response body will be a JSON object comprising a provisioned and optional blocked property.
Property/KeyDescription
provisionedA boolean indicating if an Email Validation plan has been provisioned for the token.
blocked?An optional string, which if present indicates that the Email Validation plan has been blocked. The string text provides the blocked reason (e.g. “No clicks remaining”).
    Example response body:
{
"provisioned": true
}

 

How do I submit an email address for validation?

An email validation is initiated by sending a POST request to the URL:

https://api.hopewiser.com/email-verify/verify

Where the request body is a JSON object comprising a single mandatory property

Property/KeyDescription
emailA string representing the email address to validate
    For Example :
{
"email": "support@hopewiser.com"
}

 

The service will respond with the HTTP status code 200 (OK) if the validation was completed in a timely manner. Otherwise, the HTTP status code 202 (Accepted) will be returned indicating that the request has been accepted and is being processed.

The response body will be a JSON object comprising an id, status and optional result property.

Property/KeyDescription
idA string representing a unique resource identity.
statusA string providing the validation status; either Processing or Complete.
result?An optional JSON object that will contain the result when the validation is complete.
result?.classificationA string representing the result classification for the validated email address. See Email Classification Codes for a list of possible values
result?.statusA string representing the result status for the validated email address. See Email Status Codes for a list of possible values
result?.disposable?An optional boolean indicating if the validated email address is a temporary, disposable address.
result?.free?An optional boolean indicating if the validated email address is handled by a well-known free email service provider (e.g. Gmail, Yahoo, Outlook / Live / Hotmail, etc.).
result?.group?An optional boolean indicating if the validated email address may be referring to a well-known group, which could be configured to handle general communication for a whole department or even an entire company (e.g. sales@example.com).

Example Response HTTP Status Codes

{
  "id": "afe5bc5f-1078-422b-9a342-eba02ba8a395",
  "status": "Processing"
  }
{
   "id": "afe5bc5f-1078-422b-9a342-eba02ba8a395",
   "status": "Complete",
   "result": {
      "classification": "Unverifiable",
      "status": "ServerIsCatchAll",
      "disposable": false,
      "free": false,
      "group": true
   }
}

How do I obtain the results for an email address validation?

If the returned status is Processing, then the validation result may be obtained by periodically sending a GET request. For example:

https://api.hopewiser.com/email-verify/verify/{id}

The ID should be replaced with the ID provided in the initial submission. For example:

https://api.hopewiser.com/email-verify/verify/afe5bc5f-1078-422b-9a342-eba02ba8a395

The service will respond with the HTTP status code 200 (OK) if the validation has completed. Otherwise, the HTTP status code 202 (Accepted) will be returned indicating that the validation is still being processed.

Results can be obtained up to 10 minutes from the initial request submission.

The response body will have the same structure as that returned for the initial POST request.

Email Classification Codes

Classification CodesDescription
DeliverableThe email address can be delivered to.
DisposableEmail address is associated with a known disposable address provider.
HarmfulThe email address is potentially harmful and has been identified as associated to a known trap.
UnconfirmedThe email address may be deliverable, but Hopewiser are unable to confirm this. (Please review associated status.)
UndeliverableThe email address cannot be delivered to.
UnknownHopewiser cannot determine whether the email address can be delivered to or not.
UnverifiableThe email server has been identified as a Catch All, the email address is potentially deliverable to.

Email Status Codes

The following table lists the possible status codes that may be returned for a verified email address.
NOTE: New status codes may be added in the future to allow for expansion. As such, client applications should accept new, unknown status codes and treat them as undetermined.

Status CodesDescription
ConnectionFailureA connection error occurred whilst performing the email validation.
ConnectionTimeoutA connection timeout occurred whilst performing the email validation.
DisposableEmailAddressThe email address is for a disposable mailbox or is provided by a known disposable email address provider.
DoesNotExistThe email address does not exist.
FormatErrorThe format of the email address is syntactically incorrect.
InternationalUnsupportedThe external mail exchanger does not support international mailbox names.
ServerIsCatchAllThe external mail exchanger accepts fake and non-existent email addresses that are sent to the domain. Therefore, the existence of the individual mailbox cannot be verified.
SpamTrapThe external mail exchanger hides a spam trap (honeypot).
SuccessDeliverable email address that successfully completed verification.
TemporarilyUnavailableThe requested mailbox is temporarily unavailable.
UnhandledExceptionOne or more unhandled exceptions have been thrown during the verification process.

HTTP Status Codes

The Email Validation service may return one of the following HTTP status codes to indicate the success or failure of a request.

HTTP status codeDescription
200 (OK)The email address validation has successfully completed.
202 (Accepted)The email address validation request has been accepted and is being processed.
400 (Bad Request)The request is not formatted correctly or is missing a mandatory parameter.
401 (Unauthorized)The request does not contain valid token credentials.
403 (Forbidden)Email address validation may not be enabled for the authenticated token, a token restriction has been observed or no processing clicks are available.
404 (Not Found)The requested resource does not exist or is no longer available.
405 (Method Not Allowed)The HTTP method is not allowed for the given URL. For example, performing a GET request when the unique resource identity has been omitted from the URL.
415 (Unsupported Media Type)The request body must be in JSON format (i.e. have the Content-Type header value application/json).
5xx (Server Error)The email address validation could not be completed due to an unexpected server error.

Status Codes

For all status codes, other than 200 (OK) and 202 (Accepted), a textual description of the response may also provided. For example:

{
     "status": "Not Found",
     "statusDetails": {
        "description": "The specified resource does not exist or is no longer available"
     }
}

 

Authorisation Code