Skip to content

// email marketing and newsletters

Via API

MailerLite email verification with pingutil

MailerLite embedded forms and landing pages accept any address that looks like an email, so dead mailboxes and temp-mail signups reach your automations. A subscriber.created webhook sends each new subscriber to your endpoint, pingutil checks it, and the MailerLite API updates a custom field, moves risky subscribers into a review group and unsubscribes invalid ones.

Where it connects: MailerLite webhooks (subscriber.created event) plus the subscribers and groups API

What goes wrong without it

  • Our welcome automation bounces on new signups every week and MailerLite has already warned us about bounce rates once.
  • We grow through a giveaway form, and a lot of entries come from disposable addresses that never open anything.
  • Cleaning the list means exporting to a spreadsheet, guessing which rows are fake and deleting them by hand.

What you can do with MailerLite and pingutil

  • Verify before the welcome automation sends

    Add a short delay at the start of your welcome automation so the webhook has time to update the subscriber, then filter on the pingutil_status field.

  • Route risky subscribers to a review group

    Catch-all, role-based and unknown results go into a Needs review group that you send to more carefully, while invalid ones are unsubscribed.

  • Clean giveaway entries

    Disposable and randomized addresses from contest forms are flagged on arrival, so the winner draw and follow-up campaign only reach real people.

Set it up

  1. 1

    In MailerLite, create a text field with the key pingutil_status and a group called Needs review; note the group ID. Generate an API token under Integrations.

  2. 2

    Deploy the endpoint below and create the webhook with POST https://connect.mailerlite.com/api/webhooks, events ["subscriber.created"], or add it in the MailerLite dashboard. Save the returned secret.

  3. 3

    Sign up with a test address through one of your forms and confirm the field and group are set.

  4. 4

    Add a delay of a few minutes at the start of your welcome automation and a condition on pingutil_status so invalid subscribers exit.

MailerLite webhook receiver
import express from 'express';
import crypto from 'node:crypto';

const app = express();
const ML = { Authorization: 'Bearer ' + process.env.MAILERLITE_TOKEN, 'Content-Type': 'application/json', Accept: 'application/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;
  } catch {
    return null; // fail open
  }
}

async function handle(id: string, email: string) {
  const v = await verify(email);
  if (!v) return;
  const update: Record<string, unknown> = { fields: { pingutil_status: v.status } };
  if (v.status === 'invalid') update.status = 'unsubscribed';
  await fetch('https://connect.mailerlite.com/api/subscribers/' + id, { method: 'PUT', headers: ML, body: JSON.stringify(update) });

  if (v.status === 'risky' || v.status === 'unknown') {
    await fetch('https://connect.mailerlite.com/api/subscribers/' + id + '/groups/' + process.env.ML_REVIEW_GROUP_ID, { method: 'POST', headers: ML });
  }
}

app.post('/hooks/mailerlite', express.raw({ type: 'application/json' }), (req, res) => {
  const expected = crypto.createHmac('sha256', process.env.ML_WEBHOOK_SECRET!).update(req.body).digest('hex');
  if (req.get('signature') !== expected) return res.sendStatus(401);
  // MailerLite counts anything slower than 3 seconds as failed, so answer now and verify afterwards.
  res.sendStatus(200);
  const event = JSON.parse(req.body.toString('utf8'));
  if (event.event === 'subscriber.created') handle(event.id, event.email).catch(console.error);
});

app.listen(3000);

What to do with each result

pingutil resultAction in MailerLite
status: "invalid"PUT status "unsubscribed" and pingutil_status "invalid" so automations and campaigns skip it.
status: "risky" (accept_all, role_based)Add to the Needs review group and keep the subscriber active.
status: "unknown"Add to Needs review; re-check later because the server did not answer clearly.
reason: "disposable_domain"Comes back as invalid; unsubscribed and recorded in the field for giveaway reporting.
status: "valid"Store the field and let the welcome automation run.

Limits to plan for

  • MailerLite marks a webhook failed if you do not answer within 3 seconds and retries three more times (after 10, 100 and 1000 seconds), so verification must run after the response.
  • pingutil checks up to 300 addresses per account per day (3,000 a month); over that the code leaves new subscribers unchecked rather than blocking them. Those are Free plan limits; Enterprise has custom limits.
  • Catch-all servers accept every address, so those results stay risky instead of valid.

MailerLite documentation

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

Common questions

Why unsubscribe instead of deleting invalid subscribers?
An unsubscribed record stays in MailerLite, so the same bad address cannot quietly be re-added as active by another form, and you keep a record of what was filtered.
Can I verify inside my own signup form instead?
Yes. Call pingutil in your form handler before calling the MailerLite create subscriber endpoint, and skip the API call when the result is invalid.

Stop bad addresses in MailerLite 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 MailerLite setup will receive.