// email marketing and newsletters
Via APIAWeber email verification with pingutil
Once a bad address is in AWeber, the follow-up series starts and the bounces count against you. If you collect emails in your own form or app, the cleanest fix is to call pingutil before the AWeber Add Subscriber API: invalid addresses get an error message, typos get a suggestion, and risky ones are added with a tag. For forms hosted by AWeber, its subscriber.added webhook can feed the same check.
Where it connects: Your signup form handler calling the AWeber API v1.0 Add Subscriber endpoint after pingutil verification (AWeber subscriber.added webhooks for forms hosted by AWeber)
What goes wrong without it
- Our follow-up series starts the second someone subscribes, so a typo means the whole series bounces.
- People enter fake emails to get our lead magnet and we have no check before they hit AWeber.
- We pay by subscriber count and a lot of those subscribers never open.
What you can do with AWeber and pingutil
Verify before adding the subscriber
Your form handler calls /v1/verify, shows an error for invalid addresses, and only calls the AWeber API when the address can receive mail.
Suggest corrections at the form
When did_you_mean is set, return it to the form so the visitor can fix gmial.com before submitting again.
Clean an existing list
Export subscribers, verify them with /v1/verify/batch or the dashboard CSV upload, then set invalid ones to unsubscribed with the Update Subscriber endpoint.
Set it up
- 1
Create an app in the AWeber developer portal, complete the OAuth 2 flow with subscriber write access, and store the access token (refreshing it as AWeber documents).
- 2
Find your account ID and list ID through the API, and create a pingutil API key.
- 3
Add the handler below to your signup form backend.
- 4
Submit the form with a misspelled domain and a disposable address to check the responses, then a real address to confirm it reaches AWeber with the right tag.
import express from 'express';
const app = express();
app.use(express.json());
const AWEBER_SUBSCRIBERS =
'https://api.aweber.com/1.0/accounts/' + process.env.AWEBER_ACCOUNT_ID + '/lists/' + process.env.AWEBER_LIST_ID + '/subscribers';
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), // keep the form responsive
});
return res.ok ? await res.json() : null;
} catch {
return null; // timeout or outage: accept the signup
}
}
app.post('/subscribe', async (req, res) => {
const email = String(req.body?.email ?? '').trim();
const name = String(req.body?.name ?? '').trim();
const v = await verify(email);
if (v?.status === 'invalid') {
return res.status(422).json({ error: 'This email address cannot receive mail.', did_you_mean: v.did_you_mean });
}
if (v?.did_you_mean) {
return res.status(422).json({ error: 'Did you mean ' + v.did_you_mean + '?', did_you_mean: v.did_you_mean });
}
const tags = v ? ['pingutil-' + v.status] : ['pingutil-unchecked'];
const r = await fetch(AWEBER_SUBSCRIBERS, {
method: 'POST',
headers: { Authorization: 'Bearer ' + process.env.AWEBER_ACCESS_TOKEN, 'Content-Type': 'application/json' },
body: JSON.stringify({ email, name: name || undefined, tags }),
});
if (!r.ok) return res.status(502).json({ error: 'Could not subscribe right now.' });
res.json({ ok: true });
});
app.listen(3000);What to do with each result
| pingutil result | Action in AWeber |
|---|---|
| status: "invalid" | Reject at the form with a clear message; nothing is sent to AWeber. |
| did_you_mean is set | Return the suggestion so the visitor can correct and resubmit. |
| status: "risky" or "unknown" | Add to AWeber with a pingutil-risky or pingutil-unknown tag for segmenting. |
| No result (timeout or 429) | Add the subscriber with a pingutil-unchecked tag and verify later in a batch. |
Limits to plan for
- A form handler cannot wait 25 seconds, so the snippet uses an 8-second timeout and accepts the signup when pingutil does not answer in time. Those subscribers are tagged unchecked for a later batch run.
- AWeber's subscriber.added webhook works for forms AWeber hosts, but AWeber does not guarantee delivery or order, so a scheduled batch check is a useful backstop.
- pingutil checks up to 300 addresses per account per day (3,000 a month), shared between form checks and batch cleaning. Those are Free plan limits; Enterprise has custom limits.
AWeber documentation
AWeber is a trademark of its owner. This integration uses AWeber's documented extension points; it is not an official AWeber app.
Common questions
- Can I use AWeber webhooks instead of my own form?
- Yes. Enable webhooks on your AWeber developer app, subscribe to subscriber.added, verify the address in your endpoint, and set invalid subscribers to unsubscribed with the Update Subscriber endpoint.
- Will rejecting invalid emails at the form hurt conversions?
- It removes signups that could never receive your lead magnet or follow-ups. Showing did_you_mean usually turns a typo into a working signup instead of a lost one.
Stop bad addresses in AWeber 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 AWeber setup will receive.