The Check API is a signup firewall. Call it from your server when someone signs up (or changes their email) and it returns one verdict — allow, review or block — with the reasons behind it. It catches:
- Disposable addresses — the domain is on Piisend’s disposable blocklist, or its MX hosts belong to known throwaway-mail infrastructure.
- Forwarded / masked addresses — relay services such as SimpleLogin or addy.io.
- Typos —
jane@gmial.comcomes back withdid_you_mean: "jane@gmail.com". - Spammy or dead domains — phishing or spam-listed domains, domains with no MX records, and domains registered less than 30 days ago.
- Repeat bad actors — your own block/allow rules (by email, domain or mail server) are applied to every check, and every check is logged for 30 days so you can see who keeps coming back.
Base URL: https://api.piisend.com/api/v1. Call it server-side only — never ship your API key to a browser or mobile app.
Quickstart
- Create an API key in the dashboard under API → Keys. Keys created with the default scopes include
check:readandcheck:write. If you pick scopes yourself, includecheck:read(orcheck:write, which implies it). - Store it as
PIISEND_API_KEYon your server. - Call
GET /check/email/{email}. URL-encode the address: a literal+must reach the API as+or%2B(path parameters are not form-decoded, so an unencoded+sent by some clients as a space will fail).
1curl -s "https://api.piisend.com/api/v1/check/email/jane.doe%2Bnews@gmail.com" \2 -H "Authorization: Bearer $PIISEND_API_KEY"1// Node 18+ (server only)2const email = "jane.doe+news@gmail.com";3const res = await fetch(4 `https://api.piisend.com/api/v1/check/email/${encodeURIComponent(email)}`,5 { headers: { Authorization: `Bearer ${process.env.PIISEND_API_KEY}` } },6);7if (!res.ok) throw new Error(`Check failed: ${res.status}`);8const check = await res.json();9console.log(check.recommendation, check.reasons, res.headers.get("X-Checks-Remaining"));1import os2from urllib.parse import quote3 4import requests5 6email = "jane.doe+news@gmail.com"7r = requests.get(8 f"https://api.piisend.com/api/v1/check/email/{quote(email, safe='@')}",9 headers={"Authorization": f"Bearer {os.environ['PIISEND_API_KEY']}"},10 timeout=5,11)12r.raise_for_status()13check = r.json()14print(check["recommendation"], check["reasons"], r.headers.get("X-Checks-Remaining"))Example response (values illustrative):
1{2 "email": "jane.doe+news@gmail.com",3 "normalized_email": "janedoe@gmail.com",4 "domain": "gmail.com",5 "disposable": false,6 "disposable_reason": null,7 "disposable_provider": null,8 "public_domain": true,9 "relay_domain": false,10 "spam": false,11 "phishing": false,12 "mx": true,13 "mx_records": [14 { "priority": 5, "host": "gmail-smtp-in.l.google.com" },15 { "priority": 10, "host": "alt1.gmail-smtp-in.l.google.com" }16 ],17 "spf": true,18 "dmarc": true,19 "domain_age_in_days": 11431,20 "domain_created_at": "1995-08-13T04:00:00Z",21 "did_you_mean": null,22 "recommendation": "allow",23 "reasons": [],24 "account_rule": null,25 "role_account": false,26 "alias": true27}A disposable address for comparison:
1{2 "email": "test@mailinator.com",3 "disposable": true,4 "disposable_reason": "blocklist",5 "recommendation": "block",6 "reasons": ["disposable"],7 "...": "other fields omitted"8}Domain check
GET /check/domain/{domain} runs the same domain signals without a mailbox. Use it when you only have a domain (for example, an SSO or company-domain field).
1curl -s "https://api.piisend.com/api/v1/check/domain/mailinator.com" \2 -H "Authorization: Bearer $PIISEND_API_KEY"3 4# Skip the MX lookup5curl -s "https://api.piisend.com/api/v1/check/domain/example.com?include_mx=false" \6 -H "Authorization: Bearer $PIISEND_API_KEY"| Query parameter | Type | Default | Meaning |
|---|---|---|---|
include_mx | boolean | true | When false, MX records are not looked up: mx is null, mx_records is [], the no_mx reason can’t fire, disposable detection uses the blocklist only (no MX-infrastructure match), and mx_host account rules can’t match. |
If you pass something that looks like an email address to the domain endpoint, only its domain part is checked. Email checks always look up MX.
Response reference
Both endpoints return the same domain fields. Email checks add email, normalized_email, role_account and alias. Fields not listed here are never returned.
| Field | Type | Endpoint | Meaning |
|---|---|---|---|
email | string | The checked address, lowercased, with the domain converted to ASCII (punycode for internationalized domains). | |
normalized_email | string | Lowercased address with any +tag removed; for gmail.com and googlemail.com, dots in the local part are also removed. Use it to spot the same person signing up repeatedly. | |
domain | string | both | The checked domain, lowercased ASCII. |
disposable | boolean | both | true when the domain is a disposable / temporary-mail domain. |
disposable_reason | string or null | both | "blocklist" (domain is on Piisend’s disposable blocklist), "mx_infra" (the domain’s MX hosts match known disposable-mail infrastructure), or null. |
disposable_provider | string or null | both | Name of the matched disposable provider for mx_infra matches; otherwise null. |
public_domain | boolean | both | true for free public mailbox providers (Gmail, Outlook, Yahoo, …). Informational — does not affect the verdict. |
relay_domain | boolean | both | true for email forwarding / masked-alias services (SimpleLogin, addy.io, …). |
spam | boolean | both | true when the domain is on the phishing list or listed on the Spamhaus DBL (DBL lookups only run when enabled on Piisend’s side). Always true when phishing is true. |
phishing | boolean | both | true when the domain is on Piisend’s phishing domain list. |
mx | boolean or null | both | true if the domain has MX records, false only on a definitive “no MX records” answer, null when MX wasn’t checked (include_mx=false) or the DNS lookup failed transiently. |
mx_records | array of { priority, host } | both | MX records found (priority integer or null, host string). [] when mx is null or false. |
spf | boolean or null | both | true if the domain publishes an SPF record, false if not, null if the lookup failed. Informational. |
dmarc | boolean or null | both | true if _dmarc.<domain> publishes a DMARC record, false if not, null if the lookup failed. Informational. |
domain_age_in_days | integer or null | both | Days since the domain was registered (from RDAP), or null if unknown. |
domain_created_at | string or null | both | Registration timestamp, ISO 8601 UTC (e.g. "1995-08-13T04:00:00Z"), or null. |
did_you_mean | string or null | both | Suggested correction for a likely typo of a popular mailbox domain. The corrected email on email checks, the corrected domain on domain checks. null when there is no suggestion. |
recommendation | string | both | "allow", "review" or "block". See Verdict logic. |
reasons | array of strings | both | Machine-readable reasons behind the verdict. See Reasons. [] on a plain allow. |
account_rule | object or null | both | The account rule that overrode the verdict: { "action": "block" or "allow", "type": "email", "domain" or "mx_host", "value": "..." }. null when no rule matched. See Account rules. |
role_account | boolean | true for role mailboxes such as info@ or support@ (a +tag is ignored). Informational. | |
alias | boolean | true when the local part contains a +tag sub-address. Informational. |
Lookups that fail (DNS, RDAP, blocklists) never fail the request: the affected field comes back null (or false for list lookups) and the check still counts as one credit.
Verdict logic
The verdict is computed from the signals in this order:
- Block reasons are collected:
disposable(whendisposableistrue),spam(whenspamistrue),phishing(whenphishingistrue),no_mx(only whenmxis exactlyfalse). - Review reasons are collected:
relay(whenrelay_domainistrue),new_domain(whendomain_age_in_daysis known and less than 30),possible_typo(whendid_you_meanis set). - If there is at least one block reason →
recommendation: "block", andreasonslists the block reasons followed by any review reasons. - Otherwise, if there is at least one review reason →
"review"with the review reasons. - Otherwise →
"allow"withreasons: []. - Account rules are applied last and override all of the above (see Account rules).
Signals that never change the verdict on their own: public_domain, role_account, alias, spf, dmarc, and mx: null. Use them for your own scoring if you want.
Reasons
Reasons appear in this fixed order: block reasons, then review reasons. An account rule reason is always first.
| Reason | Verdict | Produced when |
|---|---|---|
disposable | block | The domain is on the disposable blocklist (disposable_reason: "blocklist") or its MX hosts match disposable infrastructure ("mx_infra"). |
spam | block | The domain is on the phishing list or listed on the Spamhaus DBL. |
phishing | block | The domain is on the phishing list (so spam is always present too). |
no_mx | block | DNS definitively returned no MX records (mx: false). A failed or skipped lookup does not produce this. |
relay | review | relay_domain is true (forwarding / masked-alias service). |
new_domain | review | The domain was registered less than 30 days ago (domain_age_in_days < 30). |
possible_typo | review | did_you_mean has a suggestion. |
account_block | block | One of your block rules matched. |
account_allow | allow | One of your allow rules matched. The platform reasons stay in the list after it, so you can still see why it would have been blocked. |
Example: a typo’d address on a brand-new domain returns "review" with ["new_domain", "possible_typo"]. An allowlisted disposable domain returns "allow" with ["account_allow", "disposable"].
Errors and headers
Error bodies are JSON with a detail string, e.g. {"detail": "Enter a valid email address."}.
| Status | When | Charged? |
|---|---|---|
200 | Check completed. | Yes, 1 credit |
400 | Invalid email or domain (empty, too long — 320 characters for an email, 253 for a domain — bad syntax, or no valid TLD). | No |
401 | Missing or invalid API key. | No |
402 | Monthly check quota exhausted ("Monthly check quota exceeded"). Response includes X-Checks-Remaining: 0 and X-Checks-Limit. | No |
403 | The key lacks the scope: "Missing API key scope: check:read". | No |
429 | Rate limit exceeded ("Rate limit exceeded"). Respect the Retry-After header (seconds). | No |
503 | The Check API is disabled ("Check API is temporarily unavailable."). | No |
Every successful check returns:
| Header | Meaning |
|---|---|
X-Checks-Limit | Your monthly check quota. |
X-Checks-Remaining | Credits left this month after this check. |
Quotas and rate limits
- One credit per successful check (
200) on either endpoint. Validation errors, quota errors, rate-limited and auth-failed requests are not charged. Upstream lookup failures inside a check are still charged, because the check itself completes. - Free plan: 1,000 checks per month. Pro includes a higher check quota — see pricing. Your exact limit is in the
X-Checks-Limitheader and inchecks_quotafromGET /billing/usage(which also returnschecks_usedandchecks_remaining). - Check credits are separate from your email send quota and reset each calendar month (UTC).
- Rate limit:
GET /check/emailandGET /check/domaindefault to 120 requests per minute per API key.
Account rules
Rules let you block or allow specific emails, domains or mail servers for your account. They are applied to every check your account makes and override the platform verdict.
type | value | Matches |
|---|---|---|
email | jane@example.com | The exact address — compared against both the checked email and its normalized_email. Store the normalized form (janedoe@gmail.com) to also catch +tag and Gmail-dot variants. |
domain | example.com | The domain and all its subdomains (example.com, mail.example.com). |
mx_host | mx.example.net | Any domain whose MX host is this host or a subdomain of it, matched on label boundaries (spoilmail.com covers mx.spoilmail.com, not notspoilmail.com). Useful for blocking a temp-mail service that rotates through many domains on the same mail server. Requires MX data, so it never matches domain checks run with include_mx=false. |
Precedence:
- Allow beats block. If an allow rule and a block rule both match, the result is
allow— this is how you carve exceptions out of a broad block (block an MX host, allow one partner domain on it). - Within the same action, the most specific match is reported:
emailbeforedomainbeforemx_host. - On a match,
recommendationbecomes the rule’s action,account_ruledescribes the rule, andaccount_block/account_allowis put first inreasons. - If rules can’t be loaded, the check fails open: the platform verdict stands and
account_ruleisnull. - New and deleted rules take effect immediately on the server instance that handled the write and within 30 seconds everywhere else.
Create a rule
POST /check/rules — requires check:write. Dashboard users need the owner or admin workspace role.
1# Block a repeat abuser's domain2curl -s -X POST "https://api.piisend.com/api/v1/check/rules" \3 -H "Authorization: Bearer $PIISEND_API_KEY" \4 -H "Content-Type: application/json" \5 -d '{"action": "block", "type": "domain", "value": "spam-signups.example", "note": "200 fake signups in March"}'6 7# Block a temp-mail service by its mail server8curl -s -X POST "https://api.piisend.com/api/v1/check/rules" \9 -H "Authorization: Bearer $PIISEND_API_KEY" \10 -H "Content-Type: application/json" \11 -d '{"action": "block", "type": "mx_host", "value": "mx.tempmail.example"}'12 13# Always allow your QA inbox14curl -s -X POST "https://api.piisend.com/api/v1/check/rules" \15 -H "Authorization: Bearer $PIISEND_API_KEY" \16 -H "Content-Type: application/json" \17 -d '{"action": "allow", "type": "email", "value": "qa@yourcompany.com"}'| Body field | Required | Notes |
|---|---|---|
action | yes | "block" or "allow". |
type | yes | "email", "domain" or "mx_host". |
value | yes | Lowercased and converted to ASCII. A leading @ or *. on domain / MX values is stripped. Must be a valid email or hostname with at least one dot. |
note | no | Free text, up to 500 characters. |
Returns 201 with the rule: { "id", "action", "type", "value", "note", "created_at", "created_by" }. Errors: 400 for an invalid action, type, value or note, or when the account already has 5,000 rules; 409 when a rule with the same type and value already exists (regardless of action — delete it first to flip block to allow).
List and delete rules
1# List (filters optional)2curl -s "https://api.piisend.com/api/v1/check/rules?action=block&type=domain&limit=50" \3 -H "Authorization: Bearer $PIISEND_API_KEY"4 5# Delete6curl -s -X DELETE "https://api.piisend.com/api/v1/check/rules/RULE_ID" \7 -H "Authorization: Bearer $PIISEND_API_KEY"GET /check/rules(scopecheck:read) — query paramsaction,type,limit(1–50, default 25),offset,page(1-based; used whenoffsetis 0). Returns{ "items": [...], "total", "limit", "offset", "has_more" }, newest first.DELETE /check/rules/{id}(scopecheck:write) — returns{"message": "Rule deleted"}, or404if the rule doesn’t exist in your account.
Logs and stats
Every successful check is logged for your account and kept for 30 days. Logging runs after the response is sent and never fails a check.
GET /check/logs
Scope check:read. Newest first.
| Query parameter | Meaning |
|---|---|
recommendation | allow, review or block. |
kind | email or domain. |
q | Prefix match on the checked email or domain (case-insensitive). |
since | Only checks at or after this ISO 8601 timestamp. |
limit, offset, page | Pagination, same as rules (max 50 per page). |
1# Blocked checks for addresses starting with "jane"2curl -s "https://api.piisend.com/api/v1/check/logs?recommendation=block&q=jane&limit=50" \3 -H "Authorization: Bearer $PIISEND_API_KEY"Each item: id, kind, query (the checked value, lowercased), domain, recommendation, reasons, disposable, relay_domain, spam, account_rule, api_key_id (the key that made the check; null for dashboard checks), client_ip_hash, created_at. client_ip_hash is a salted SHA-256 hash of the IP address that called the API — the raw IP is never stored. When you call from your server, that is your server’s IP, not the end user’s.
GET /check/stats
Scope check:read. Query param days (1–365, default 30; logs older than 30 days have already expired). Example response (values illustrative):
1{2 "days": 30,3 "since": "2026-10-30T12:00:00",4 "total": 1840,5 "by_recommendation": { "allow": 1702, "review": 61, "block": 77 },6 "by_reason": { "disposable": 58, "possible_typo": 40, "relay": 21, "no_mx": 12 },7 "top_blocked_domains": [{ "domain": "mailinator.com", "count": 19 }]8}top_blocked_domains returns up to 10 domains. Use it with POST /check/rules to turn a recurring offender into a permanent block (for example by its mx_host).
Recommended signup integration
Handle each verdict differently instead of treating everything that isn’t allow as an error:
| Verdict | What to do |
|---|---|
block | Reject the signup with a neutral message: “Please use a permanent email address.” Don’t echo the internal reason. |
review with possible_typo | Ask the user to confirm: “Did you mean did_you_mean?” Let them accept the suggestion or keep what they typed. |
review (other reasons) | Either ask for another email, or allow and flag the account (e.g. require email verification before trial credits, add to a manual-review queue). relay users are usually real people protecting their inbox. |
allow | Continue. Store normalized_email if you want to detect duplicate accounts. |
Fail open. The check does live DNS and registry lookups, so give it a timeout and allow the signup if Piisend times out, returns 5xx, 429 or 402. Only 400 should be shown to the user (as an invalid-email error).
1// Next.js Route Handler / Express / any Node 18+ server code2export async function checkSignupEmail(email) {3 try {4 const res = await fetch(5 `https://api.piisend.com/api/v1/check/email/${encodeURIComponent(email)}`,6 {7 headers: { Authorization: `Bearer ${process.env.PIISEND_API_KEY}` },8 signal: AbortSignal.timeout(3000), // your choice of timeout9 },10 );11 if (res.status === 400) return { ok: false, message: "Enter a valid email address." };12 if (!res.ok) return { ok: true, flagged: true }; // fail open on 402/429/5xx13 14 const check = await res.json();15 if (check.recommendation === "block") {16 return { ok: false, message: "Please use a permanent email address." };17 }18 if (check.reasons.includes("possible_typo")) {19 return { ok: false, suggestion: check.did_you_mean };20 }21 return { ok: true, flagged: check.recommendation === "review", check };22 } catch {23 return { ok: true, flagged: true }; // timeout or network error: fail open24 }25}1import os2from urllib.parse import quote3 4import requests5 6 7def check_signup_email(email: str) -> dict:8 try:9 r = requests.get(10 f"https://api.piisend.com/api/v1/check/email/{quote(email, safe='@')}",11 headers={"Authorization": f"Bearer {os.environ['PIISEND_API_KEY']}"},12 timeout=3, # your choice of timeout13 )14 except requests.RequestException:15 return {"ok": True, "flagged": True} # fail open16 if r.status_code == 400:17 return {"ok": False, "message": "Enter a valid email address."}18 if not r.ok:19 return {"ok": True, "flagged": True} # 402/429/5xx: fail open20 check = r.json()21 if check["recommendation"] == "block":22 return {"ok": False, "message": "Please use a permanent email address."}23 if "possible_typo" in check["reasons"]:24 return {"ok": False, "suggestion": check["did_you_mean"]}25 return {"ok": True, "flagged": check["recommendation"] == "review", "check": check}Piisend also rejects disposable recipients on POST /emails by default (see Sending), so a disposable address that slips through signup still can’t receive your verification email.
Migrating from POST /intelligence/*
The older Intelligence routes still work, but they now follow the same access and billing rules as the Check API:
POST /intelligence/email,/disposable-email,/email-provider,/role-email,/mx-records,/dns-auth,/spam-domain— JSON body ({"email": ...}or{"domain": ...}). They require thecheck:readscope (403without it) and use one check credit per successful call (invalid input returns400and is not charged;402when the month's credits are used up;X-Checks-*headers are set). No account rules, no logs, rate limit 60 requests per minute per key by default. They return{ "input", "signals": {...}, "summary" }with no verdict — switch toGET /check/emailto get the verdict, account rules and logging for the same credit.POST /intelligence/fullwith{"email": "..."}is the POST equivalent ofGET /check/email/{email}: same response, samecheck:readscope, same metering, account rules and logging. It uses the Intelligence rate limit (60/minute by default) and returns503if either the Intelligence API or the Check API is disabled. Use it if you’d rather not put email addresses in URL paths (and your access logs).
Field mapping from POST /intelligence/email to GET /check/email:
Old (signals.*) | New |
|---|---|
disposable | disposable (plus disposable_reason, disposable_provider) |
public_domain | public_domain |
role_account | role_account |
subaddress | alias |
domain | domain |
summary (text) | recommendation + reasons (machine-readable) |
If your code did if (signals.disposable) reject(), switch to if (check.recommendation === "block") reject() — that also covers spam, phishing and no-MX domains, plus your own block rules. Make sure the key has check:read, and budget for one check credit per call.