Skip to content

Authentication

The VerifyEmail API uses API keys to authenticate requests. Pass your secret key as a Bearer token in the Authorization header.

Authorization: Bearer sk_your_api_key

Call GET /v1/me to check a key before you use it. It costs no credits and doesn’t count against the rate limit. A 200 returns the account email, plan, credit balance and the key’s own name. A 401 means the key is wrong or has been revoked.

Terminal window
curl https://api.tryverifyemail.com/v1/me \
-H "Authorization: Bearer sk_your_api_key"
{
"email": "jane@acme.com",
"plan": "growth",
"credits_available": 1240,
"api_key": { "id": "3f2a9c1e-7b4d-4e8a-9f60-2c1d8e5b7a90", "label": "Zapier", "mode": "live" }
}

Keys are managed from API Keys in the dashboard. Give the key a name you’ll recognise later — one key per service means you can rotate that service’s key without touching anything else.

Revoking takes effect immediately — the next request made with that key gets a 401.

Key Prefix Where it’s used Exposable?
Live secret key sk_ Real verifications, billed in credits No — keep it secret
Test secret key sk_test_ Building and testing an integration, free No — keep it secret

A test key (sk_test_…) is a sandbox for building your integration. Choose Test Key when you create a key in the dashboard.

  • No real check, no credits. A test key never contacts a mail server and never touches your balance. It works even when your balance is 0.
  • The result rotates on every call. POST /v1/email-verifications answers 200 completed straight away. The verdict cycles through deliverable → undeliverable → risky → unknown and then starts again, so your code meets every verdict it has to handle. The sub_status, scores and signals also change from one lap to the next: a risky result might be catch_all, disposable or role_based, and an undeliverable one mailbox_not_found or no_mail_domain. Each key keeps its own place in the rotation.
  • Same shape as a live result, plus "test_mode": true at the top level. The email you sent is echoed back, and an invalid address returns the usual invalid_syntax result without moving the rotation on.
  • Ids start with sbx_. Results are not stored. They don’t appear in your history or API usage, and GET /v1/email-verifications/sbx_… returns 404 with {"error": "sandbox_result_not_stored"}.
  • Single checks only. Bulk endpoints answer a test key with 403 and {"error": "test_keys_not_supported_for_bulk"}.
  • Idempotency-Key and ?timeout= are ignored.
{
"id": "sbx_6f0c2a9d1e4b4c7a9b3e5d8f2a1c0e7b",
"status": "completed",
"test_mode": true,
"result": {
"email": "jane@example.com",
"normalized_email": "jane@example.com",
"verdict": "risky",
"sub_status": "catch_all",
"quality_score": 55,
"confidence": 90,
"provider": "self_hosted",
"primary_mx": "mx.sandbox.tryverifyemail.com",
"signals": {
"syntax": "pass",
"domain": "pass",
"mx": "pass",
"smtp": "pass",
"catch_all": "warn",
"role_account": "pass",
"disposable": "pass",
"dnsbl": "pass",
"toxic": "pass",
"greylisting": "pass"
},
"verified_at": "2026-11-18T06:35:01.000Z"
}
}

Switch to a live key (sk_…) when you are ready to verify real addresses.

A live secret key acts for your account across the whole API — single verification, bulk jobs, and DMARC monitoring all accept the same key. A test key returns simulated single verifications and is refused by bulk jobs.

One thing it cannot do is manage keys. Creating and revoking keys requires signing in to the dashboard, so an attacker holding a leaked key cannot issue themselves a replacement before you turn the original off.

  • Never ship a secret key in client-side code, a mobile app, or a public repo.
  • Store keys in environment variables or a secrets manager.
  • Use separate keys per environment (e.g. test vs. production) and per service, so you can rotate or revoke independently.
  • Rotate immediately if a key is exposed — create a new key, deploy it, then revoke the old one.
Status Meaning
401 The key is missing, malformed, revoked, or not a key we issued.

A request that sends Authorization: Bearer sk_… is always authenticated as that key. If the key is invalid we return 401 rather than falling back to any session cookie that happened to ride along, so a broken key never silently acts as somebody else.