Skip to content

// sales engagement and cold email

Via API

lemlist email verification with pingutil

lemlist campaigns mix email with LinkedIn and calls, and a lead with a dead address still burns the email steps and your sender reputation. Verify the address with pingutil before creating the lead, skip invalid ones, and store the result as a custom variable so conditions in the sequence can treat catch-all leads differently.

Where it connects: lemlist API, POST /api/campaigns/{campaignId}/leads/ (create lead in campaign), Basic auth with the API key as password

What goes wrong without it

  • We push leads from our own scraper into lemlist and the first email step is where our bounce rate comes from.
  • Several clients share our agency setup and one bad list can hurt a shared sending domain.
  • We want catch-all leads to get LinkedIn steps first instead of an email that might bounce.

What you can do with lemlist and pingutil

  • Verify leads before the API insert

    Call pingutil first, and only call the lemlist create-lead endpoint for addresses you want to email.

  • Store the result as a custom variable

    Extra body keys become lemlist custom variables, so pingutilStatus can drive a condition or a filter in the campaign.

  • Route catch-all leads to a multichannel campaign

    Insert accept_all leads into a campaign that starts with LinkedIn steps, and keep the email-first campaign for valid ones.

Set it up

  1. 1

    Copy your lemlist API key from lemlist settings and create a pingutil API key.

  2. 2

    For each lead, call POST https://pingutil.com/v1/verify (or batch 50 at a time).

  3. 3

    Skip invalid leads. Pick the target campaign by status: email-first for valid, LinkedIn-first for accept_all.

  4. 4

    POST the lead to https://api.lemlist.com/api/campaigns/{campaignId}/leads/ with Basic auth, an empty username and the API key as password.

  5. 5

    Add deduplicate=true to the query so leads already in another campaign are refused.

Verify and insert a lead into a lemlist campaign
// Node 18+. Env: PINGUTIL_KEY, LEMLIST_API_KEY, EMAIL_CAMPAIGN_ID, LINKEDIN_FIRST_CAMPAIGN_ID
const lemlistAuth = 'Basic ' + Buffer.from(':' + process.env.LEMLIST_API_KEY).toString('base64');

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(30_000),
    });
    return res.ok ? ((await res.json()) as { status: string; reason: string; score: number }) : null;
  } catch {
    return null;
  }
}

export async function addLead(lead: { email: string; firstName?: string; lastName?: string; companyName?: string }) {
  const v = await verify(lead.email);
  if (v?.status === 'invalid') return { added: false, reason: v.reason };

  const campaignId = v?.status === 'valid'
    ? process.env.EMAIL_CAMPAIGN_ID
    : process.env.LINKEDIN_FIRST_CAMPAIGN_ID; // catch-all, unknown, or pingutil unavailable

  const res = await fetch(
    'https://api.lemlist.com/api/campaigns/' + campaignId + '/leads/?deduplicate=true',
    {
      method: 'POST',
      headers: { authorization: lemlistAuth, 'content-type': 'application/json' },
      body: JSON.stringify({
        ...lead,
        pingutilStatus: v ? v.status : 'unchecked', // stored as a lemlist custom variable
        pingutilReason: v ? v.reason : 'not_checked',
      }),
    },
  );
  if (res.status === 429) throw new Error('lemlist rate limit; wait for Retry-After');
  return { added: res.ok, status: res.status };
}

What to do with each result

pingutil resultAction in lemlist
status: validInsert into the email-first campaign.
status: invalidDo not insert. Keep the reason for your list source.
status: risky, reason: accept_allInsert into a LinkedIn-first campaign, with pingutilStatus stored for conditions.
status: unknownInsert into the LinkedIn-first campaign or hold and re-verify later.

Limits to plan for

  • lemlist allows 20 API requests per 2 seconds per key and returns Retry-After when you exceed it.
  • The lemlist endpoint always creates a lead; a contact already in the campaign is refused with LEAD_ALREADY_IN_CAMPAIGN.
  • pingutil checks 300 addresses per account per day (3,000 a month), and verification of one address can take several seconds on slow mail servers. Those are Free plan limits; Enterprise has custom limits.

lemlist documentation

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

Common questions

lemlist has a verifyEmail option. When would I use pingutil instead?
lemlist can verify an existing email when you add a lead (verifyEmail=true), using lemlist credits. pingutil is useful if you want to filter leads before they reach lemlist at all, or keep one verification step across lemlist and your other tools.
What does the custom variable get used for?
Any extra key you send becomes a lemlist custom variable, so pingutilStatus is visible on the lead and can be used in filters and conditions in your campaign.

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