Email and phone checks
Validate an email address or phone number at sign-up: syntax, mail servers, disposable domains and line type.
Check a contact detail at sign-up, before you send a verification code or accept a listing.
Email validation#
curl -sS -X POST 'https://api.trustverify.co.uk/api/v1/email/check' \
-H "Authorization: Bearer $TRUSTVERIFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "jane.doe@example.com"
}'- We check the syntax, the domain's mail servers (MX, with an A-record fallback), disposable domains and role addresses such as
info@. verdictisdeliverable,undeliverable,riskyordisposable, with ariskScore,riskLevelandflags.mxSource: dns_unavailablemeans we could not look the domain up. Treat it as unknown, not as undeliverable.- With a test key the result is a fixed sandbox answer. A disposable domain such as
mailinator.comreturnsdisposable.
Phone validation#
curl -sS -X POST 'https://api.trustverify.co.uk/api/v1/phone/check' \
-H "Authorization: Bearer $TRUSTVERIFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "+447700900123"
}'- We normalise the number to E.164 and return the country,
lineType, flags for freephone and premium-rate numbers, and a risk score. carrieris the network the number range was given to. It is not a live carrier lookup, and it does not follow ported numbers (carrierLookupis alwaysfalse).
The examples use reserved test addresses and an Ofcom drama number. Reference: POST /api/v1/email/check and POST /api/v1/phone/check.