Code examples

Copy-paste examples for the Email Verification API. Use the tabs to choose your language: cURL, Node.js, Python, Ruby on Rails, PHP (Laravel), .NET (C#), Go or Java. Your choice is remembered on every page.

Each example reads your key from the VERIFY_API_KEY environment variable. See Authentication and API keys to create one.

Verify one address#

The smallest possible request:

curl -X POST https://thenotifier.io/api/v1/verifications \
  -H "Authorization: Bearer $VERIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"someone@example.com"}'

Production-ready example#

This version is ready for real use. It:

# -i prints the response headers: X-RateLimit-Remaining, Retry-After, X-Request-Id ...
curl -i -X POST https://thenotifier.io/api/v1/verifications \
  -H "Authorization: Bearer $VERIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"someone@example.com"}'

# HTTP/2 200
# x-ratelimit-limit: 60
# x-ratelimit-remaining: 59
# x-request-id: req_3f9c...

Handling results#

status Suggested action
valid Accept the address.
invalid Reject it, or ask the person to correct it.
risky Accept with care. For a sign-up form, accepting is usually fine. For cold outreach, skip it.
unknown Accept for now. Re-checking within 30 days returns the same stored answer, so wait at least that long.

Tip

Set a request timeout (30 seconds is plenty) and log meta.request_id with every call. Support can find any request by its id.