Docs

Verify emails from Node.js

A working helper that verifies one address from Node.js. ValidReach does not publish an official SDK for this language. The examples call the REST API directly, which is the supported way to integrate.

Before you start

Create an API key under Settings → API keys and keep it in an environment variable named VALIDREACH_API_KEY on your server. Never ship it in browser or mobile code.

Verify one address

async function verify(email) {
  const res = await fetch('https://validreach.dev/api/v1/verify/single', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${process.env.VALIDREACH_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ email }),
  });
  if (res.status === 402) throw new Error('Out of credits');
  if (res.status === 429) throw new Error('Rate limited');
  const body = await res.json();
  if (!body.success) throw new Error(body.message ?? 'Request failed');
  return body.data;
}

Handle the result

Branch on data.status. Treat invalid and disposable as rejections, retry unknown later when retryable is true (unknown is not billed), and decide on catchall, risky and role by your own policy. HTTP 402 means out of credits and 429 means rate limited.