// sales engagement and cold email
Via APIMailshake email verification with pingutil
Mailshake drops unsubscribed recipients and duplicates on import, but an address whose mailbox does not exist is still accepted and only shows up later as a bounce. Verify recipients with pingutil, then add the ones you trust with the Mailshake recipients/add endpoint.
Where it connects: Mailshake API, POST /2017-04-01/recipients/add (addresses array, campaignID)
What goes wrong without it
- Mailshake shows the bounces in Replies after the damage is done.
- Each campaign holds a limited number of recipients and we waste slots on dead addresses.
- We cannot tell the client which rows of their list were bad.
What you can do with Mailshake and pingutil
Verify before recipients/add
Run the list through pingutil and post only valid addresses in the addresses array.
Save campaign slots
A Mailshake campaign holds up to 5,000 recipients; filtering invalid ones first means every slot is a mailbox that exists.
Keep the check result as a text replacement
Recipient fields are a flat key-value hash, so you can store pingutil status next to first name and company.
Set it up
- 1
Create a Mailshake API key on the Extensions, API page, and a pingutil API key.
- 2
Verify the list with POST https://pingutil.com/v1/verify/batch, 50 per call.
- 3
Build the addresses array from valid rows: emailAddress, fullName and fields.
- 4
POST to https://api.mailshake.com/2017-04-01/recipients/add with campaignID, using your API key as the Basic auth username.
- 5
Check invalidEmails in the response, then poll recipients/add-status with checkStatusID until the import finishes.
// Node 18+. Env: PINGUTIL_KEY, MAILSHAKE_API_KEY, CAMPAIGN_ID
type Row = { email: string; fullName?: string; company?: string };
async function verifyBatch(emails: string[]) {
try {
const res = await fetch('https://pingutil.com/v1/verify/batch', {
method: 'POST',
headers: { authorization: 'Bearer ' + process.env.PINGUTIL_KEY, 'content-type': 'application/json' },
body: JSON.stringify({ emails }),
signal: AbortSignal.timeout(120_000),
});
return res.ok ? ((await res.json()).results as { status: string; reason: string; score: number }[]) : null;
} catch {
return null;
}
}
export async function addRecipients(rows: Row[]) {
const addresses: { emailAddress: string; fullName?: string; fields: Record<string, string> }[] = [];
const later: Row[] = [];
for (let i = 0; i < rows.length; i += 50) {
const chunk = rows.slice(i, i + 50);
const results = await verifyBatch(chunk.map((r) => r.email));
if (!results) { later.push(...chunk); continue; } // verify these on the next run
results.forEach((r, j) => {
if (r.status !== 'valid') { if (r.status === 'unknown') later.push(chunk[j]); return; }
addresses.push({
emailAddress: chunk[j].email,
fullName: chunk[j].fullName,
fields: { company: chunk[j].company ?? '', pingutil_score: String(r.score) },
});
});
}
const res = await fetch('https://api.mailshake.com/2017-04-01/recipients/add', {
method: 'POST',
headers: {
authorization: 'Basic ' + Buffer.from(process.env.MAILSHAKE_API_KEY + ':').toString('base64'),
'content-type': 'application/json',
},
body: JSON.stringify({ campaignID: Number(process.env.CAMPAIGN_ID), addresses }),
});
if (!res.ok) throw new Error('Mailshake ' + res.status + ': ' + (await res.text()));
const out = await res.json();
return { checkStatusID: out.checkStatusID, mailshakeInvalid: out.invalidEmails, later };
}What to do with each result
| pingutil result | Action in Mailshake |
|---|---|
| status: valid | Add to the campaign in the addresses array. |
| status: invalid | Leave out; it would bounce and use a campaign slot. |
| status: risky, reason: accept_all | Leave out of the main campaign, or add to a small test campaign first. |
| status: unknown | Hold for a later pingutil run. |
Limits to plan for
- Mailshake charges 20 quota units per recipients/add call plus 1 per recipient, against an hourly quota, and caps API recipient additions per month.
- Mailshake imports are asynchronous, and adding recipients to a running campaign can start sending to them right away.
- pingutil checks 300 addresses per account per day (3,000 a month) and reports catch-all addresses as risky / accept_all. Those are Free plan limits; Enterprise has custom limits.
Mailshake documentation
Mailshake is a trademark of its owner. This integration uses Mailshake's documented extension points; it is not an official Mailshake app.
Common questions
- Mailshake already returns invalidEmails. Is that the same check?
- No. Mailshake's invalidEmails lists addresses that fail its validation on import. pingutil checks DNS, MX and the mailbox itself with an SMTP RCPT TO probe, without sending a message.
- Can I verify without writing code?
- Yes. Upload the CSV in the pingutil dashboard (50 rows per file), download the results, and import the valid rows into Mailshake by hand.
Stop bad addresses in Mailshake 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 Mailshake setup will receive.