{
"success": true,
"data": {
"is_valid": false,
"is_free": false,
"is_role_based": true,
"is_educational": false,
"is_disposable": false,
"is_blacklisted": false,
"email": "test@dangerous-domain.com",
"domain": {
"name": "dangerous-domain.com",
"is_dangerous": true,
"is_spf": false,
"is_dmarc": false,
"is_dkim": false,
"is_mx": false,
"is_bimi": false,
"created_at": "2025-02-05",
"is_new": true,
"domain_age_days": 45,
"has_website": true,
"mx_provider_class": "custom"
},
"custom_rules_applied": {
"total": 0,
"rules": []
},
"risk_level": "high",
"recommendation": "reject",
"reasons": [
"Email domain is considered dangerous."
],
"rules": [
{
"id": "EMAIL_DANGEROUS_DOMAIN",
"description": "Email domain is considered dangerous."
}
]
},
"execution_ms": 1
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
Email scoring
curl --request GET \
--url https://v2.greipapi.com/score/email/{email} \
--header 'Authorization: Bearer <token>'import requests
url = "https://v2.greipapi.com/score/email/{email}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://v2.greipapi.com/score/email/{email}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://v2.greipapi.com/score/email/{email}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://v2.greipapi.com/score/email/{email}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://v2.greipapi.com/score/email/{email}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://v2.greipapi.com/score/email/{email}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body
{
"success": true,
"data": {
"is_valid": false,
"is_free": false,
"is_role_based": true,
"is_educational": false,
"is_disposable": false,
"is_blacklisted": false,
"email": "test@dangerous-domain.com",
"domain": {
"name": "dangerous-domain.com",
"is_dangerous": true,
"is_spf": false,
"is_dmarc": false,
"is_dkim": false,
"is_mx": false,
"is_bimi": false,
"created_at": "2025-02-05",
"is_new": true,
"domain_age_days": 45,
"has_website": true,
"mx_provider_class": "custom"
},
"custom_rules_applied": {
"total": 0,
"rules": []
},
"risk_level": "high",
"recommendation": "reject",
"reasons": [
"Email domain is considered dangerous."
],
"rules": [
{
"id": "EMAIL_DANGEROUS_DOMAIN",
"description": "Email domain is considered dangerous."
}
]
},
"execution_ms": 1
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
Risk Scoring
Email Scoring
This method provides an additional layer of validation for your system. While validating email syntax is important, it is not sufficient.
This method goes beyond syntax validation by checking the domain’s validity, the availability of the Mail Service, detecting Disposable Email (Temporary Emails), etc. By utilising this method, you can ensure a more thorough validation process for email addresses.
{
"success": true,
"data": {
"is_valid": false,
"is_free": false,
"is_role_based": true,
"is_educational": false,
"is_disposable": false,
"is_blacklisted": false,
"email": "test@dangerous-domain.com",
"domain": {
"name": "dangerous-domain.com",
"is_dangerous": true,
"is_spf": false,
"is_dmarc": false,
"is_dkim": false,
"is_mx": false,
"is_bimi": false,
"created_at": "2025-02-05",
"is_new": true,
"domain_age_days": 45,
"has_website": true,
"mx_provider_class": "custom"
},
"custom_rules_applied": {
"total": 0,
"rules": []
},
"risk_level": "high",
"recommendation": "reject",
"reasons": [
"Email domain is considered dangerous."
],
"rules": [
{
"id": "EMAIL_DANGEROUS_DOMAIN",
"description": "Email domain is considered dangerous."
}
]
},
"execution_ms": 1
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
GET
/
score
/
email
/
{email}
Email scoring
curl --request GET \
--url https://v2.greipapi.com/score/email/{email} \
--header 'Authorization: Bearer <token>'import requests
url = "https://v2.greipapi.com/score/email/{email}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://v2.greipapi.com/score/email/{email}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://v2.greipapi.com/score/email/{email}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://v2.greipapi.com/score/email/{email}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://v2.greipapi.com/score/email/{email}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://v2.greipapi.com/score/email/{email}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body
{
"success": true,
"data": {
"is_valid": false,
"is_free": false,
"is_role_based": true,
"is_educational": false,
"is_disposable": false,
"is_blacklisted": false,
"email": "test@dangerous-domain.com",
"domain": {
"name": "dangerous-domain.com",
"is_dangerous": true,
"is_spf": false,
"is_dmarc": false,
"is_dkim": false,
"is_mx": false,
"is_bimi": false,
"created_at": "2025-02-05",
"is_new": true,
"domain_age_days": 45,
"has_website": true,
"mx_provider_class": "custom"
},
"custom_rules_applied": {
"total": 0,
"rules": []
},
"risk_level": "high",
"recommendation": "reject",
"reasons": [
"Email domain is considered dangerous."
],
"rules": [
{
"id": "EMAIL_DANGEROUS_DOMAIN",
"description": "Email domain is considered dangerous."
}
]
},
"execution_ms": 1
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
Authentication
Include your API key in theAuthorization header:
Authorization: Bearer <api_key>
Path parameters
string
required
The email you want to validate.Expected values: an email addressSample value:
name@domain.comQuery parameters
string
default:"JSON"
The format command is used to get a response in a specific format.Expected values:
JSON, XML, CSV, or NewlineFor more information please refer to Response format.string
default:"live"
The mode command is used in the development stage to simulate the integration process before releasing it to the production environment.Expected values:
live, or test.For more information please refer to Development environment.string
Optional label for your own analytics or support correlation (for example a product or channel name).
string
The user_id command can be used to identify requests sent by specific users to monitor in the Events page.Expected values: email address, phone number, user id, name, etc.For more information please refer to User identifier.
Response properties
boolean
required
true when the request succeeded; false on error.object
required
Hide properties
Hide properties
string
required
The email address that was scored.
string
required
Overall risk band for the address (
low, medium, or high). Use this with recommendation and reasons for fraud decisions, not is_valid.string
required
Suggested action (
accept, review, or reject) derived from the risk assessment.array
required
Human-readable strings explaining elevated risk. Empty when risk is low. Populated when
risk_level is not low.array
required
Each object has
id and description. The array lists only signals that fired for this request (empty when risk is low).Show Rule ids
Show Rule ids
| Id | Description |
|---|---|
EMAIL_INVALID_STRUCTURE | Email address failed syntax validation. |
EMAIL_CUSTOM_BLACKLIST | Email address or domain is on your blocklist. |
EMAIL_DANGEROUS_DOMAIN | Email domain is considered dangerous. |
EMAIL_DISPOSABLE | Email address or domain is flagged as disposable or spam. |
DOMAIN_NO_MX | Domain has no usable MX records for receiving mail. |
DOMAIN_NEW | Domain registration is newer than one year. |
DOMAIN_NO_SPF | Domain does not publish a valid SPF record. |
DOMAIN_NO_DMARC | Domain does not publish a DMARC policy. |
boolean
required
Indicates whether the email address is from a free email service provider.
boolean
required
Indicates whether the email address is a role-based email address. Role-based email addresses are those that are associated with a particular role or group, such as
admin, support, info, etc.boolean
required
Indicates whether the email address is an educational email address.
boolean
required
Whether the address passes syntax and structure checks only. It does not indicate overall safety or fraud risk. Use
risk_level, recommendation, and reasons for risk outcomes.boolean
required
Indicates whether the email address is a disposable email address (also known as Temporary Email Addresses).
boolean
required
Indicates if the email/domain is blacklisted due to applying custom
rules or were found in one of your
blacklists.
object
The information associated with the domain name of the email address.
Hide properties
Hide properties
string
required
The full domain name associated with the email address (for example,
gmail.com).boolean|null
Indicates whether the domain is used for disposable or temporary email services.
boolean|null
Indicates whether the domain appears to be an email forwarding service.
boolean|null
required
Indicates whether the domain is flagged as dangerous or suspicious, which may suggest a higher risk of fraud or abuse.
If this property is set to
true, the domain is considered high-risk or potentially malicious. As a result, the isValid property will also be false, indicating that the email address should not be trusted for critical communications or user registrations. It is strongly recommended to block or flag such email addresses in your application workflow.boolean|null
required
Indicates whether the domain has a valid SPF (Sender Policy Framework) record, which helps prevent email spoofing.
boolean|null
required
Indicates whether the domain has a valid DMARC (Domain-based Message Authentication, Reporting, and Conformance) record, which helps protect against email phishing and spoofing.
boolean|null
required
Indicates whether the domain has a valid DKIM (DomainKeys Identified Mail) record, which verifies the authenticity of the sender’s domain.
boolean|null
required
Indicates whether the domain has valid MX (Mail Exchange) records, confirming that it is capable of receiving emails.
boolean|null
required
Indicates whether the domain has a valid BIMI (Brand Indicators for Message Identification) record, which allows brand logos to be displayed in supported email clients.
string|null
required
The date when the domain was first registered or created, if available.
boolean|null
required
Indicates whether the domain is new or recently registered (registered within 1 year), which may affect its reputation and trustworthiness.
integer|null
Days since domain registration when
created_at is known; otherwise null.boolean|null
Whether the domain resolves to a public host (DNS A/AAAA lookup).
null when lookup did not complete in time.string
Inferred mail host category when MX is present:
none, google_workspace, microsoft_365, yahoo, zoho, proton, or custom.object
The custom rules applied to this request, learn
more.
Hide properties
Hide properties
integer
required
The total number of custom rules applied to this request.
object
required
The custom rules applied to this request, learn
more.
integer
required
Time taken to process the request (milliseconds).
Was this page helpful?