Integrations · Data and spreadsheets

Check email addresses in Hightouch syncs

A small relay that Hightouch's HTTP Request destination calls. A Hightouch sync sends each row of a model (an id and an email address) to the relay; the relay checks the address with our API and answers so that Hightouch marks a row with a bad address as rejected in the sync run, with our status and reason as the error message. You pick which statuses are rejected: by default invalid and disposable.

The relay is a Cloudflare Worker that you deploy in your own Cloudflare account, with no dependencies. It is not a listed Hightouch destination: it uses the HTTP Request destination that Hightouch documents for any HTTP API, and it was built from Hightouch's public documentation and has not run in a real Hightouch workspace yet. Download email-validation-hightouch.zip: it unpacks into a folder email-validation-hightouch holding the relay's source (src/) and LICENSE (MIT).

What the result is good for

A Hightouch sync goes to one destination, so a row the validation sync rejects can still reach your email or ads tool through that tool's own sync. You can:

  • See it in Hightouch: each rejected row is on the run's Rejected tab, and the live debugger shows the relay's answer, such as email-validation.org: invalid (no_mailbox), suggested action remove.
  • Gate another sync with it: where Hightouch writes Warehouse Sync Logs to your warehouse, the model of your email tool's sync can keep only the rows whose latest status in the validation sync is succeeded.
  • Send the results to a URL of yours (RESULTS_URL): each request's results as signed JSON.

Hightouch does not read per-row data back from the answer, so the status cannot become a column in your warehouse through Hightouch. If your data is in Snowflake or BigQuery, check the addresses there instead with our Snowflake or BigQuery functions: every Hightouch model can then filter on the status, and the relay is not needed.

What you need

  • A computer with Node 22.18 or later for Cloudflare's wrangler command, which deploys the relay from its source folder. There is no browser-only option for this relay yet.
  • An API key from the API keys page with the permission Validate addresses and a daily credit cap.
  • A Cloudflare account and its wrangler command, and a shared secret of at least 32 characters (for example from openssl rand -hex 32).
  • The Workers Paid plan once rejected rows outrun the Free plan's daily Workers KV limits (1,000 writes and 100,000 reads a day): the relay's cache uses Workers KV, and Hightouch sends every rejected row again on every run.

Deploy the relay

Unpack the download, create a KV namespace, and put a wrangler.jsonc next to src/:

cd email-validation-hightouch
npx wrangler kv namespace create ev-hightouch-cache      # prints the namespace id
{
  "name": "ev-hightouch-relay",
  "main": "src/relay.ts",
  "compatibility_date": "2026-10-01",
  "kv_namespaces": [{ "binding": "CACHE", "id": "<the id wrangler printed>" }]
}
npx wrangler deploy
npx wrangler secret put EV_API_KEY --name ev-hightouch-relay         # your API key
npx wrangler secret put HIGHTOUCH_SECRET --name ev-hightouch-relay   # the shared secret

Other settings go in wrangler.jsonc as vars:

SettingDefaultWhat it does
REJECTinvalid,disposableStatuses answered 422 (rejected), separated by commas, or none
ON_ERRORopenWhat a row that could not be checked gets: open passes it, closed fails it so Hightouch tries again
EV_REGIONuseu to have addresses checked on our EU host
EMAIL_FIELD, ID_FIELDemail, idThe body fields holding the address and the row's id
CACHE_DAYS30Days a result stays in the cache
CONCURRENCY5Checks in flight at once within one batch
RESULTS_URL, RESULTS_SECRETAn https URL of yours that receives each request's results, and the secret that signs them

A wrong or missing setting is answered 500 with a message naming it, never its value, so the sync shows the problem.

Set up Hightouch

  1. Add destination → HTTP Request. Base URL: https://ev-hightouch-relay.<your-subdomain>.workers.dev. HTTP headers: key X-EV-Relay-Secret, value your shared secret, with Secret ticked. Your API key is never typed into Hightouch.
  2. A model with only the primary key and the address, such as SELECT customer_id, email FROM customers WHERE email IS NOT NULL, with its first column as the primary key.
  3. A sync to the destination: triggers Rows added and Rows changed; one row per request (Hightouch's default, needed for rejecting); POST to /validate; payload type JSON, Use multiple columns from model with id ← customer_id and email ← email.
  4. Rate limiting: our API allows 20 checks a second and 100 in flight until your account has made a purchase, and 500 a second after one. Keep Hightouch's requests per second under yours.

Try it with a model row whose address is no_mailbox@sandbox.email-validation.org (test addresses are free): the run shows the row rejected, and the live debugger the relay's 422 answer.

What it costs

Each row the relay checks is one check, and a definite result costs one credit; unknown results, malformed addresses and test addresses are free. Hightouch sends rows that were added or changed since the last run, plus every row it rejected before, on every run until it succeeds. The relay answers those from its cache (CACHE, for CACHE_DAYS) with no check and no credit (a repeat seconds after the first answer can still be checked: the cache can take up to a minute to reach other locations), which is why rejecting needs the cache. When the cache cannot be read, the relay does not check that row and answers 503, so Hightouch tries it again later, free.

The relay never retries a check itself. A check that got no answer in time may have been charged; with ON_ERROR=closed (one row per request, or a batch with the cache bound) Hightouch's retry checks it again.

Batches

With Hightouch's batching on, the relay answers 200 for the whole batch and reports each row's result in the answer and to RESULTS_URL: Hightouch treats one answer as the answer for every row of the request, so a batch never rejects single rows. Batches need the Workers Paid plan. Without a cache (REJECT=none), a batch in which a row was charged, or may have been (no answer, or an answer that is not ours), is answered 200 even with ON_ERROR=closed, so Hightouch does not send it again and charge those rows twice; its unchecked rows then pass and are not sent again until they change. To keep ON_ERROR=closed strict for batches, bind the cache (it is allowed with REJECT=none too): the rows already checked are then answered from it on the retry.

Privacy

The relay sends each address only in the body of a POST to https://api.email-validation.org (or https://api-eu.email-validation.org), never to another host (your RESULTS_URL gets addresses only with INCLUDE_EMAIL=true), and follows no redirect. It refuses requests without the shared secret, and requests with a query string, so an address never travels in a URL. It logs one line per request with counts, error codes and request ids, never an address or a row id, and its cache holds a keyed hash of each address, never the address. Hightouch's live debugger keeps the requests of each run, addresses included, and Warehouse Sync Logs keep each row's model data, under your account.

Licence

The download is under the MIT licence (LICENSE in the zip): you may use, change and share it.

More on Hightouch

Updated · Maintained by: Email Validation LLC

Need help? Contact support, or ask the help chat. Something wrong or missing on this page? Tell us