Use this Restful endpoint to validate an email address and return information about its syntax, domain, deliverability, and activity status.
See also: Restful Email Swagger documentation
GET request
Endpoint
GET https://{SERVER_ADDRESS}/{VERSION}/email/lookup?email={EMAIL}&rectify={RECTIFY}&extendedSyntax={EXTENDED_SYNTAX}&checkUser={CHECK_USER}&timeout={TIMEOUT}
Replace the values in braces with your own information.
| Parameter | Description | Mandatory/Optional |
|---|---|---|
| Email address to validate. | Mandatory | |
| rectify |
true to propose a domain correction when the entered domain is unknown; false otherwise. |
Optional |
| extendedSyntax |
true to accept email addresses with extended syntax; false to limit checks to standard email addresses. |
Optional |
| checkUser |
true to check the part before the @ sign; false to check only the domain. |
Optional |
| timeout | Maximum query time for verification, in seconds. | Optional |
POST request
Endpoint
POST https://{SERVER_ADDRESS}/{VERSION}/email/lookup
Send the following parameters in the request body using JSON.
| Parameter | Description | Mandatory/Optional |
|---|---|---|
| Email address to validate. | Mandatory | |
| rectify |
true to propose a domain correction when the entered domain is unknown; false otherwise. |
Optional |
| extendedSyntax |
true to accept email addresses with extended syntax; false to limit checks to standard email addresses. |
Optional |
| checkUser |
true to check the part before the @ sign; false to check only the domain. |
Optional |
| timeout | Maximum query time for verification, in seconds. | Optional |
Example:
{
"email": "test@example.com",
"rectify": true,
"extendedSyntax": false,
"checkUser": true,
"timeout": 0.5
}
Response
Success response
The JSON response contains validation details for the provided email address.
| Key | Description | Type |
|---|---|---|
| IdError | Error code returned by the API. | INTEGER |
| Error | Error message associated with the validation result. | STRING |
| Formatted | Normalized and formatted email address. | STRING |
| LocalPart | Part before the @ symbol. | STRING |
| Domain | Email domain name. | STRING |
| Tld | Top-level domain. | STRING |
| IsValid | Indicates whether the email syntax is valid. | BOOLEAN |
| IsDisposable | Indicates whether the email belongs to a disposable provider. | BOOLEAN |
| IsCatchAll | Indicates whether the domain accepts all email addresses. | BOOLEAN |
| IsFree | Indicates whether the provider is free. | BOOLEAN |
| IsRole | Indicates whether the address is role-based. | BOOLEAN |
| IsDeliverable | Indicates whether the email address is deliverable. | BOOLEAN |
| HasSuggestedCorrection | Indicates whether a correction suggestion is available. | BOOLEAN |
| SuggestedCorrection | Suggested corrected email address. | STRING |
| DomainExists | Indicates whether the domain exists. | BOOLEAN |
| HasMxRecords | Indicates whether MX records are available. | BOOLEAN |
Example:
{
"IdError": 0,
"Error": "",
"Formatted": "test@gmail.com",
"LocalPart": "test",
"Domain": "gmail.com",
"Tld": "com",
"IsValid": true,
"IsDisposable": false,
"IsCatchAll": false,
"IsFree": true,
"IsRole": false,
"IsDeliverable": true,
"HasSuggestedCorrection": false,
"SuggestedCorrection": "",
"DomainExists": true,
"HasMxRecords": true
}
Error response
| Error type | Response type |
|---|---|
| Missing or invalid authentication | 401 Unauthorized |
| Missing email parameter | 400 Bad Request |
| Invalid email syntax | Validation error response |
Related to