Classify Endpoint
The classify endpoint analyzes an email address or domain and returns provider information and classification details.
Request
GET /v1/classify
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| email | string | Yes* | The email address to classify |
| domain | string | Yes* | The domain to classify |
*At least one of email or domain must be provided. If both are provided, the domain from the email takes precedence.
Examples
cURL
# Classify by email
curl -H "Authorization: Bearer sk_live_YOUR_KEY" \
"https://emailkind.com/v1/[email protected]"
# Classify by domain
curl -H "Authorization: Bearer sk_live_YOUR_KEY" \
"https://emailkind.com/v1/classify?domain=google.com"
JavaScript
const API_KEY = "sk_live_YOUR_KEY";
// Classify by email
const res = await fetch(
"https://emailkind.com/v1/[email protected]",
{ headers: { Authorization: `Bearer ${API_KEY}` } }
);
const data = await res.json();
if (data.classification.is_disposable) {
console.log("Blocked: disposable email");
} else if (data.classification.is_business) {
console.log("Business email from", data.provider.name);
}
Python
import requests
response = requests.get(
"https://emailkind.com/v1/classify",
params={"email": "[email protected]"},
headers={"Authorization": "Bearer sk_live_YOUR_KEY"}
)
data = response.json()
if data["classification"]["is_disposable"]:
print("Blocked: disposable email")
elif data["classification"]["is_business"]:
print(f"Business email from {data['provider']['name']}")
PHP
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://emailkind.com/v1/classify?" . http_build_query(["email" => "[email protected]"]),
CURLOPT_HTTPHEADER => ["Authorization: Bearer sk_live_YOUR_KEY"],
CURLOPT_RETURNTRANSFER => true,
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
if ($result["classification"]["is_disposable"]) {
echo "Blocked: disposable email";
}
Go
package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://emailkind.com/v1/[email protected]", nil)
req.Header.Set("Authorization", "Bearer sk_live_YOUR_KEY")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result)
}
Ruby
require "net/http"
require "json"
uri = URI("https://emailkind.com/v1/[email protected]")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer sk_live_YOUR_KEY"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)
if data["classification"]["is_disposable"]
puts "Blocked: disposable email"
elsif data["classification"]["is_business"]
puts "Business email from #{data["provider"]["name"]}"
end
Response
{
"success": true,
"request_id": "req_abc123",
"email": "[email protected]",
"domain": "gmail.com",
"provider": {
"id": "gmail",
"name": "Gmail",
"type": "personal"
},
"classification": {
"is_business": false,
"is_free": true,
"is_disposable": false,
"is_education": false,
"is_custom_domain": false
},
"mx": [
"gmail-smtp-in.l.google.com",
"alt1.gmail-smtp-in.l.google.com"
],
"confidence": 0.98,
"cached": true
}
Response fields
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the request succeeded |
| request_id | string | Unique request identifier for support |
| email | string | The submitted email (empty if domain-only request) |
| domain | string | The domain that was analyzed |
| provider.id | string | Unique provider identifier (e.g. google_workspace, gmail, microsoft_365) |
| provider.name | string | Human-readable provider name |
| provider.type | string | One of: business, personal, disposable, hosting, education, isp, self_hosted, unknown |
| classification.is_business | boolean | True if the email is a business/work email |
| classification.is_free | boolean | True if using a free email provider |
| classification.is_disposable | boolean | True if using a disposable/temporary email service |
| classification.is_education | boolean | True if the domain belongs to an educational institution |
| classification.is_custom_domain | boolean | True if using a custom domain with a known provider |
| mx | string[] | MX records found for the domain |
| confidence | number | Confidence score from 0.0 to 1.0 |
| cached | boolean | Whether the DNS result came from cache |
Provider types
| Type | Description | Examples |
|---|---|---|
| business | Business email provider | Google Workspace, Microsoft 365, Zoho |
| personal | Free personal email | Gmail, Outlook.com, Yahoo Mail |
| disposable | Temporary/throwaway email | Guerrilla Mail, Mailinator |
| hosting | Hosting provider email | GoDaddy, OVH, Namecheap |
| education | Educational institution | University email systems |
| isp | Internet service provider email | Comcast, AT&T, Vodafone |
| self_hosted | Self-hosted mail server | Custom MX records pointing to own domain |
| unknown | Cannot be determined | No MX records or unrecognized provider |
Classification examples
| Email | Provider | is_business | is_free | is_disposable | is_education |
|---|---|---|---|---|---|
| [email protected] | Google Workspace | true | false | false | false |
| [email protected] | Gmail | false | true | false | false |
| [email protected] | Disposable | false | false | true | false |
| [email protected] | Microsoft 365 | true | false | false | true |
| [email protected] | Yahoo Mail | false | true | false | false |
| [email protected] | Cloudflare Email Routing | true | false | false | false |
Headers
The response includes the following headers:
| Header | Description |
|---|---|
| X-Request-ID | Unique request identifier |
| X-Cache | HIT if the DNS result was cached, MISS otherwise |
| X-Response-Time | Time taken to process the request |
| X-RateLimit-Limit | Your plan's rate limit per minute |
| X-RateLimit-Remaining | Remaining requests in the current window |
| X-RateLimit-Reset | Unix timestamp when the rate limit resets |