Skip to content

// transactional email

Via API

Loops email verification with pingutil

Loops is often wired straight into a SaaS signup, with transactional emails that can also add the person to your audience. Without a check, every throwaway signup gets the onboarding workflow and later campaigns. Verify with pingutil before the transactional call, and only set addToAudience for addresses that pass.

Where it connects: Your code before POST /api/v1/transactional, plus the Loops email.hardBounced webhook

What goes wrong without it

  • Every fake signup ends up in our Loops audience and drags down campaign open rates.
  • Our onboarding workflow emails temp-mail addresses for two weeks after they disappear.
  • A hard bounce in Loops unsubscribes the contact, so a typo means a real user never hears from us again.

What you can do with Loops and pingutil

  • Only add verified signups to the audience

    Call /v1/verify first and pass addToAudience: true to the transactional API only when the status is not invalid, so throwaways never join your contacts.

  • Keep onboarding workflows off throwaway addresses

    Disposable and randomized addresses never become contacts, so the onboarding workflow does not start for them.

  • Catch typos before the first send

    Return did_you_mean from your signup endpoint before the verification email is sent, so the hard bounce, and the automatic unsubscribe that follows it in Loops, never happens.

  • Flag users from email.hardBounced

    Subscribe to the email.hardBounced webhook, verify the Webhook-Signature header, and mark the user in your app so they can fix their address.

Set it up

  1. 1

    Store PINGUTIL_KEY next to your Loops API key.

  2. 2

    In your signup handler, call pingutil /v1/verify before POST https://app.loops.so/api/v1/transactional.

  3. 3

    Return did_you_mean for invalid addresses; otherwise send, setting addToAudience only for addresses that are not invalid.

  4. 4

    In Loops, go to Settings, Webhooks, add your endpoint and subscribe to email.hardBounced.

  5. 5

    Verify the Webhook-Signature header, flag the user, and verify any replacement address with pingutil.

Verify, then send a Loops transactional email
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(8000),
    });
    return res.ok ? await res.json() : null;
  } catch {
    return null; // fail open
  }
}

export async function onSignup(email: string, confirmUrl: string) {
  const v = await verify(email);
  if (v?.status === 'invalid') {
    return { ok: false, reason: v.reason, did_you_mean: v.did_you_mean };
  }

  // Only real-looking addresses join the audience and its workflows
  const addToAudience = v !== null && (v.status === 'valid' || v.status === 'risky');

  await fetch('https://app.loops.so/api/v1/transactional', {
    method: 'POST',
    headers: {
      authorization: 'Bearer ' + process.env.LOOPS_API_KEY,
      'content-type': 'application/json',
    },
    body: JSON.stringify({
      transactionalId: process.env.LOOPS_CONFIRM_EMAIL_ID,
      email,
      addToAudience,
      dataVariables: { confirmUrl },
    }),
  });
  return { ok: true };
}

What to do with each result

pingutil resultAction in Loops
status invalid, reason disposable_domainDo not call Loops. The address never becomes a contact.
status invalid with did_you_meanReturn the suggestion to the signup form.
status valid or riskySend the transactional email with addToAudience: true.
status unknown or pingutil unavailableSend the confirmation but leave addToAudience false; add the contact after they confirm.

Limits to plan for

  • Loops allows one webhook endpoint per account, sends at most 10 events a second, and disables an endpoint after 5 days of failed deliveries.
  • In Loops, a hard bounce also unsubscribes the contact, so a contact.unsubscribed event follows email.hardBounced.
  • pingutil cannot confirm catch-all domains or servers that refuse to answer. Decide whether risky and unknown addresses belong in your audience.

Loops documentation

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

Common questions

Is there a Loops app for pingutil?
No. You call pingutil from your own signup code before calling the Loops API.
Should unknown addresses join my Loops audience?
That is your call. A safe default is to send the confirmation email and add them to the audience only after they click the link.

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