Email Toolkit

Go beyond regex: validate email addresses with live MX and SMTP probes, detect disposable and role accounts, identify providers, parse raw email headers, score content for spam signals, and build or parse mailto: URIs.

Base URL

https://email.toolkitapi.io/v1/

Endpoints

Validation

Method Endpoint Description
GET /v1/email/validate Full validation — syntax, MX, SMTP, disposable, free, role
POST /v1/email/validate-batch Validate up to 50 addresses in one request

Intelligence

Method Endpoint Description
GET /v1/email/catch-all Detect whether a domain accepts all addresses (catch-all)
GET /v1/email/role-check Identify role/group accounts (admin@, support@, noreply@…)
GET /v1/email/normalize Normalize Gmail dots, plus-aliases, and domain casing
GET /v1/email/provider Identify the email provider from MX records

Header Analysis

Method Endpoint Description
POST /v1/email/headers Parse raw email headers — routing hops, auth results, spoofing risk
POST /v1/email/spam-score Score email subject + body for spam signals (0–10 heuristic)

Spam Detection

Method Endpoint Description
POST /v1/email/form-spam-score Score a contact form submission for bot/spam likelihood (0–1)

Utilities

Method Endpoint Description
GET /v1/email/gravatar Get the Gravatar image URL and MD5 hash for an email
POST /v1/email/mailto Build or parse RFC 6068 mailto: URIs

Quick Example

from toolkitapi import Email

with Email(api_key="tk_...") as email:
    result = email.validate("[email protected]")
    print(result["deliverability"])   # "deliverable"
    print(result["is_disposable"])    # False
    print(result["is_role_account"])  # False
    print(result["mx_found"])         # True

Deliverability Values

The validate and validate-batch endpoints return a deliverability field:

Value Meaning
deliverable SMTP confirmed the mailbox exists
undeliverable SMTP rejected the address or no MX records found
risky Disposable address, role account, or inconclusive SMTP probe
unknown Could not connect to the mail server

Python SDK

Install the SDK:

pip install toolkitapi

All SDK methods use the context manager pattern:

from toolkitapi import Email

with Email(api_key="tk_...") as email:
    # validate a single address
    r = email.validate("[email protected]")

    # batch validate
    r = email.validate_batch(["[email protected]", "[email protected]"])

    # intelligence checks
    r = email.catch_all("toolkitapi.io")
    r = email.role_check("[email protected]")
    r = email.normalize("[email protected]")
    r = email.provider("outlook.com")

    # header analysis
    r = email.parse_headers(raw_headers_string)
    r = email.spam_score(subject="Win a prize!", body="Click here now...")

    # utilities
    r = email.gravatar("[email protected]", size=80)
    r = email.mailto_build(to=["[email protected]"], subject="Hello")
    r = email.mailto_parse("mailto:[email protected]?subject=Hello")