Skip to content

// email marketing and newsletters

Via API

Klaviyo email verification with pingutil

Klaviyo stores signup popups and checkout opt-ins as profiles whether or not the address works, and fake or misspelled emails drag down deliverability on every flow and campaign. A Webhook action at the top of your welcome flow hands the email to your endpoint, which verifies it with pingutil, writes the result back as profile properties and suppresses addresses that are invalid.

Where it connects: Klaviyo flow Webhook action (list-triggered flow) plus the Profiles API profile-import and suppression endpoints

What goes wrong without it

  • Our spin-to-win popup gets flooded with throwaway addresses from people chasing the discount code, and they never buy.
  • Welcome flow bounces keep climbing and we only find out when the deliverability dashboard turns yellow.
  • Profiles count toward our Klaviyo bill, so junk signups are something we pay for every month.

What you can do with Klaviyo and pingutil

  • Verify at the top of the welcome flow

    Trigger the flow on the list your signup form feeds, run the Webhook action first, add a short time delay, then use a conditional split on the pingutil_status property so invalid profiles never get the welcome series.

  • Stop discount abuse from disposable addresses

    When reason is disposable_domain, suppress the profile so the coupon email is never sent, and keep the property for reporting on how much of the popup traffic was fake.

  • Offer a correction for typos

    Store did_you_mean as a property and branch those profiles to a short email sent to the corrected address asking the shopper to confirm.

Set it up

  1. 1

    Create a Klaviyo private API key with profiles write and subscriptions write access, and a pingutil API key from the dashboard.

  2. 2

    Deploy the endpoint below and pick a long random secret that Klaviyo will send as a header.

  3. 3

    In your list-triggered welcome flow, drag a Webhook action to the first position, enter your HTTPS endpoint URL, add the X-Webhook-Secret header and paste the JSON body shown in the snippet comment (copy the email variable from View profile properties if it differs).

  4. 4

    Add a time delay after the webhook so the properties are written before the next step, then a conditional split on pingutil_status.

  5. 5

    Use the flow Preview with a test profile to confirm the email variable renders, then set the webhook live.

Endpoint called by the Klaviyo flow webhook
// Klaviyo flow webhook body (JSON only):
//   { "email": "{{ person.email }}" }
// Header: X-Webhook-Secret: <your secret>
import express from 'express';

const app = express();
app.use(express.json());

const KLAVIYO = {
  Authorization: 'Klaviyo-API-Key ' + process.env.KLAVIYO_PRIVATE_KEY,
  revision: '2024-10-15',
  'Content-Type': 'application/vnd.api+json',
  Accept: 'application/vnd.api+json',
};

async function verify(email: string) {
  try {
    const res = await fetch('https://pingutil.com/v1/verify', {
      method: 'POST',
      headers: { Authorization: 'Bearer ' + process.env.PINGUTIL_KEY, 'Content-Type': 'application/json' },
      body: JSON.stringify({ email }),
      signal: AbortSignal.timeout(30000),
    });
    return res.ok ? await res.json() : null; // 429 / 5xx: fail open
  } catch {
    return null;
  }
}

async function handle(email: string) {
  const v = await verify(email);
  if (!v) return;

  await fetch('https://a.klaviyo.com/api/profile-import', {
    method: 'POST',
    headers: KLAVIYO,
    body: JSON.stringify({
      data: {
        type: 'profile',
        attributes: {
          email,
          properties: {
            pingutil_status: v.status,
            pingutil_reason: v.reason,
            pingutil_did_you_mean: v.did_you_mean,
          },
        },
      },
    }),
  });

  if (v.status === 'invalid') {
    await fetch('https://a.klaviyo.com/api/profile-suppression-bulk-create-jobs', {
      method: 'POST',
      headers: KLAVIYO,
      body: JSON.stringify({
        data: {
          type: 'profile-suppression-bulk-create-job',
          attributes: { profiles: { data: [{ type: 'profile', attributes: { email } }] } },
        },
      }),
    });
  }
}

app.post('/hooks/klaviyo', (req, res) => {
  if (req.get('x-webhook-secret') !== process.env.HOOK_SECRET) return res.sendStatus(401);
  res.sendStatus(200); // any 2xx counts as delivered; verify after responding
  const email = String(req.body?.email ?? '');
  if (email.includes('@')) handle(email).catch(console.error);
});

app.listen(3000);

What to do with each result

pingutil resultAction in Klaviyo
status: "invalid"Write pingutil_status and suppress the profile so no flow or campaign email goes to it.
reason: "disposable_domain"Suppressed with the other invalid results; also useful as a split to report popup abuse.
status: "risky" (accept_all, role_based)Keep the profile, store the property, and exclude it from segments you send to aggressively.
did_you_mean is setStore pingutil_did_you_mean and branch to a confirm-your-address email.
status: "unknown"Store the property and let the flow continue; re-check before a large campaign.

Limits to plan for

  • Klaviyo flow webhooks only send POST requests with a JSON body, and the URL must be HTTPS with a valid certificate and no redirect. Adding or editing webhooks needs two-step authentication on the account.
  • Verification can take several seconds, so the conditional split needs a time delay after the webhook step; without one the property may not exist yet.
  • pingutil checks up to 300 addresses per account per day (3,000 a month). A popup that collects more than that needs Enterprise limits, or a fast /v1/lookup with skip_enrichment for the disposable check only. Those are Free plan limits.

Klaviyo documentation

Klaviyo is a trademark of its owner. This integration uses Klaviyo's documented extension points; it is not an official Klaviyo app.

Common questions

Why not call pingutil directly from the Klaviyo webhook?
A Klaviyo flow webhook sends data out but does not write the response back to the profile, so you need a small endpoint that calls pingutil and then updates the profile through the Klaviyo API.
Will suppressing a profile delete it?
No. A suppressed profile stays in Klaviyo with its history; it just stops receiving email. You can remove the suppression later if the address turns out to be real.

Stop bad addresses in Klaviyo today

Sign in with your email, create an API key and paste it into the step above. Test on a few real addresses first: the live demo shows exactly what your Klaviyo setup will receive.