Skip to content

// website builders and cms

Via API

Memberstack email verification with pingutil

Memberstack sites with a free plan or gated download get members who sign up with throwaway inboxes, take what they came for, and never come back. Memberstack does not call your server before a signup completes, so the check runs right after: a member.created webhook hits your endpoint, pingutil verifies the address, and the Admin package writes a flag to the member's metaData or deletes the member.

Where it connects: Memberstack webhook, member.created event, plus the Admin package to update or delete the member

What goes wrong without it

  • Our free plan on Memberstack gets new members every day from yopmail and similar, all to grab the same lead magnet.
  • Member counts look great in the dashboard but the paid conversion rate keeps dropping.
  • Onboarding emails to new members bounce and our email provider sent us a warning.

What you can do with Memberstack and pingutil

  • Flag suspicious members in metaData

    Write email_status and email_reason to the member's metaData. Your site code or an admin view can then gate content or hide those members from counts.

  • Delete members on disposable domains

    For status invalid with reason disposable_domain, call members.delete. Keep deletion to the clear cases; a typo by a real person is better flagged than deleted.

  • Skip onboarding for dead mailboxes

    Only send the member to your email tool when the result is valid or risky, so onboarding sequences never mail an address that bounces.

Set it up

  1. 1

    In the Memberstack dashboard, open DevTools, add a webhook endpoint for member.created, and copy the signing secret.

  2. 2

    Install @memberstack/admin on your server and set MEMBERSTACK_SECRET_KEY (sk_...), MEMBERSTACK_WEBHOOK_SECRET and PINGUTIL_KEY.

  3. 3

    Read the raw body with express.raw() and check it with verifyWebhookSignature using the svix-id, svix-timestamp and svix-signature headers.

  4. 4

    Answer 200, then verify payload.auth.email with pingutil and update or delete the member.

  5. 5

    Sign up with a disposable address on your live site and confirm the member is flagged or removed.

Express endpoint for Memberstack member.created
import express from 'express';
import memberstackAdmin from '@memberstack/admin';

const memberstack = memberstackAdmin.init(process.env.MEMBERSTACK_SECRET_KEY);
const app = express();

async function verifyEmail(email) {
  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(25_000),
    });
    return res.ok ? await res.json() : null; // 429 / 5xx: fail open
  } catch {
    return null; // timeout or network error: fail open
  }
}

async function screenMember(member) {
  const result = await verifyEmail(member.auth.email);
  if (!result) return;

  if (result.status === 'invalid' && result.reason === 'disposable_domain') {
    await memberstack.members.delete({ id: member.id });
    return;
  }
  await memberstack.members.update({
    id: member.id,
    data: { metaData: { email_status: result.status, email_reason: result.reason } },
  });
}

app.post('/webhooks/memberstack', express.raw({ type: 'application/json' }), (req, res) => {
  const payload = JSON.parse(req.body.toString());
  const isValid = memberstack.verifyWebhookSignature({
    payload,
    headers: {
      'svix-id': req.headers['svix-id'],
      'svix-timestamp': req.headers['svix-timestamp'],
      'svix-signature': req.headers['svix-signature'],
    },
    secret: process.env.MEMBERSTACK_WEBHOOK_SECRET,
  });
  if (!isValid) return res.status(401).send('Invalid signature');

  res.status(200).send('OK'); // acknowledge first
  if (payload.event === 'member.created') {
    screenMember(payload.payload).catch((err) => console.error('pingutil screen failed', err));
  }
});

app.listen(3000);

What to do with each result

pingutil resultAction in Memberstack
status: "invalid", reason disposable_domainmembers.delete({ id }) or flag in metaData if you prefer to review first.
status: "invalid", other reasons (mailbox_not_found, no_mx)Set metaData.email_status = "invalid" and keep them out of onboarding email.
status: "risky"Set metaData.email_status = "risky" with the reason; no action on access.
status: "valid" or check skippedRecord the status, or leave the member untouched.

Limits to plan for

  • The member already exists and is logged in when the webhook fires. Anything they can reach in the first seconds, such as a download link, they can still get.
  • Deleting a member is permanent. The Admin package docs say update only touches the fields you send but do not say whether metaData keys merge, so test the update on a sandbox member first.
  • Mailbox checks take a few seconds and count toward the account's 300 verified addresses a day (3,000 a month). Those are Free plan limits; Enterprise has custom limits.

Memberstack documentation

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

Common questions

Can I stop the Memberstack signup itself?
Not from a webhook; it fires after the member is created. You could check the address in your own page code before calling Memberstack's signup method, but client-side checks can be skipped, so keep the webhook as the backstop.
Which secret key does the Admin package need?
Your Memberstack secret key (sk_ for live, sk_sb_ for sandbox), on the server only. The webhook signing secret is separate.

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