Skip to content

// support, community and events

Via API

Intercom email verification with pingutil

Every Messenger chat that asks for an email creates a lead, and a share of those addresses are typos or throwaways, so your follow-up email bounces and the conversation dies. Subscribe to the contact.user.created and contact.lead.created webhook topics, verify the address with pingutil, and write the result back to the contact as a tag and a custom attribute your team can filter and route on.

Where it connects: Intercom webhook topics contact.user.created and contact.lead.created, then the Contacts API (update contact, add tag)

What goes wrong without it

  • A visitor typed their email wrong in the Messenger, we replied a day later and the reply bounced. They think we ignored them.
  • Our lead count looks great until you notice half of them are mailinator and 10minutemail addresses.
  • Sales gets pinged for every new lead, including people chatting from a Gmail account about a personal question.

What you can do with Intercom and pingutil

  • Catch typos before the reply goes out

    When pingutil returns invalid with a did_you_mean suggestion (jane@gmial.com to jane@gmail.com), tag the contact and save the suggestion in a custom attribute so the agent can confirm the right address in the chat while the visitor is still there.

  • Tag throwaway leads

    Contacts on disposable domains get an email-disposable tag. Exclude that tag from outbound series and from lead reports so temp-mail sign-ups stop inflating your numbers.

  • Route work emails to sales

    Call /v1/lookup for leads that pass verification. When category is company, store company.name on the contact and let your Intercom assignment rules send it to the sales inbox; free webmail stays with support.

Set it up

  1. 1

    Create a pingutil API key in the dashboard and store it as PINGUTIL_KEY on the server that will receive Intercom webhooks.

  2. 2

    In Intercom, create the tags (email-invalid, email-disposable, email-risky) and a text custom data attribute named email_status. Note each tag id from the Tags API or the tag list.

  3. 3

    In the Intercom Developer Hub, open your app, go to Webhooks, enter your endpoint URL and subscribe to contact.user.created and contact.lead.created.

  4. 4

    Deploy the handler below. It checks the X-Hub-Signature header with your app client secret, answers 200 straight away, then verifies the email and updates the contact.

  5. 5

    Create a test lead from the Messenger with a disposable address and confirm the tag and attribute appear on the contact.

Express handler for Intercom contact webhooks
import express from 'express';
import crypto from 'node:crypto';

const app = express();
const INTERCOM = 'https://api.intercom.io';
const TAGS: Record<string, string> = {
  invalid: process.env.TAG_INVALID_ID!,
  disposable: process.env.TAG_DISPOSABLE_ID!,
  risky: process.env.TAG_RISKY_ID!,
};

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), // slow mail servers can take up to ~25 s
    });
    return res.ok ? await res.json() : null; // 429 quota_exceeded or 5xx: fail open
  } catch {
    return null; // timeout or network error: fail open
  }
}

function intercom(path: string, method: string, body: unknown) {
  return fetch(INTERCOM + path, {
    method,
    headers: {
      authorization: 'Bearer ' + process.env.INTERCOM_TOKEN,
      'content-type': 'application/json',
      'Intercom-Version': '2.11',
    },
    body: JSON.stringify(body),
  });
}

app.post('/webhooks/intercom', express.raw({ type: 'application/json' }), async (req, res) => {
  const expected = 'sha1=' + crypto.createHmac('sha1', process.env.INTERCOM_CLIENT_SECRET!).update(req.body).digest('hex');
  if (req.get('X-Hub-Signature') !== expected) return res.sendStatus(401);
  res.sendStatus(200); // acknowledge first, verification can take seconds

  const event = JSON.parse(req.body.toString('utf8'));
  if (event.topic !== 'contact.user.created' && event.topic !== 'contact.lead.created') return;
  const contact = event.data.item;
  if (!contact.email) return;

  const v = await verify(contact.email);
  if (!v) return; // pingutil unavailable: leave the contact untouched

  const tag = v.reason === 'disposable_domain' ? 'disposable' : v.status === 'invalid' ? 'invalid' : v.status === 'risky' ? 'risky' : null;
  if (tag) await intercom('/contacts/' + contact.id + '/tags', 'POST', { id: TAGS[tag] });

  const note = v.did_you_mean ? v.status + ' (did you mean ' + v.did_you_mean + '?)' : v.status + ': ' + v.reason;
  await intercom('/contacts/' + contact.id, 'PUT', { custom_attributes: { email_status: note } });
});

app.listen(3000);

What to do with each result

pingutil resultAction in Intercom
status: 'invalid' with did_you_mean setTag email-invalid, store the suggestion in email_status so the agent asks the visitor to confirm it in the chat.
reason: 'disposable_domain'Tag email-disposable and exclude the tag from series, outbound messages and lead reports.
status: 'risky' (accept_all, role_based)Tag email-risky. Keep the conversation, but ask for a direct address before sending anything important.
status: 'unknown'Do nothing. The mail server would not answer; treat it as unverified, not bad.
category: 'company' from /v1/lookupWrite company.name to a contact attribute and let assignment rules route the lead to sales.

Limits to plan for

  • Verification is limited to 300 addresses per account per day (3,000 a month). A busy Messenger can create more leads than that, so verify users and only the leads you plan to email. Those are Free plan limits; Enterprise has custom limits.
  • Tags and custom attributes must exist in Intercom before the API can apply them, and webhook delivery requires an app in the Intercom Developer Hub.
  • Catch-all domains come back risky, never valid. pingutil cannot confirm a specific mailbox on a server that accepts everything.

Intercom documentation

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

Common questions

Can pingutil block a visitor from starting a chat with a bad email?
Not from the webhook, which fires after the contact exists. The webhook approach tags and flags the contact so your team and automations can act on it. To reject an address before it reaches Intercom you need your own form or identity step that calls pingutil first.
Should I verify every Intercom lead?
Only the ones you will email. Anonymous visitors without an address never trigger a check, and leads you never follow up with do not need one. That keeps you inside the daily verification budget.

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